/* Javascript for hiding main image cell and placing it as a background image */
jQuery(window).bind("load",function(){var homeGloryShot = new HomeGloryShot();});



function HomeGloryShot()
{
	this._HomeGloryShot();
}
HomeGloryShot.prototype = 
{
	_HomeGloryShot: function()
	{	
		var vw_infoCenterswf = document.getElementById("vw_infoCenterswf");
		// Glory shot image container reference
		var gloryImage = jQuery("#infoCenterImage");
		// Condition:  link doesn't exist
		if (gloryImage.children("img").length == 1) {
			var image = gloryImage.children("img").attr("src");
		}
		// Condition: link exists
		else {
			var image = gloryImage.children("a").children("img").attr("src");
			if (!editMode) {
				var gloryLink = gloryImage.children("a").attr("href");
				jQuery("#firstRowCol1").click(function(){
					window.location = gloryLink;
				}).css("cursor", "pointer");
			}
		}
		var WSMwrapper = document.getElementById("guardedContent_0_wrapper");
		if(WSMwrapper)/* if edit mode */
		{
			if (vw_infoCenterswf == null)
			/*not flash*/{																	
				jQuery("#vw_infoCenter_wrapper").children(".wsm_innerBorder").children("img").css("display","none");
				image = jQuery("#vw_infoCenter_wrapper").children(".wsm_innerBorder").children("img").attr("src");
				jQuery("#firstRow").css("background", "url("+image+") no-repeat");
				
				jQuery("#firstRowCol1").css("width","200px").css("height", "300px");
				jQuery("div#vw_infoCenter_wrapper .wsm_tip").css("width","430px").css("height", "370px").css("padding-right", "25px"); /* editable border for main  */

				jQuery("#vw_infoCenter_wrapper .wsm_innerBorder").css("width","430px").css("padding-right","0px").css("height", "370px");
				jQuery("#infoCenterImage").css("width","430px").css("height", "370px");
			}	
			else{ 
			/*flash*/
				jQuery("#firstRowCol1").css("display","none");
				jQuery("#quickLinksBlock").css("display","none");
				jQuery("#vw_infoCenter_wrapper .wsm_innerBorder").css("width","656px").css("padding-right","0px");
			}
		}
		else /*not edit mode*/
		{
			if (vw_infoCenterswf == null)
			{ /*not flash*/
				jQuery("#firstRow").css("background", "url("+image+") no-repeat");
				jQuery("#infoCenterImage").css("position","absolute").css("top", "-1000px");
			}
			else{ 
			/*flash*/
				jQuery("#firstRowCol1").css("display","none");
				jQuery("#quickLinksBlock").css("display","none");
			}
		}
	}
};

/* For models Flash asset */
function openModelNav(){
	jQuery('#modelNav').css('height', '225px');
};
function closeModelNav(){
	jQuery('#modelNav').css('height', '38px');
};
