$(document).ready( function() {
  
    var dates = $( "#check-in, #check-out" ).datepicker({
      defaultDate: "+1w",
      changeMonth: true,
      numberOfMonths: 2,
    });
    
$("ul.dropdown li ul").hide();
    var config = {    
         sensitivity: 3, // number = sensitivity threshold (must be 1 or higher)    
         interval: 100,  // number = milliseconds for onMouseOver polling interval    
         over: doOpen,   // function = onMouseOver callback (REQUIRED)    
         timeout: 200,   // number = milliseconds delay before onMouseOut    
         out: doClose    // function = onMouseOut callback (REQUIRED)    
    };
    
    function doOpen() {
        $(this).addClass("hover");
        $('ul:first',this).slideDown('fast');
    }
 
    function doClose() {
        $(this).removeClass("hover");
        $('ul:first',this).hide();
    }

    $("ul.dropdown li").hoverIntent(config);
    $("ul.dropdown li:has(ul)").addClass("hasChild");

    $("#top_nav .hasChild").find("a:first").append($('<span>').addClass('arrow'));
     $("ul.dropdown li ul li:has(ul)").find("a:first").append(" &raquo; ");





    $('#slider').nivoSlider({
      effect:'fade',
      animSpeed:700,
      pauseTime:3800
    });

    $("p.iframebox a").colorbox({
      width:500,
      height:500,
      iframe:true
    });

    $("p.iframevid a").colorbox({iframe:true, innerWidth:425, innerHeight:344});


    // $(".bookingbox").colorbox({
    //   innerWidth:701,
    //   innerHeight:342,
    //   inline:true,
    //   href:"#booking_form_wrapper"
    // });
  
    $(".colorbox a").colorbox();
    $(".colorbox").colorbox();

    $('#coda_slider').codaSlider({
      autoHeight:false,
      dynamicArrowLeftText:'',
      dynamicArrowRightText:'',
      dynamicTabsAlign:'left',
      panelTitleSelector:'h3.title',
      dynamicTabsPosition:'bottom'
    });

});

