
			<div id="back-to-top">
				<a href="#top"><?php _e( 'Back to top' , 'layerswp' ); ?></a>
			</div> <!-- back-to-top -->

			<?php if ( 'header-sidebar' == layers_get_theme_mod( 'header-menu-layout' ) ) { ?>
				<?php get_template_part( 'partials/footer' , 'standard' ); ?>
			<?php } ?>

		</section>


		<?php if ( 'header-sidebar' == layers_get_theme_mod( 'header-menu-layout' ) ) { ?>
			</div><!-- /header side wrapper -->
		<?php } else {
			get_template_part( 'partials/footer' , 'standard' );
		}?>

	</div><!-- END / MAIN SITE #wrapper -->
	<?php do_action( 'layers_after_site_wrapper' ); ?>







<?php wp_footer(); ?>


	<script src="<?php echo get_template_directory_uri(); ?>/js/jquery.min.js"></script> 
    <!-- <script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.min.js"></script>  -->
    <script src="<?php echo get_template_directory_uri(); ?>/js/bootstrap.min.js"></script>
    <script src="<?php echo get_template_directory_uri(); ?>/js/jquery.easing.min.js"></script>
  <script src="<?php echo get_template_directory_uri(); ?>/js/scrolling-nav.js"></script>

    <script type="text/javascript">

      //for smooth scroll
      $(function() {
        $('a[href*=#]:not([data-toggle="tab"])').click(function() {
          if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
            var target = $(this.hash);
            target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
            if (target.length) {
              $('html, body').animate({
                scrollTop: target.offset().top
              }, 1000);
              return false;
            }
          }
        });
      });

       $('.top').bind('click',open_div);

       function open_div(){
          $parent_box = $(this).closest('.box');
          $parent_box.siblings().find('.bottom').slideUp();
          $parent_box.find('.bottom').slideToggle(1000, 'swing');
       }
    </script>



<script type="text/javascript">
        var count = 0;
        
        $(document).ready(function(event) {
          //$('.swiper-slide').width('100%');
          
           $(".cmpr").hide();

           $(".plus").click(function(event){
             count = count +1;
             if(count<=4){
               
                $(".cmpr").show();
                var img_src = '';
                img_src = $(event.currentTarget).parents('.search-result .row').find('.thumbnail img').attr('src');
                //alert(img_src);
                $(".cmpr").find('.compare_boxin:nth-child('+count+')').append('<img src = '+img_src+' /><span><a href="javascript:void(0);" class="compareClose"><i class="fa fa-times" aria-hidden="true"></i></a></span>');
                $(event.currentTarget).hide();

                $('.compareClose').unbind('click',removeFromCompareList);
                $('.compareClose').bind('click',removeFromCompareList);
             }
             else{
                count = 4;
                alert("limit exceeds");
             }
           });


           $('.compareClose').bind('click',removeFromCompareList);

           function removeFromCompareList(event){
            count = count-1;
            var img_src = $(event.currentTarget).parents('.compare_boxin').find('img').attr('src');
            var img_srcc = '';
            $('.search-result .row .thumbnail').each(function(){
                img_srcc = $(this).find('img').attr('src');
                if(img_srcc == img_src) {
                  $(this).parents('.search-result .row').find('.plus').show();
                }

            });
            if(count>0){
              $(event.currentTarget).parents('.compare_boxin').remove();
              $('.compare_box').append('<div class = "compare_boxin"></div>');




            }else{  
              $(event.currentTarget).parents('.compare_boxin').remove();
              $('.compare_box').append('<div class = "compare_boxin"></div>');
              $(".cmpr").hide();
            }
           }
        



            /*$('.top').on('click', function() {
            $parent_box = $(this).closest('.box');
            $parent_box.siblings().find('.bottom').slideUp();
            $parent_box.find('.bottom').slideToggle(1000, 'swing');
          });*/
        });

    </script>

<script type="text/javascript">
$(document).ready(function(){
    var ajax_url = "<?php echo get_template_directory_uri(); ?>";
    var page_no = 1;
    $("#loader").hide(); //hide the loader initially

    /***************** For home page serach textbox starts ********************/ 
    $("#suggest-list").bind('scroll',load_more_suggestion);

    //on search box key press
    $("#search_keyword").keyup(function(){
         //$("#loader").show();
         ajax_search_suggestion($(this).val(),'keypress');
    });

    //ajax search suggesstions for hotels and destinations
    function ajax_search_suggestion(val,changeType){
         
         if(changeType == 'scroll'){
            page_no++;
         }else{
            page_no=1;
         }

         $.ajax({
            type: "POST",
            url: ajax_url+"/ajax/ajax-search-suggestion.php",
            data: {
               keyword : val,
               page_no : page_no
            },
            dataType:'json',
            beforeSend: function(){
              //$("#destination").css("background","url(<?php bloginfo('template_url')?>/img/LoaderIcon.gif) no-repeat 165px");
            },
            success: function(response){
              //console.log(response);
              $("#loader").hide();
              var hotelHtml = '';
               if(response.hasOwnProperty('hotels')) {
                
                 for(var i in response.hotels) {
                     var obj = response.hotels[i];
                     var hotel_dec = obj.hotel_search;
                     var res = hotel_dec.split("|");
                     hotelHtml += '<li search_by="hotel" hotel-id="'+res[0]+'">\
                     '+res[1]+'\
                     </li>';
                 }
               }

               if(changeType == 'keypress'){
                  $('#hotels').html(hotelHtml);
               }else{
                  $('#hotels').append(hotelHtml);
               }
               
   
              var destinationHtml = '';
               if(response.hasOwnProperty('destinations')) {
                 for(var i in response.destinations) {
                     var obj = response.destinations[i];
                     var destination_dec = obj.destination_search;
                     var desc = destination_dec.split("|");

                     destinationHtml += '<li search_by="destination" destination="'+desc[0]+'">\
                     '+desc[0]+', '+desc[1]+', '+desc[2]+'\
                     </li>';
                 }
               }

               if(changeType == 'keypress'){
                  $('#destinations').html(destinationHtml);
               }else{
                  $('#destinations').append(destinationHtml);
               }
               
              $("#suggest-list li.parentResult ul li").bind('click',selectKeyword);
              $("#suggest-list").unbind('scroll',load_more_suggestion);
              $("#suggest-list").bind('scroll',load_more_suggestion);
              $("#suggest-list").show();
            }
         });     
    }

   // on selecting a keyword from the suggesstion
   function selectKeyword(){
       //console.log($(this));  
       var search_by = $(this).attr('search_by');
       //alert(search_by);

       if(search_by == 'hotel'){
         var hotel_id = $(this).attr('hotel-id');
         //$('#search_keyword').parents('.form-group').append('<input type="hidden" name="hotel_id" value="'+hotel_id+'">');
         $('#hotel_id').val(hotel_id);
         $('#destination_id').val(0);
       }
       else if(search_by == 'destination'){
         var destination = $(this).attr('destination');
         //$('#search_keyword').parents('.form-group').append('<input type="hidden" name="destination" value="'+destination+'">');
         $('#destination_id').val(destination);
         $('#hotel_id').val(0);
       }

       $('#search_keyword').val($(this).text().trim());
       $("#suggest-list").hide();
       
   }

   //load more suggestions on scroll dropdown to bottom
   function load_more_suggestion(){
      if ($(this)[0].scrollHeight - $(this).scrollTop() <= $(this).outerHeight()) {
         var keyword = $("#search_keyword").val();
         $("#loader").show();
         ajax_search_suggestion(keyword,'scroll');
      }
   }
   /***************** For home page serach textbox starts ********************/ 


   /***************** For serach results page pagination starts********************/ 
   
   //load more search results on scroll down to bottom
   $(window).scroll(function(){
      if($(window).scrollTop() + $(window).height() == $(document).height()) {
         ajax_search_results();
      }
   });

   function ajax_search_results(){
      $("#loader").show();
      page_no++;
      var search_keyword = getParameterByName('search_keyword');
      var hotel_id = getParameterByName('hotel_id');
      var destination = getParameterByName('destination');

      $.ajax({
         type: "POST",
         url: ajax_url+"/ajax/ajax-load-more-search-results.php",
         data: {
            search_keyword : search_keyword,
            category       : category,
            accomodation   : accomodation,
            facility       : facility,
            city           : city,
            hotel_id       : hotel_id,
            destination    : destination,
            page_no        : page_no
         },
         success: function(response){
            console.log(response);
            $("#loader").hide();
            $("#search-results").append(response);

            //unbind and bind room prices ajax call
            $('.rooms_check').unbind('click', room_prices);
            $('.rooms_check').bind('click', room_prices);
         }
      });

   }

   /***************** For serach results page pagination end********************/ 


    //add respective child age dropdown accorginf to child number
    $('#children').change(function(){
        var children = $(this).val();
        var html = '';
            for(var i=0;i<=children-1;i++){
            html += '<div class="col-sm-4">'+
                      '<div class="form-group">'+
                          '<select name="child_age_'+i+'" class="form-control" required>'+
                              '<option value="">--Edad del Niño--</option>';
                              for(var j=1;j<=12;j++){
            html +=           '<option value="'+j+'">'+j+'</option>';
                              }
            html +=       '</select>'+
                      '</div>'+
                    '</div>';
            }
        $('#children_age_dropdown').html(html);
    });


    //function to fetch get parameters
    function getParameterByName(name, url) {
        if (!url) {
          url = window.location.href;
        }
        name = name.replace(/[\[\]]/g, "\\$&");
        var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),
            results = regex.exec(url);  
        if (!results) return null;
        if (!results[2]) return '';
        return decodeURIComponent(results[2].replace(/\+/g, " "));
    }

    
    /*Ajax to add element accomodation in paramenter and seach again with keywords */
    var category     =[],
        accomodation =[],
        facility     =[],
        destination  =[],
        city         =[],
        country      =[];

    $(".filter_chkbox").click(function(e){
        $("#loader").show();
        var type = $(e.currentTarget).attr('filter-type');

        if(type=='category'){ 
          category=[];
        }
        else if(type=='accomodation'){ 
          accomodation=[];
        }
        else if(type=='facility'){
          facility=[];
        }
        else if(type=='destination'){
          destination=[];
        }
        else if(type=='city'){
          city=[];
        }
        else if(type=='country'){
          country=[];
        }

        $('.filter_chkbox[filter-type="'+type+'"]').each(function(index, item){

            if($(item).is(':checked')) {

                if(type=='category'){ 
                  category.push($(item).val());
                }
                else if(type=='accomodation'){ 
                  accomodation.push($(item).val());
                }
                else if(type=='facility'){
                  facility.push($(item).val());
                }
                else if(type=='destination'){
                  destination.push($(item).val());
                }
                else if(type=='city'){
                  city.push($(item).val());
                }
                else if(type=='country'){
                  country.push($(item).val());
                }
            }
        });

        console.log(category);
        //console.log(destination);

        var search_keyword = getParameterByName('search_keyword');
        var hotel_id = getParameterByName('hotel_id');
        var destination = getParameterByName('destination');
        filter_value(search_keyword,hotel_id,destination);

    });

    //function for modal popup filters
    $(".apply_btn").click(function(e){


        var type = $(e.currentTarget).parents().find('.filhtc').attr('filter-type');

        if(type=='accomodation'){ 
          accomodation=[];
        }
        else if(type=='facility'){
          facility=[];
        }
        else if(type=='destination'){
          destination=[];
        }
        else if(type=='city'){
          city=[];
        }
        else if(type=='country'){
          country=[];
        }

        $('.popup_filter_chkbox').each(function(index, item){
            if($(item).is(':checked')) {
                if(type=='accomodation'){ 
                  accomodation.push($(item).val());
                }
                else if(type=='facility'){
                  facility.push($(item).val());
                }
                else if(type=='destination'){
                  destination.push($(item).val());
                }
                else if(type=='city'){
                  city.push($(item).val());
                }
                else if(type=='country'){
                  country.push($(item).val());
                }
            }
        });

        //console.log(accomodation);
        //console.log(destination);

        var search_keyword = getParameterByName('search_keyword');
        var hotel_id = getParameterByName('hotel_id');
        var destination = getParameterByName('destination');
        filter_value(search_keyword,hotel_id,destination);

    });

    function filter_value(search_keyword,hotel_id,destination){
        $.post(ajax_url+"/ajax/ajax-search-results.php",
          {
            search_keyword : search_keyword,
            category       : category,
            accomodation   : accomodation,
            facility       : facility,
            city           : city,
            hotel_id       : hotel_id,
            destination    : destination
          },
          function (response){
            //console.log(response);
            if(response){
              $("#loader").hide();
              $('#search-results').html(response);
              $('.top').unbind('click',open_div);
              $('.top').bind('click',open_div);
            } 
          }
        );
    }


  /****************** Ajax to fetch room availability ***********************/
  $('.rooms_check').bind('click', room_prices);

  function room_prices(){
      $("#loader").show();
      var hotel_code = $(this).attr('hotel-code');
      var checkin = getParameterByName('checkin');
      var checkout = getParameterByName('checkout');
      var rooms = getParameterByName('rooms');
      var adults = getParameterByName('adults');
      var children = getParameterByName('children');
      var child_age = [];
      for(var i=0; i<=parseInt(children)-1; i++){
         child_age[i] = getParameterByName('child_age_'+i);
      }
      $.post(ajax_url+"/ajax/ajax-room-availability.php",
          {
            hotel_code  : hotel_code,
            checkin     : checkin,
            checkout    : checkout,
            rooms       : rooms,
            adults      : adults,
            children    : children,
            child_age   : child_age
          },
          function (response){
            console.log(response);
            if(response){
              $("#loader").hide();
              //$(this).parent('.search-result').find('.slidingDiv').html(response);
              $('.roomdetails_'+hotel_code).html(response);
            } 
          }
        );
  }


  

});
/****************** Form Validation ***********************/
  $('#home_search').submit(function() {
      var keyword = $('#search_keyword').val();
      var rooms = $('#rooms').val();
      var adults = $('#adults').val();
      var children = $('#children').val();
      var checkin = $('#checkin').val();
      var checkout  = $('#checkout').val();

      //alert(keyword);
      

      if(!keyword || !rooms || !adults || !children || !checkin || !checkout)  {
         //$('#p_error').html('Fill All the Field');
         alert('Fill All the Field');
         return false;
      }
  });
</script>


<script type="text/javascript" src="<?php echo get_template_directory_uri(); ?>/js/bootstrap-datetimepicker.js" charset="UTF-8"></script>
<!-- <script type="text/javascript" src="../js/locales/bootstrap-datetimepicker.fr.js" charset="UTF-8"></script> -->
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">

<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<script type="text/javascript">
  $(function() {
    $('#checkin').datepicker({
        language:  'fr',
        weekStart: 1,
        todayBtn:  1,
        autoclose: 1,
        todayHighlight: 1,
        startView: 2,
        minView: 2,
        forceParse: 0,
        minDate: '0',
        onSelect: function (selected) {
          var dt = new Date(selected);
          dt.setDate(dt.getDate() );
          $("#checkout").datepicker("option", "minDate", dt);
        }
    });

    $('#checkout').datepicker({
        language:  'fr',
        weekStart: 1,
        todayBtn:  1,
        autoclose: 1,
        todayHighlight: 1,
        startView: 2,
        minView: 2,
        forceParse: 0,
        minDate: '0',
        onSelect: function (selected) {
          var dt = new Date(selected);
          dt.setDate(dt.getDate() );
          $("#checkin").datepicker("option", "maxDate", dt);
        }
    });  
  });
</script>


<!-- swarup starts-->
<!-- slider js -->
    <script src="<?php echo get_template_directory_uri(); ?>/js/jssor.slider-21.1.6.mini.js" type="text/javascript"></script>
    <script type="text/javascript">
        jQuery(document).ready(function ($) {

            var jssor_1_SlideshowTransitions = [
              {$Duration:1200,x:0.3,$During:{$Left:[0.3,0.7]},$Easing:{$Left:$Jease$.$InCubic,$Opacity:$Jease$.$Linear},$Opacity:2},
              {$Duration:1200,x:-0.3,$SlideOut:true,$Easing:{$Left:$Jease$.$InCubic,$Opacity:$Jease$.$Linear},$Opacity:2},
              {$Duration:1200,x:-0.3,$During:{$Left:[0.3,0.7]},$Easing:{$Left:$Jease$.$InCubic,$Opacity:$Jease$.$Linear},$Opacity:2},
              {$Duration:1200,x:0.3,$SlideOut:true,$Easing:{$Left:$Jease$.$InCubic,$Opacity:$Jease$.$Linear},$Opacity:2},
              {$Duration:1200,y:0.3,$During:{$Top:[0.3,0.7]},$Easing:{$Top:$Jease$.$InCubic,$Opacity:$Jease$.$Linear},$Opacity:2},
              {$Duration:1200,y:-0.3,$SlideOut:true,$Easing:{$Top:$Jease$.$InCubic,$Opacity:$Jease$.$Linear},$Opacity:2},
              {$Duration:1200,y:-0.3,$During:{$Top:[0.3,0.7]},$Easing:{$Top:$Jease$.$InCubic,$Opacity:$Jease$.$Linear},$Opacity:2},
              {$Duration:1200,y:0.3,$SlideOut:true,$Easing:{$Top:$Jease$.$InCubic,$Opacity:$Jease$.$Linear},$Opacity:2},
              {$Duration:1200,x:0.3,$Cols:2,$During:{$Left:[0.3,0.7]},$ChessMode:{$Column:3},$Easing:{$Left:$Jease$.$InCubic,$Opacity:$Jease$.$Linear},$Opacity:2},
              {$Duration:1200,x:0.3,$Cols:2,$SlideOut:true,$ChessMode:{$Column:3},$Easing:{$Left:$Jease$.$InCubic,$Opacity:$Jease$.$Linear},$Opacity:2},
              {$Duration:1200,y:0.3,$Rows:2,$During:{$Top:[0.3,0.7]},$ChessMode:{$Row:12},$Easing:{$Top:$Jease$.$InCubic,$Opacity:$Jease$.$Linear},$Opacity:2},
              {$Duration:1200,y:0.3,$Rows:2,$SlideOut:true,$ChessMode:{$Row:12},$Easing:{$Top:$Jease$.$InCubic,$Opacity:$Jease$.$Linear},$Opacity:2},
              {$Duration:1200,y:0.3,$Cols:2,$During:{$Top:[0.3,0.7]},$ChessMode:{$Column:12},$Easing:{$Top:$Jease$.$InCubic,$Opacity:$Jease$.$Linear},$Opacity:2},
              {$Duration:1200,y:-0.3,$Cols:2,$SlideOut:true,$ChessMode:{$Column:12},$Easing:{$Top:$Jease$.$InCubic,$Opacity:$Jease$.$Linear},$Opacity:2},
              {$Duration:1200,x:0.3,$Rows:2,$During:{$Left:[0.3,0.7]},$ChessMode:{$Row:3},$Easing:{$Left:$Jease$.$InCubic,$Opacity:$Jease$.$Linear},$Opacity:2},
              {$Duration:1200,x:-0.3,$Rows:2,$SlideOut:true,$ChessMode:{$Row:3},$Easing:{$Left:$Jease$.$InCubic,$Opacity:$Jease$.$Linear},$Opacity:2},
              {$Duration:1200,x:0.3,y:0.3,$Cols:2,$Rows:2,$During:{$Left:[0.3,0.7],$Top:[0.3,0.7]},$ChessMode:{$Column:3,$Row:12},$Easing:{$Left:$Jease$.$InCubic,$Top:$Jease$.$InCubic,$Opacity:$Jease$.$Linear},$Opacity:2},
              {$Duration:1200,x:0.3,y:0.3,$Cols:2,$Rows:2,$During:{$Left:[0.3,0.7],$Top:[0.3,0.7]},$SlideOut:true,$ChessMode:{$Column:3,$Row:12},$Easing:{$Left:$Jease$.$InCubic,$Top:$Jease$.$InCubic,$Opacity:$Jease$.$Linear},$Opacity:2},
              {$Duration:1200,$Delay:20,$Clip:3,$Assembly:260,$Easing:{$Clip:$Jease$.$InCubic,$Opacity:$Jease$.$Linear},$Opacity:2},
              {$Duration:1200,$Delay:20,$Clip:3,$SlideOut:true,$Assembly:260,$Easing:{$Clip:$Jease$.$OutCubic,$Opacity:$Jease$.$Linear},$Opacity:2},
              {$Duration:1200,$Delay:20,$Clip:12,$Assembly:260,$Easing:{$Clip:$Jease$.$InCubic,$Opacity:$Jease$.$Linear},$Opacity:2},
              {$Duration:1200,$Delay:20,$Clip:12,$SlideOut:true,$Assembly:260,$Easing:{$Clip:$Jease$.$OutCubic,$Opacity:$Jease$.$Linear},$Opacity:2}
            ];

            var jssor_1_options = {
              $AutoPlay: true,
              $SlideshowOptions: {
                $Class: $JssorSlideshowRunner$,
                $Transitions: jssor_1_SlideshowTransitions,
                $TransitionsOrder: 1
              },
              $ArrowNavigatorOptions: {
                $Class: $JssorArrowNavigator$
              },
              $ThumbnailNavigatorOptions: {
                $Class: $JssorThumbnailNavigator$,
                $Cols: 10,
                $SpacingX: 8,
                $SpacingY: 8,
                $Align: 360
              }
            };

            var jssor_1_slider = new $JssorSlider$("jssor_1", jssor_1_options);

            /*responsive code begin*/
            /*you can remove responsive code if you don't want the slider scales while window resizing*/
            function ScaleSlider() {
                var refSize = jssor_1_slider.$Elmt.parentNode.clientWidth;
                if (refSize) {
                    refSize = Math.min(refSize, 800);
                    jssor_1_slider.$ScaleWidth(refSize);
                }
                else {
                    window.setTimeout(ScaleSlider, 30);
                }
            }
            ScaleSlider();
            $(window).bind("load", ScaleSlider);
            $(window).bind("resize", ScaleSlider);
            $(window).bind("orientationchange", ScaleSlider);
            /*responsive code end*/
        });
    </script>


<!-- slider js -->

<!-- accordion start -->

    <script type="text/javascript">
      $(document).ready(function() {
  $('a').tooltip({placement: 'top'});

  $( "#toggle1" ).click(function() {
      $("#widget-body1").slideToggle( "slow" );
      
    $('#toggle1').toggleClass(function() {
    if ($(this).is('.fa fa-chevron-down')) {
    return '.fa fa-chevron-up';
    } else {
    return '.fa fa-chevron-down';
    }
  })
 });  
 
   $( "#toggle2" ).click(function() {
      $("#widget-body2").slideToggle( "slow" );
    
    $('#toggle2').toggleClass(function() {
    if ($(this).is('.fa fa-chevron-down')) {
    return '.fa fa-chevron-up';
    } else {
    return '.fa fa-chevron-down';
    }
  })
 });

 $( "#toggle3" ).click(function() {
      $("#widget-body3").slideToggle( "slow" );
    
    $('#toggle3').toggleClass(function() {
    if ($(this).is('.fa fa-chevron-down')) {
    return '.fa fa-chevron-up';
    } else {
    return '.fa fa-chevron-down';
    }
  })
 }); 

  $( "#toggle4" ).click(function() {
      $("#widget-body4").slideToggle( "slow" );
    
    $('#toggle4').toggleClass(function() {
    if ($(this).is('.fa fa-chevron-down')) {
    return '.fa fa-chevron-up';
    } else {
    return '.fa fa-chevron-down';
    }
  })
 }); 

   $( "#toggle5" ).click(function() {
      $("#widget-body5").slideToggle( "slow" );
    
    $('#toggle5').toggleClass(function() {
    if ($(this).is('.fa fa-chevron-down')) {
    return '.fa fa-chevron-up';
    } else {
    return '.fa fa-chevron-down';
    }
  })
 }); 

    $( "#toggle6" ).click(function() {
      $("#widget-body6").slideToggle( "slow" );
    
    $('#toggle6').toggleClass(function() {
    if ($(this).is('.fa fa-chevron-down')) {
    return '.fa fa-chevron-up';
    } else {
    return '.fa fa-chevron-down';
    }
  })
 }); 

});
    </script>

 <!-- accordion start --> 


 


<!-- swarup ends-->
	
</body>
</html>