$(document).ready(function(){	
															
	$('ul.swNavMenu, ul #swNavHelp, ul #swNavSocial, ul #swNavLogChoice').superfish({ 
		delay:       50,                 //Delay on mouseout 
		animation:   {height:'show'},  	//Fade-in and slide-down animation 
		speed: 50,	         			//Faster animation speed 
		autoArrows:  false,            	//Disable generation of arrow mark-up 
		dropShadows: false,             //Disable drop shadows 
		disableHI: true					//Disable Hover Intent detection
	});									
	
	/*Slide swNavFlag Down*/	
	$("#swNavFlag").animate({top:"0px"},1000, 
		function(){$("#swNavSearchBar").animate({height:"42px"},555)
	});	

	if (jQuery.browser.safari){
		$("#swNavFlag").css("cursor","default");
		
		$("#swNavFlag").animate({top:"0px"}, 0, 
			function(){$("#swNavSearchBar").animate({height:"43px"},555)
		});	
	}
	
	if (jQuery.browser.msie){																													
		if ((jQuery.browser.version)=="6.0"){			
			/*Hover fix for IE6*/
			$(".swNavMenu li").hover(			
				function(){$(this).addClass("swNavHover")}, 
				function(){$(this).removeClass("swNavHover")}
			);			
		}
		else{
			try {
				var isInstalled = window.external.IsSearchProviderInstalled('http://search.pch.com/');	
				if(isInstalled > 0){									
				//if (window.external.IsSearchProviderInstalled('http://search.pch.com/'))
				//{
					$("#swNavSrcAdd").addClass("swNavHide");   
					$(".swNavTxt").addClass("swNavPush");
				}				
					
			} catch (e) { 
				//alert("Sorry, this feature doesn't work for this browser.");
				$("#swNavSrcAdd").addClass("swNavHide");   
				$(".swNavTxt").addClass("swNavPush");
			}							
		}
	}
		    	
	$("#swNavbarClose").click(function(){				   
		rollUp();								   								   
	});
	
	$("#swNavSrcAdd").click(function(){	
		return addProvider();
	});
	
	$("#swNavFlag").click(function(){						   
		bookmark('PCH Search & Win','http://search.pch.com/?src=pchbookmark');			
	});
	
	$(".ruleLink").click(function(){
		var idAttr = $(this).attr("id");								   										   		
		openit2('/'+idAttr+'','800px','400px');
	});	
});

<!-- Closes the S&W browser search bar -->
function rollUp(){
	$("#swNavSearchBar").slideUp("normal",function(){
		document.searchForm.q.focus();		
	});
}

function addProvider() {
	try {		
		window.external.AddSearchProvider("http://"+document.domain+"/shared/navBar/opensearch.xml");		
	} catch(e) {
		alert("Sorry, this feature doesn't work for this browser.");
	}
        return false;
}

function bookmark(title,url){	
	if (jQuery.browser.safari){
		alert("Sorry, this feature doesn't work for this browser.");
	}
	
	if(document.all)// ie
	{
		try{
			window.external.AddFavorite(url, title);
		} catch(e){
			alert("Sorry, this feature doesn't work for this browser.")	;
		}
	}	
	else if(window.opera && window.print){ // opera
		var elem = document.createElement('a');
		elem.setAttribute('href',url);
		elem.setAttribute('title',title);
		elem.setAttribute('rel','sidebar');
		elem.click();
	}
	else if (window.sidebar) // firefox
	    alert("Dear Firefox user, please press CTRL+D to Bookmark this page!");
}


