$(function(){
    $('#description p:first').css('font-size','14px').css("color","#a2a2a2");
    Cufon.replace('#description p:first', {
        fontFamily: 'Helvetica_Normal'
    });
    Cufon.replace('h1,h2,h2,h3,h4,h5,#fbFeedsSpan', {
        fontFamily: 'Helvetica_Normal'
    });
    Cufon.replace('.reservationContactInfo', {
        fontFamily: 'Helvetica_Normal'
    });
    Cufon.replace('div.snipHeader,div.snipHeaderPage',{
        fontFamily: 'Helvetica Roman'
    });
    $("#formEmail img").click(function(){
        if($("#joinEmail").val()!='Email Address'){
            $("#formEmail").submit();
        }
        else{
            
        }
    });
    $('.lightbox').lightBox();
    
    var currentTime = new Date()
    var month = currentTime.getMonth() + 1
    var day = currentTime.getDate()
    var year = currentTime.getFullYear()

    var dateNow =  day + "/" + month + "/" + year;
    

    $( "#reservationArriveDate" ).datepicker({
        minDate: dateNow,
        dateFormat: 'dd/mm/yy'
    });
    $("#reservationArriveIcon").click(function(){       
        $("#reservationArriveDate").focus();
    });
    $("#reservationArriveDate").change(function(){
        var mindate = $( "#reservationArriveDate" ).val();
        $("#reservationDepartDate").val('');
        $( "#reservationDepartDate" ).datepicker("destroy");
        $( "#reservationDepartDate" ).datepicker({
            minDate: mindate,
            dateFormat: 'dd/mm/yy'
        });
    });
    //$( "#reservationDepartDate" ).datepicker();
    $("#reservationDepartIcon").click(function(){        
        $("#reservationDepartDate").focus();
    });
    $(".level1").hover(
        function () {
            $(this).css("color","#f6d0d9");
        },
        function () {
            $(this).css("color","#FFFFFF");
        });
    $(".level2 a").hover(
        function () {
            $(this).css("color","#D21243");
        },
        function () {
            $(this).css("color","#999999");
        });

    $("#leftContent input").focus(function(){
        if (($(this).val()=='Email address') || ($(this).val()=='Search')){
            $(this).val('');
        }

    });
    $("#leftContent input").blur(function(){
        if (($(this).val()=='') || ($(this).val()=='Email Address') || ($(this).val()=='Search')){
            if($(this).attr('id')=='joinEmail')
                $(this).val('Email address');
            else if($(this).attr('id')=='searchSiteInput')
                $(this).val('Search');
        }
    });
    $("#FormButton_Subscribe").click(function(){
        if($("#FormValue_EmailAddress").val()=="Email address"){
            return false;
        } 
        else{
            return true;
        }
    
    });
    
    $("#headerLeftLogo").click(function(){        
        window.location = "/";
    });
    

});
$("#formSearch img").click(function(){
    if($("#searchSiteInput").val()!='Search'){
        $("#formSearch").submit();
    }
    else{

}

});
$("#navInner li:last-child a").css("width","107px");
$("#navInner li:last-child ul").css("left","-23px");
$('#fbFeeds').fbWall({
    id:'203321129712942',
    accessToken:'206158599425293|2c128ca82d86347ff253de70.1-1503181832|72rHkw0_ei4vpeTZlIb4hS_C3Ok',
    showGuestEntries:false,
    showComments:false,
    max:3,
    timeConversion:12
});


function popUp(page,PWidth,PHeight,id) {
    eval("designerwiz"+id+"=window.open('"+page+"','designerwiz1','toolbar=0,scrollbars=0,location=0,status=0,menubars=0,resizable=0,width="+PWidth+",height="+PHeight+"')")
    eval;
    ("wiz"+id+".window.moveTo((screen.width/2)-(PWidth/2),(screen.height/2)-(PHeight/2))")
}

