updating off canvas js develop
authorIan Weller <ian@gaslightmedia.com>
Thu, 1 Jun 2017 20:25:39 +0000 (16:25 -0400)
committerIan Weller <ian@gaslightmedia.com>
Thu, 1 Jun 2017 20:25:39 +0000 (16:25 -0400)
I am adding some changes made for a clone of this theme needed to make
the off canvas arrows work again.

js/app.js
js/custom/pageSetup.js

index ff27ee4..6947943 100644 (file)
--- a/js/app.js
+++ b/js/app.js
@@ -227,203 +227,203 @@ $(document).ready(function () {
         //console.log('menu-id = ' + menuNum);
     });
     // custom js / jquery / modules
-    var arrival_module = {
-        init: function () {
-           this.cacheDOM();
-            this.bindEvents();
-        },
-        cacheDOM: function() {
-            this.$arrive = $("#arrive");
-            this.$currentDate = 0;
-        },
-        bindEvents: function () {
-            this.$arrive.datepicker({
-                dateFormat: 'mm/dd/yy',
-                minDate: 0,
-                onSelect: function (date) {
-                this.$currentDate = arrival_module.$arrive.datepicker('getDate');
-                this.$extraDay = arrival_module.$arrive.datepicker('getDate');
-                this.$extraDay.setDate(this.$extraDay.getDate() + 1);
-                departure_module.$depart.datepicker("option", {minDate: new Date(this.$extraDay)});
-            }
-            });
-        }
-    };
-    var departure_module = {
-        init: function () {
-            this.cacheDOM();
-            this.bindEvents();
-        },
-        cacheDOM: function (){
-            this.$depart = $("#depart");
-            this.$departure = 0;
-        },
-        bindEvents: function () {
-            this.$depart.datepicker({
-                onSelect: function (date) {
-                this.$departure = departure_module.$depart.datepicker('getDate');
-            }
-        });
-    }
-    };
-   $("#arriveCal").click(function () {
-        $("#arrive").datepicker("show");
-    });
-    $("#departCal").click(function () {
-        $("#depart").datepicker("show");
-    });
-    var restab_module = {
-        init: function (){
-            this.cacheDOM();
-            this.bindEvents();
-        },
-        cacheDOM: function () {
-            this.$restab = $("#res-tab").children("li").children("a");
-            this.$resForm = $("#resForm");
-            this.$resContent = $("#resContent");
-        },
-        bindEvents: function () {
-            this.$restab.on("click", function () {
-                if (restab_module.$resContent.css("display") === "none") {
-                    restab_module.$resContent.slideDown(500);
-                } else {
-                    restab_module.$resContent.slideUp(500);
-                }
-          });
-        }
-    };
-    var search_module = {
-        init: function () {
-            this.cacheDOM();
-            this.bindEvents();
-        },
-        cacheDOM: function () {
-            this.$search = $("#search-icon");
-            this.$form = $(".searchformHeader");
-            this.$input = $(".searchformHeader input[type='text']");
-            this.$mag_glass = $("#magnifying-glass");
-        },
-        bindEvents: function () {
-            this.$search.click( function () {
-                search_module.$form.animate({width: 'toggle'}, 1000);
-                search_module.$search.css("visibility", "hidden");
-                search_module.$input.focus();
-            });
-            this.$mag_glass.click( function () {
-                search_module.$form.submit();
-            });
-            this.$input.blur(function () {
-                search_module.$form.animate({width: 'toggle'}, 1000);
-                search_module.$search.css("visibility", "visible");
-            });
-        }
-    };
-    restab_module.init();
-    departure_module.init();
-    arrival_module.init();
-    search_module.init();
-    $(".search_result_context").children("br").remove();
-
-    var extraDay, end, arrival, currentDate, currentDate2,
-        requiredDate, requiredDate1, minDays, departure,
-        stay, d, dd,  m, y;
-   $(document).on('change', '#arriveOff', function () {
-        currentDate = $("#arriveOff").val();
-        currentDate = new Date(currentDate);
-
-       // this section is used to circumvent issues with selecting the last day of the month without a proper rollover to the following month.
-        currentDate = new Date(currentDate.getUTCFullYear(), currentDate.getUTCMonth(),   currentDate.getUTCDate());
-        currentDate.setDate(currentDate.getDate());
-
-        dd = currentDate.getDate() + 1;
-        if (dd <= 9) {
-            dd = '0' + dd;
-        }
-        d = currentDate.getDate();
-        if (d <= 9) {
-            d = '0' + d;
-        }
-        m = currentDate.getMonth() + 1;
-        if (m <= 9) {
-            m = '0' + m;
-        }
-        y = currentDate.getFullYear();
-
-        // this variable is for passing to booking site
-        requiredDate = y + '-' + m + '-' + d;
-        minDays = y + '-' + m + '-' + dd;
-        $("#departOff").attr("min", minDays);
-        if (requiredDate <= $("#arriveOff").attr("min")) {
-            minDays = $("#arriveOff").attr("min");
-            $("#arriveOff").val(minDays);
-        }
-    });
-    // restrict departure date ///////////////////////////////
-    $(document).on('change', '#departOff', function () {
-        currentDate2 = $("#departOff").val();
-        currentDate2 = new Date(currentDate2);
-        currentDate2 = new Date(currentDate2.getUTCFullYear(), currentDate2.getUTCMonth(),currentDate2.getUTCDate());
-        currentDate2.setDate(currentDate2.getDate());
-        if($("#departOff").val() <= requiredDate){
-            $("#departOff").val(minDays);
-        }
-    });
-    $('#block-1, #block-2, #block-3').bind('click tap', function(){
-        if($(window).width() <= 1024){
-            $(this).toggleClass('front-page-blocks');
-        }
-   });
-    $('#block-1, #block-2, #block-3').on("mouseover", function (){
-         if($(window).width() > 1024){
-            $(this).addClass('front-page-blocks');
-         }
-    });
-    $('#block-1, #block-2, #block-3').on("mouseout", function (){
-         if($(window).width() > 1024){
-            $(this).removeClass('front-page-blocks');
-         }
-    });
-    $(".menu-icon").on("click", function () {
-       window.scrollTo(0,0);
-    });
-    var $topMenu = $("ul#menu-top-menu > li");
-    var $topMenuLink = $("ul#menu-top-menu li > a");
-    var $dropDown = $("ul#menu-top-menu li").find(".dropdown");
-    $("#headerLinks").children("ul#menu-top-menu").children("li").each(function () {
-        $($topMenuLink).css("font-size", "16px");
-        $($topMenuLink).css("padding", "10px 5px");
-    });
-    $($topMenu).each(function () {
-       $(this).removeClass("active") ;
-    });
-
-    $("#menu-top-menu-1").children("li:nth-child(2)").children("a:nth-child(1)").addClass("offCanvasLinks");
-
-
-    $("a:contains('Exploring')").on("click", function () {
-           $('html, body').animate({
-        scrollTop: $("#exploring").offset().top - 165
-    }, 1000);
-    });
-     $("a:contains('Golf')").on("click", function () {
-           $('html, body').animate({
-        scrollTop: $("#golf").offset().top - 165
-    }, 1000);
-    });
-     $("a:contains('Hiking')").on("click", function () {
-           $('html, body').animate({
-        scrollTop: $("#hiking").offset().top - 165
-    }, 1000);
-    });
-     $("a:contains('Water')").on("click", function () {
-           $('html, body').animate({
-        scrollTop: $("#water").offset().top - 165
-    }, 1000);
-    });
-     $("a:contains('Birding')").on("click", function () {
-           $('html, body').animate({
-        scrollTop: $("#birding").offset().top - 165
-    }, 1000);
-    });
-
+//    var arrival_module = {
+//        init: function () {
+//           this.cacheDOM();
+//            this.bindEvents();
+//        },
+//        cacheDOM: function() {
+//            this.$arrive = $("#arrive");
+//            this.$currentDate = 0;
+//        },
+//        bindEvents: function () {
+//            this.$arrive.datepicker({
+//                dateFormat: 'mm/dd/yy',
+//                minDate: 0,
+//                onSelect: function (date) {
+//                this.$currentDate = arrival_module.$arrive.datepicker('getDate');
+//                this.$extraDay = arrival_module.$arrive.datepicker('getDate');
+//                this.$extraDay.setDate(this.$extraDay.getDate() + 1);
+//                departure_module.$depart.datepicker("option", {minDate: new Date(this.$extraDay)});
+//            }
+//            });
+//        }
+//    };
+//    var departure_module = {
+//        init: function () {
+//            this.cacheDOM();
+//            this.bindEvents();
+//        },
+//        cacheDOM: function (){
+//            this.$depart = $("#depart");
+//            this.$departure = 0;
+//        },
+//        bindEvents: function () {
+//            this.$depart.datepicker({
+//                onSelect: function (date) {
+//                this.$departure = departure_module.$depart.datepicker('getDate');
+//            }
+//        });
+//    }
+//    };
+//   $("#arriveCal").click(function () {
+//        $("#arrive").datepicker("show");
+//    });
+//    $("#departCal").click(function () {
+//        $("#depart").datepicker("show");
+//    });
+//    var restab_module = {
+//        init: function (){
+//            this.cacheDOM();
+//            this.bindEvents();
+//        },
+//        cacheDOM: function () {
+//            this.$restab = $("#res-tab").children("li").children("a");
+//            this.$resForm = $("#resForm");
+//            this.$resContent = $("#resContent");
+//        },
+//        bindEvents: function () {
+//            this.$restab.on("click", function () {
+//                if (restab_module.$resContent.css("display") === "none") {
+//                    restab_module.$resContent.slideDown(500);
+//                } else {
+//                    restab_module.$resContent.slideUp(500);
+//                }
+//          });
+//        }
+//    };
+//    var search_module = {
+//        init: function () {
+//            this.cacheDOM();
+//            this.bindEvents();
+//        },
+//        cacheDOM: function () {
+//            this.$search = $("#search-icon");
+//            this.$form = $(".searchformHeader");
+//            this.$input = $(".searchformHeader input[type='text']");
+//            this.$mag_glass = $("#magnifying-glass");
+//        },
+//        bindEvents: function () {
+//            this.$search.click( function () {
+//                search_module.$form.animate({width: 'toggle'}, 1000);
+//                search_module.$search.css("visibility", "hidden");
+//                search_module.$input.focus();
+//            });
+//            this.$mag_glass.click( function () {
+//                search_module.$form.submit();
+//            });
+//            this.$input.blur(function () {
+//                search_module.$form.animate({width: 'toggle'}, 1000);
+//                search_module.$search.css("visibility", "visible");
+//            });
+//        }
+//    };
+//    restab_module.init();
+//    departure_module.init();
+//    arrival_module.init();
+//    search_module.init();
+//    $(".search_result_context").children("br").remove();
+//
+//    var extraDay, end, arrival, currentDate, currentDate2,
+//        requiredDate, requiredDate1, minDays, departure,
+//        stay, d, dd,  m, y;
+//   $(document).on('change', '#arriveOff', function () {
+//        currentDate = $("#arriveOff").val();
+//        currentDate = new Date(currentDate);
+//
+//       // this section is used to circumvent issues with selecting the last day of the month without a proper rollover to the following month.
+//        currentDate = new Date(currentDate.getUTCFullYear(), currentDate.getUTCMonth(),   currentDate.getUTCDate());
+//        currentDate.setDate(currentDate.getDate());
+//
+//        dd = currentDate.getDate() + 1;
+//        if (dd <= 9) {
+//            dd = '0' + dd;
+//        }
+//        d = currentDate.getDate();
+//        if (d <= 9) {
+//            d = '0' + d;
+//        }
+//        m = currentDate.getMonth() + 1;
+//        if (m <= 9) {
+//            m = '0' + m;
+//        }
+//        y = currentDate.getFullYear();
+//
+//        // this variable is for passing to booking site
+//        requiredDate = y + '-' + m + '-' + d;
+//        minDays = y + '-' + m + '-' + dd;
+//        $("#departOff").attr("min", minDays);
+//        if (requiredDate <= $("#arriveOff").attr("min")) {
+//            minDays = $("#arriveOff").attr("min");
+//            $("#arriveOff").val(minDays);
+//        }
+//    });
+//    // restrict departure date ///////////////////////////////
+//    $(document).on('change', '#departOff', function () {
+//        currentDate2 = $("#departOff").val();
+//        currentDate2 = new Date(currentDate2);
+//        currentDate2 = new Date(currentDate2.getUTCFullYear(), currentDate2.getUTCMonth(),currentDate2.getUTCDate());
+//        currentDate2.setDate(currentDate2.getDate());
+//        if($("#departOff").val() <= requiredDate){
+//            $("#departOff").val(minDays);
+//        }
+//    });
+//    $('#block-1, #block-2, #block-3').bind('click tap', function(){
+//        if($(window).width() <= 1024){
+//            $(this).toggleClass('front-page-blocks');
+//        }
+//   });
+//    $('#block-1, #block-2, #block-3').on("mouseover", function (){
+//         if($(window).width() > 1024){
+//            $(this).addClass('front-page-blocks');
+//         }
+//    });
+//    $('#block-1, #block-2, #block-3').on("mouseout", function (){
+//         if($(window).width() > 1024){
+//            $(this).removeClass('front-page-blocks');
+//         }
+//    });
+//    $(".menu-icon").on("click", function () {
+//       window.scrollTo(0,0);
+//    });
+//    var $topMenu = $("ul#menu-top-menu > li");
+//    var $topMenuLink = $("ul#menu-top-menu li > a");
+//    var $dropDown = $("ul#menu-top-menu li").find(".dropdown");
+//    $("#headerLinks").children("ul#menu-top-menu").children("li").each(function () {
+//        $($topMenuLink).css("font-size", "16px");
+//        $($topMenuLink).css("padding", "10px 5px");
+//    });
+//    $($topMenu).each(function () {
+//       $(this).removeClass("active") ;
+//    });
+//
+//    $("#menu-top-menu-1").children("li:nth-child(2)").children("a:nth-child(1)").addClass("offCanvasLinks");
+//
+//
+//    $("a:contains('Exploring')").on("click", function () {
+//           $('html, body').animate({
+//        scrollTop: $("#exploring").offset().top - 165
+//    }, 1000);
+//    });
+//     $("a:contains('Golf')").on("click", function () {
+//           $('html, body').animate({
+//        scrollTop: $("#golf").offset().top - 165
+//    }, 1000);
+//    });
+//     $("a:contains('Hiking')").on("click", function () {
+//           $('html, body').animate({
+//        scrollTop: $("#hiking").offset().top - 165
+//    }, 1000);
+//    });
+//     $("a:contains('Water')").on("click", function () {
+//           $('html, body').animate({
+//        scrollTop: $("#water").offset().top - 165
+//    }, 1000);
+//    });
+//     $("a:contains('Birding')").on("click", function () {
+//           $('html, body').animate({
+//        scrollTop: $("#birding").offset().top - 165
+//    }, 1000);
+//    });
+//
 });
index 522b9c5..ab8cc6b 100644 (file)
@@ -24,203 +24,203 @@ $(document).ready(function () {
         //console.log('menu-id = ' + menuNum);
     });
     // custom js / jquery / modules
-    var arrival_module = {
-        init: function () {
-           this.cacheDOM();
-            this.bindEvents();
-        },
-        cacheDOM: function() {
-            this.$arrive = $("#arrive");
-            this.$currentDate = 0;
-        },
-        bindEvents: function () {
-            this.$arrive.datepicker({
-                dateFormat: 'mm/dd/yy',
-                minDate: 0,
-                onSelect: function (date) {
-                this.$currentDate = arrival_module.$arrive.datepicker('getDate');
-                this.$extraDay = arrival_module.$arrive.datepicker('getDate');
-                this.$extraDay.setDate(this.$extraDay.getDate() + 1);
-                departure_module.$depart.datepicker("option", {minDate: new Date(this.$extraDay)});
-            }
-            });
-        }
-    };
-    var departure_module = {
-        init: function () {
-            this.cacheDOM();
-            this.bindEvents();
-        },
-        cacheDOM: function (){
-            this.$depart = $("#depart");
-            this.$departure = 0;
-        },
-        bindEvents: function () {
-            this.$depart.datepicker({
-                onSelect: function (date) {
-                this.$departure = departure_module.$depart.datepicker('getDate');
-            }
-        });
-    }
-    };
-   $("#arriveCal").click(function () {
-        $("#arrive").datepicker("show");
-    });
-    $("#departCal").click(function () {
-        $("#depart").datepicker("show");
-    });
-    var restab_module = {
-        init: function (){
-            this.cacheDOM();
-            this.bindEvents();
-        },
-        cacheDOM: function () {
-            this.$restab = $("#res-tab").children("li").children("a");
-            this.$resForm = $("#resForm");
-            this.$resContent = $("#resContent");
-        },
-        bindEvents: function () {
-            this.$restab.on("click", function () {
-                if (restab_module.$resContent.css("display") === "none") {
-                    restab_module.$resContent.slideDown(500);
-                } else {
-                    restab_module.$resContent.slideUp(500);
-                }
-          });
-        }
-    };
-    var search_module = {
-        init: function () {
-            this.cacheDOM();
-            this.bindEvents();
-        },
-        cacheDOM: function () {
-            this.$search = $("#search-icon");
-            this.$form = $(".searchformHeader");
-            this.$input = $(".searchformHeader input[type='text']");
-            this.$mag_glass = $("#magnifying-glass");
-        },
-        bindEvents: function () {
-            this.$search.click( function () {
-                search_module.$form.animate({width: 'toggle'}, 1000);
-                search_module.$search.css("visibility", "hidden");
-                search_module.$input.focus();
-            });
-            this.$mag_glass.click( function () {
-                search_module.$form.submit();
-            });
-            this.$input.blur(function () {
-                search_module.$form.animate({width: 'toggle'}, 1000);
-                search_module.$search.css("visibility", "visible");
-            });
-        }
-    };
-    restab_module.init();
-    departure_module.init();
-    arrival_module.init();
-    search_module.init();
-    $(".search_result_context").children("br").remove();
-
-    var extraDay, end, arrival, currentDate, currentDate2,
-        requiredDate, requiredDate1, minDays, departure,
-        stay, d, dd,  m, y;
-   $(document).on('change', '#arriveOff', function () {
-        currentDate = $("#arriveOff").val();
-        currentDate = new Date(currentDate);
-
-       // this section is used to circumvent issues with selecting the last day of the month without a proper rollover to the following month.
-        currentDate = new Date(currentDate.getUTCFullYear(), currentDate.getUTCMonth(),   currentDate.getUTCDate());
-        currentDate.setDate(currentDate.getDate());
-
-        dd = currentDate.getDate() + 1;
-        if (dd <= 9) {
-            dd = '0' + dd;
-        }
-        d = currentDate.getDate();
-        if (d <= 9) {
-            d = '0' + d;
-        }
-        m = currentDate.getMonth() + 1;
-        if (m <= 9) {
-            m = '0' + m;
-        }
-        y = currentDate.getFullYear();
-
-        // this variable is for passing to booking site
-        requiredDate = y + '-' + m + '-' + d;
-        minDays = y + '-' + m + '-' + dd;
-        $("#departOff").attr("min", minDays);
-        if (requiredDate <= $("#arriveOff").attr("min")) {
-            minDays = $("#arriveOff").attr("min");
-            $("#arriveOff").val(minDays);
-        }
-    });
-    // restrict departure date ///////////////////////////////
-    $(document).on('change', '#departOff', function () {
-        currentDate2 = $("#departOff").val();
-        currentDate2 = new Date(currentDate2);
-        currentDate2 = new Date(currentDate2.getUTCFullYear(), currentDate2.getUTCMonth(),currentDate2.getUTCDate());
-        currentDate2.setDate(currentDate2.getDate());
-        if($("#departOff").val() <= requiredDate){
-            $("#departOff").val(minDays);
-        }
-    });
-    $('#block-1, #block-2, #block-3').bind('click tap', function(){
-        if($(window).width() <= 1024){
-            $(this).toggleClass('front-page-blocks');
-        }
-   });
-    $('#block-1, #block-2, #block-3').on("mouseover", function (){
-         if($(window).width() > 1024){
-            $(this).addClass('front-page-blocks');
-         }
-    });
-    $('#block-1, #block-2, #block-3').on("mouseout", function (){
-         if($(window).width() > 1024){
-            $(this).removeClass('front-page-blocks');
-         }
-    });
-    $(".menu-icon").on("click", function () {
-       window.scrollTo(0,0);
-    });
-    var $topMenu = $("ul#menu-top-menu > li");
-    var $topMenuLink = $("ul#menu-top-menu li > a");
-    var $dropDown = $("ul#menu-top-menu li").find(".dropdown");
-    $("#headerLinks").children("ul#menu-top-menu").children("li").each(function () {
-        $($topMenuLink).css("font-size", "16px");
-        $($topMenuLink).css("padding", "10px 5px");
-    });
-    $($topMenu).each(function () {
-       $(this).removeClass("active") ;
-    });
-
-    $("#menu-top-menu-1").children("li:nth-child(2)").children("a:nth-child(1)").addClass("offCanvasLinks");
-
-
-    $("a:contains('Exploring')").on("click", function () {
-           $('html, body').animate({
-        scrollTop: $("#exploring").offset().top - 165
-    }, 1000);
-    });
-     $("a:contains('Golf')").on("click", function () {
-           $('html, body').animate({
-        scrollTop: $("#golf").offset().top - 165
-    }, 1000);
-    });
-     $("a:contains('Hiking')").on("click", function () {
-           $('html, body').animate({
-        scrollTop: $("#hiking").offset().top - 165
-    }, 1000);
-    });
-     $("a:contains('Water')").on("click", function () {
-           $('html, body').animate({
-        scrollTop: $("#water").offset().top - 165
-    }, 1000);
-    });
-     $("a:contains('Birding')").on("click", function () {
-           $('html, body').animate({
-        scrollTop: $("#birding").offset().top - 165
-    }, 1000);
-    });
-
+//    var arrival_module = {
+//        init: function () {
+//           this.cacheDOM();
+//            this.bindEvents();
+//        },
+//        cacheDOM: function() {
+//            this.$arrive = $("#arrive");
+//            this.$currentDate = 0;
+//        },
+//        bindEvents: function () {
+//            this.$arrive.datepicker({
+//                dateFormat: 'mm/dd/yy',
+//                minDate: 0,
+//                onSelect: function (date) {
+//                this.$currentDate = arrival_module.$arrive.datepicker('getDate');
+//                this.$extraDay = arrival_module.$arrive.datepicker('getDate');
+//                this.$extraDay.setDate(this.$extraDay.getDate() + 1);
+//                departure_module.$depart.datepicker("option", {minDate: new Date(this.$extraDay)});
+//            }
+//            });
+//        }
+//    };
+//    var departure_module = {
+//        init: function () {
+//            this.cacheDOM();
+//            this.bindEvents();
+//        },
+//        cacheDOM: function (){
+//            this.$depart = $("#depart");
+//            this.$departure = 0;
+//        },
+//        bindEvents: function () {
+//            this.$depart.datepicker({
+//                onSelect: function (date) {
+//                this.$departure = departure_module.$depart.datepicker('getDate');
+//            }
+//        });
+//    }
+//    };
+//   $("#arriveCal").click(function () {
+//        $("#arrive").datepicker("show");
+//    });
+//    $("#departCal").click(function () {
+//        $("#depart").datepicker("show");
+//    });
+//    var restab_module = {
+//        init: function (){
+//            this.cacheDOM();
+//            this.bindEvents();
+//        },
+//        cacheDOM: function () {
+//            this.$restab = $("#res-tab").children("li").children("a");
+//            this.$resForm = $("#resForm");
+//            this.$resContent = $("#resContent");
+//        },
+//        bindEvents: function () {
+//            this.$restab.on("click", function () {
+//                if (restab_module.$resContent.css("display") === "none") {
+//                    restab_module.$resContent.slideDown(500);
+//                } else {
+//                    restab_module.$resContent.slideUp(500);
+//                }
+//          });
+//        }
+//    };
+//    var search_module = {
+//        init: function () {
+//            this.cacheDOM();
+//            this.bindEvents();
+//        },
+//        cacheDOM: function () {
+//            this.$search = $("#search-icon");
+//            this.$form = $(".searchformHeader");
+//            this.$input = $(".searchformHeader input[type='text']");
+//            this.$mag_glass = $("#magnifying-glass");
+//        },
+//        bindEvents: function () {
+//            this.$search.click( function () {
+//                search_module.$form.animate({width: 'toggle'}, 1000);
+//                search_module.$search.css("visibility", "hidden");
+//                search_module.$input.focus();
+//            });
+//            this.$mag_glass.click( function () {
+//                search_module.$form.submit();
+//            });
+//            this.$input.blur(function () {
+//                search_module.$form.animate({width: 'toggle'}, 1000);
+//                search_module.$search.css("visibility", "visible");
+//            });
+//        }
+//    };
+//    restab_module.init();
+//    departure_module.init();
+//    arrival_module.init();
+//    search_module.init();
+//    $(".search_result_context").children("br").remove();
+//
+//    var extraDay, end, arrival, currentDate, currentDate2,
+//        requiredDate, requiredDate1, minDays, departure,
+//        stay, d, dd,  m, y;
+//   $(document).on('change', '#arriveOff', function () {
+//        currentDate = $("#arriveOff").val();
+//        currentDate = new Date(currentDate);
+//
+//       // this section is used to circumvent issues with selecting the last day of the month without a proper rollover to the following month.
+//        currentDate = new Date(currentDate.getUTCFullYear(), currentDate.getUTCMonth(),   currentDate.getUTCDate());
+//        currentDate.setDate(currentDate.getDate());
+//
+//        dd = currentDate.getDate() + 1;
+//        if (dd <= 9) {
+//            dd = '0' + dd;
+//        }
+//        d = currentDate.getDate();
+//        if (d <= 9) {
+//            d = '0' + d;
+//        }
+//        m = currentDate.getMonth() + 1;
+//        if (m <= 9) {
+//            m = '0' + m;
+//        }
+//        y = currentDate.getFullYear();
+//
+//        // this variable is for passing to booking site
+//        requiredDate = y + '-' + m + '-' + d;
+//        minDays = y + '-' + m + '-' + dd;
+//        $("#departOff").attr("min", minDays);
+//        if (requiredDate <= $("#arriveOff").attr("min")) {
+//            minDays = $("#arriveOff").attr("min");
+//            $("#arriveOff").val(minDays);
+//        }
+//    });
+//    // restrict departure date ///////////////////////////////
+//    $(document).on('change', '#departOff', function () {
+//        currentDate2 = $("#departOff").val();
+//        currentDate2 = new Date(currentDate2);
+//        currentDate2 = new Date(currentDate2.getUTCFullYear(), currentDate2.getUTCMonth(),currentDate2.getUTCDate());
+//        currentDate2.setDate(currentDate2.getDate());
+//        if($("#departOff").val() <= requiredDate){
+//            $("#departOff").val(minDays);
+//        }
+//    });
+//    $('#block-1, #block-2, #block-3').bind('click tap', function(){
+//        if($(window).width() <= 1024){
+//            $(this).toggleClass('front-page-blocks');
+//        }
+//   });
+//    $('#block-1, #block-2, #block-3').on("mouseover", function (){
+//         if($(window).width() > 1024){
+//            $(this).addClass('front-page-blocks');
+//         }
+//    });
+//    $('#block-1, #block-2, #block-3').on("mouseout", function (){
+//         if($(window).width() > 1024){
+//            $(this).removeClass('front-page-blocks');
+//         }
+//    });
+//    $(".menu-icon").on("click", function () {
+//       window.scrollTo(0,0);
+//    });
+//    var $topMenu = $("ul#menu-top-menu > li");
+//    var $topMenuLink = $("ul#menu-top-menu li > a");
+//    var $dropDown = $("ul#menu-top-menu li").find(".dropdown");
+//    $("#headerLinks").children("ul#menu-top-menu").children("li").each(function () {
+//        $($topMenuLink).css("font-size", "16px");
+//        $($topMenuLink).css("padding", "10px 5px");
+//    });
+//    $($topMenu).each(function () {
+//       $(this).removeClass("active") ;
+//    });
+//
+//    $("#menu-top-menu-1").children("li:nth-child(2)").children("a:nth-child(1)").addClass("offCanvasLinks");
+//
+//
+//    $("a:contains('Exploring')").on("click", function () {
+//           $('html, body').animate({
+//        scrollTop: $("#exploring").offset().top - 165
+//    }, 1000);
+//    });
+//     $("a:contains('Golf')").on("click", function () {
+//           $('html, body').animate({
+//        scrollTop: $("#golf").offset().top - 165
+//    }, 1000);
+//    });
+//     $("a:contains('Hiking')").on("click", function () {
+//           $('html, body').animate({
+//        scrollTop: $("#hiking").offset().top - 165
+//    }, 1000);
+//    });
+//     $("a:contains('Water')").on("click", function () {
+//           $('html, body').animate({
+//        scrollTop: $("#water").offset().top - 165
+//    }, 1000);
+//    });
+//     $("a:contains('Birding')").on("click", function () {
+//           $('html, body').animate({
+//        scrollTop: $("#birding").offset().top - 165
+//    }, 1000);
+//    });
+//
 });