Niezdefiniowany ext in fn.Datatable.ext.search.push

 jQuery.fn.dataTable.ext.search.push(...) on line is being executed before you load datatables.js . You will want to execute it after Datables has been loaded. 
 wrap the code inside $(document).ready(); then it will work fine
Kriss Sachintha