//**********************************************************************
// This script is used to manipulate the data content which appears
// on the single hotel promotion page.  Any page which uses this script
// must also include AjaxCommon.js, Analytics.js, and Promotion.js.
//**********************************************************************

$(function() {
	
	$("#hotelRatingImg").attr("src", pr_ratingImagePath + spr_starRating + ".gif");
	configureView();
	
	
	//Cookie tracking - Call this last so it does not affect the user experience	
	trackLandingView(spr_promoID);
	
	    
    
    $(".hotelTabLink").click(
        function(event){
            $("#hotelinformationTab").attr("src", pr_promoImagePathStatic + "aev_ppr_tab_" + $("#hotelinformationTab").attr("id").substring(0, $("#hotelinformationTab").attr("id").length-3) + "_o.gif");
            $("#hotelinformationTab").click();
    });    
})



function configureView() {
	$("#" + spr_view + "Tab").addClass("navSelected");
    $("#" + spr_view + "Tab").attr("src", pr_promoImagePathStatic + "aev_ppr_tab_" + spr_view + "_o.gif");
    $("#" + spr_view).css("display", "block");
    
    if (spr_view == "promotiondetails") {
    	showPromoView();
    }
}
