(function ($) {
    //    "use strict";


    /*  Data Table
    -------------*/




    $('#bootstrap-data-table').DataTable({
        lengthMenu: [[50, 75, 100, -1], [50, 75, 100, "All"]],
    });



    $('#bootstrap-data-table-export').DataTable({
        dom: 'lBfrtip',
        lengthMenu: [[50, 75, 100, -1], [50, 75, 100, "All"]],
        buttons: [
            {
		        extend: 'copy',
		        text: 'Copy',
		        className: 'btn btn-default',
		        exportOptions: {
		            columns: ':not(.notexport)'
		        }
		    },
		    {
		        extend: 'csv',
		        text: 'CSV',
		        className: 'btn btn-default',
		        exportOptions: {
		            columns: ':not(.notexport)'
		        }
		    },
		    {
		        extend: 'excel',
		        text: 'Excel',
		        className: 'btn btn-default',
		        exportOptions: {
		            columns: ':not(.notexport)'
		        }
		    },
		    {
		        extend: 'pdf',
		        text: 'PDF',
		        className: 'btn btn-default',
		        exportOptions: {
		            columns: ':not(.notexport)'
		        }
		    },
		    {
		        extend: 'print',
		        text: 'Print',
		        className: 'btn btn-default',
		        exportOptions: {
		            columns: ':not(.notexport)'
		        }
		    }
        ]
    });
	
	$('#row-select').DataTable( {
			initComplete: function () {
				this.api().columns().every( function () {
					var column = this;
					var select = $('<select class="form-control"><option value=""></option></select>')
						.appendTo( $(column.footer()).empty() )
						.on( 'change', function () {
							var val = $.fn.dataTable.util.escapeRegex(
								$(this).val()
							);
	 
							column
								.search( val ? '^'+val+'$' : '', true, false )
								.draw();
						} );
	 
					column.data().unique().sort().each( function ( d, j ) {
						select.append( '<option value="'+d+'">'+d+'</option>' )
					} );
				} );
			}
		} );






})(jQuery);