/* Interface functions */ function filters_event ( method, type, value ) { $('#preloader').show(); $.post( "/lv/flights_promotions_js_post.html", { method: method, type: type, value: value }, function( data ) { $('.search_results_content').html( data ); }).done(function() { $('#preloader').fadeOut(300); AvioCalendar(); load_destinations_table(); }); } /* Interface elements functions */ function AvioCalendar() { $('.calendar-input,.caneldar').datepicker({ dateFormat: 'dd/mm/yy', showOtherMonths: true, selectOtherMonths: true, dayNamesMin: ['Sun', 'Mon', 'Tue', 'Wen', 'Thu', 'Fri', 'Sta'] }); } function show_all_destinations(){ $.post( "/lv/flights_promotions_js_post.html", { method: 'show_all_destinations', type: 'directions', value: 'true' }, function( data ) { }).done(function() { $('.li_destinations').show(); $('.show_all_destinations').hide(); }); } function load_destinations_table() { if ( $('.dest_table').length > 0 ) { var table = $('.dest_table').dataTable(); } } function load_search_results ( lang, path, method ) { if ( $('.search_results_content').length > 0 ) { load_destinations_table(); $.post( "/" + lang + "/flights_promotions_js_post.html", { position: 'flights', method: method, uri: path }, function( data ) { $('.search_results_content').html( data ); }).done(function() { AvioCalendar(); load_destinations_table(); $('#preloader').fadeOut(300); }); } }