
		
	    $(function(){  
				   
			//marina toggle radio button
			var radioButton = $('#radioCallout a');
			if(radioButton[0]){
				radioButton.click(function() {
					//radioButton.css("background-image","url(/siteassets/images/radio-callout-pause.png");
					radioButton.toggleClass("pause");
				});
			}
				   
				   
			//header h1 tabs
			$(".jquery-header-tab").each(function(){

				var sectionID=$("body").attr("class");
				var bgimage="bg_subhead.jpg";
				var restoreimage="restore-tab.png";
				if (sectionID=="marina"){bgimage="bg_subhead_marina.jpg"};
				if (sectionID=="marina"){restoreimage="restore-tab_marina.png"};
	

				//attach the shadow and restore tab
				$(this).prepend('<div style="position:absolute;z-index:10;top:291px;left:0;width:950px;height:16px;"><img src="/siteassets/images/shadow-line.png" width="950" height="16"></div>');
				$(this).prepend('<div style="cursor:pointer;position:absolute;z-index:11;visibility:hidden;top:281px;left:0px;width:61px;height:26px;" id="restoreTab"><img src="/siteassets/images/' + restoreimage + '" width="61" height="26"></div>');
				
				jQuery.easing.def = "easeOutBack";
				
				//set up the tab
				var e=$("h1", this);
				var imgHeight=$("h1 img",this).attr("height");
				var tHeight=307; //subheader element height
				var pTop=26;
				var pLeft=23;
				var pBottom=16;
				var yUp=tHeight-pBottom-pTop-imgHeight;
				var yDown=tHeight;
				
				
				$(e).wrap('<div id="mainTab" style="position:absolute;height:227px;visibility:hidden;left:48px;top:' + yDown + 'px;background: transparent url(../siteassets/images/bkgd/' + bgimage + ') no-repeat top left;padding:' + pTop + 'px 0 ' + pBottom + 'px ' + pLeft + 'px;width:371px;"></div>');
				$(e).css('visibility','visible');
				$(e).parent().prepend('<div id="closeHeaderTab"><div>');
				$("#closeHeaderTab").click(function(){
					$(this).parent().css("top",yDown);
					$(this).css("visibility","hidden");
					$("#restoreTab").css("visibility","visible");
				});
				$("#restoreTab").click(function(){
					$(this).css("visibility","hidden");
					$("#closeHeaderTab").css("visibility","visible");
					$("#mainTab").css("top",yUp);
				});
			
				
				$(e).parent().css('visibility','visible').animate({top:yUp},1000);
			});
   		});
	


