jQuery.noConflict();
jQuery(document).ready(function() {

    if (jQuery('#ctl00_cp1_ucSearchPanel1_txtCheckInDate').length > 0) {
        jQuery('#ctl00_cp1_ucSearchPanel1_txtCheckInDate').datepicker();
    }
    if (jQuery('#ctl00_ucSearchPanel3_txtCheckInDate').length > 0) {
        jQuery('#ctl00_ucSearchPanel3_txtCheckInDate').datepicker();
       
    }

    //hack for hotel listing pages
    if (jQuery('#ctl00_ucSearchPanel1_txtCheckInDate').length > 0) {
        jQuery('#ctl00_ucSearchPanel1_txtCheckInDate').datepicker();
    }

    if (jQuery('#ctl00_cp1_UcSearchRefine1_txtCheckInDate').length > 0) {
        jQuery('#ctl00_cp1_UcSearchRefine1_txtCheckInDate').datepicker();
    }

    jQuery("#date_picker").click(function() {

        if (jQuery('#ctl00_cp1_ucSearchPanel1_txtCheckInDate').length > 0) {
            jQuery('#ctl00_cp1_ucSearchPanel1_txtCheckInDate').focus();
            jQuery('#ctl00_cp1_ucSearchPanel1_txtCheckInDate').click();
        }
        else if (jQuery('#ctl00_ucSearchPanel3_txtCheckInDate').length > 0) {
        jQuery('#ctl00_ucSearchPanel3_txtCheckInDate').focus();
        jQuery('#ctl00_ucSearchPanel3_txtCheckInDate').click();
        }
        else if (jQuery('#ctl00_cp1_ucSearchPanel1_txtCheckInDate').length > 0) {
            jQuery('#ctl00_cp1_ucSearchPanel1_txtCheckInDate').focus();
            jQuery('#ctl00_cp1_ucSearchPanel1_txtCheckInDate').click();
        }
        else {
            jQuery('#ctl00_cp1_UcSearchRefine1_txtCheckInDate').focus();
            jQuery('#ctl00_cp1_UcSearchRefine1_txtCheckInDate').click();
        }
    });


    //    if (jQuery('#arrival_date').length > 0) {
    //        jQuery('#arrival_date').datepicker();
    //    }
    //    jQuery("#arrival_date_picker").click(function() {
    //        jQuery('#arrival_date').focus();
    //        jQuery('#arrival_date').click();
    //    });


    if (jQuery('#ctl00_cp1_ucTransferAvail1_txtTransferDate2').length > 0) {
        jQuery('#ctl00_cp1_ucTransferAvail1_txtTransferDate2').datepicker();
    }

    jQuery("#arrival_date_picker").click(function() {
        jQuery('#ctl00_cp1_ucTransferAvail1_txtTransferDate2').focus();
        jQuery('#ctl00_cp1_ucTransferAvail1_txtTransferDate2').click();
    });


    //    if (jQuery('#departure_date').length > 0)
    //        jQuery('#departure_date').datepicker();

    //    jQuery("#departure_date_picker").click(function() {
    //        jQuery('#departure_date').focus();
    //        jQuery('#departure_date').click();
    //    });

    //    if (jQuery('#ctl00_cp1_ucTransferAvail1_txtReturnDate2').length > 0) {
    //        jQuery('#ctl00_cp1_ucTransferAvail1_txtReturnDate2').datepicker();
    //    }

    //    jQuery("#departure_date_picker").click(function() {
    //        jQuery('#ctl00_cp1_ucTransferAvail1_txtReturnDate2').focus();
    //        jQuery('#ctl00_cp1_ucTransferAvail1_txtReturnDate2').click();
    //    });     



    jQuery("#featured-link-1").mouseover(function() {
        jQuery("#featured-image-1").css("display", "block");
        jQuery("#featured-image-2").css("display", "none");
        jQuery("#featured-image-3").css("display", "none");
        jQuery("#featured-link-1").addClass("highlight");
        jQuery("#featured-link-2").removeClass("highlight");
        jQuery("#featured-link-3").removeClass("highlight");
    });
    jQuery("#featured-link-2").mouseover(function() {
        jQuery("#featured-image-1").css("display", "none");
        jQuery("#featured-image-2").css("display", "block");
        jQuery("#featured-image-3").css("display", "none");
        jQuery("#featured-link-1").removeClass("highlight");
        jQuery("#featured-link-2").addClass("highlight");
        jQuery("#featured-link-3").removeClass("highlight");
    });
    jQuery("#featured-link-3").mouseover(function() {
        jQuery("#featured-image-1").css("display", "none");
        jQuery("#featured-image-2").css("display", "none");
        jQuery("#featured-image-3").css("display", "block");
        jQuery("#featured-link-1").removeClass("highlight");
        jQuery("#featured-link-2").removeClass("highlight");
        jQuery("#featured-link-3").addClass("highlight");
    });
    jQuery("#photos").click(function() {
        jQuery("#hotel-gallery").css("height", "312px");
        jQuery("#hotel-gallery-photo").css("display", "block");
        jQuery("#hotel-gallery-video").css("display", "none");
        jQuery("#photos").addClass("photos-on");
        jQuery("#videos").removeClass("videos-on");
    });
    jQuery("#videos").click(function() {
        jQuery("#hotel-gallery").css("height", "448px");
        jQuery("#hotel-gallery-video").css("display", "block");
        jQuery("#hotel-gallery-photo").css("display", "none");
        jQuery("#videos").addClass("videos-on");
        jQuery("#photos").removeClass("photos-on");
    });
    jQuery(".thumb").click(function() {
        //Get the id of this clicked item
        pos = this.id;
        jQuery(".large-image").css("display", "none");
        jQuery("#large-" + pos).css("display", "block");
    });

    jQuery("#logo a, #right-column #offers #star,#middle-column-large #hotel-gallery ul #photos,#middle-column-large #hotel-gallery ul #videos").pngfix();



});