1jQuery(document).ready(function(jQuery){ 2 var today = new Date(); 3 var tom = new Date(); 4 var totalDays = getTotalDaysInMonth(today.getMonth()+1, today.getFullYear()); 5 if (today.getDate() < totalDays) { 6 tom.setDate(today.getDate() + 1); 7 } else { 8 // must set date before month! 9 tom.setDate(1); 10 tom.setMonth(today.getMonth() + 1); 11 } 12 //jQuery('.columbia-booking-widget .check_in').val((today.getMonth()+1) + "/" + today.getDate() + "/" + today.getFullYear()); 13 //jQuery('.columbia-booking-widget .check_out').val((tom.getMonth()+1) + "/" + tom.getDate() + "/" + tom.getFullYear()); 14 15 jQuery('.button-bookNow a').attr('href', "https://be.synxis.com/landing?Hotel=" + COLUMBIA_HOTEL_CODE + "&Chain=" + COLUMBIA_CHAIN_CODE); 16 17 jQuery('.columbia-booking-widget .check_in').datepicker({ 18 dateFormat: 'mm-dd-yy', 19 showAnim: 'fadeIn', 20 minDate: today, 21 onSelect: function(txt, inst) { 22 console.log("SELECT DATEPICKER"); 23 var start = new Date(inst.currentYear, inst.currentMonth, parseInt(inst.currentDay)); 24 var totalDays = getTotalDaysInMonth(start.getMonth()+1, start.getFullYear()); 25 var end = new Date(start.getFullYear(),start.getMonth(),start.getDate()); 26 if (end.getDate() < totalDays) { 27 end.setDate(start.getDate()+1); 28 } else { 29 // must set date before month! 30 end.setDate(1); 31 end.setMonth(start.getMonth()+1); 32 } 33 console.log("set date to:", end); 34 jQuery('.columbia-booking-widget .check_out').datepicker('option', 'minDate', end); 35 jQuery('.columbia-booking-widget .check_out').val((end.getMonth()+1) + "/" + end.getDate() + "/" + end.getFullYear()); 36 } 37 }); 38 39 jQuery('.columbia-booking-widget .check_out').datepicker({ 40 dateFormat: 'mm-dd-yy', 41 minDate: tom, 42 showAnim: 'fadeIn' 43 }); 44 45 jQuery('.columbia-booking-widget .form-check-in').submit(function(e){ 46 console.log("submit"); 47 e.preventDefault(); 48 49 if(typeof ga === 'function') 50 { 51 if(typeof google_tag_manager !== 'undefined') { 52 var tracker = ''; 53 ga(function() { 54 var trackers = ga.getAll(); 55 for (var i=0; i < trackers.length; ++i) { 56 tracker = trackers[i]; 57 } 58 }); 59 ga(function() { 60 var url = "https://be.synxis.com/landing?Hotel=" + COLUMBIA_HOTEL_CODE + "&Chain=" + COLUMBIA_CHAIN_CODE + "&arrive=" + jQuery('.columbia-booking-widget .check_in').val() + "&depart=" + jQuery('.columbia-booking-widget .check_out').val() + "&room=" + jQuery('.columbia-booking-widget .rooms').val() + "&adult=" + jQuery('.columbia-booking-widget .adults').val() + "&Child=" + jQuery('.columbia-booking-widget .children').val(); 61 62 linker = new window.gaplugins.Linker(tracker); 63 destinationUrl = linker.decorate(url); 64 65 window.open(destinationUrl); 66 }); 67 } 68 } 69 else 70 console.log('ga() not defined'); 71 72 }); 73}); 74 75// GET NUMBER OF DAYS IN MONTH 76function getTotalDaysInMonth(month,year) { 77 var days = 0; 78 if (month==1 || month==3 || month==5 || month==7 || month==8 || 79 month==10 || month==12) days=31; 80 else if (month==4 || month==6 || month==9 || month==11) { 81 days=30; 82 } else if (month==2) { 83 if (isALeapYear(year)) 84 days=29; 85 else 86 days=28; 87 } 88 return (days); 89} 90 91// CHECK TO SEE IF YEAR IS A LEAP YEAR 92function isALeapYear (Year) { 93 if (((Year % 4)==0) && ((Year % 100)!=0) || ((Year % 400)==0)) 94 return (true); 95 else 96 return (false); 97} 98
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.