/******* GA extra *******/
$("a[href^='http']").click(function(){
	if(this.href.indexOf(document.domain)<0){ // if changing domain 
		if(this.href.indexOf('.primevisibility.com')<0){ // if not a subdomain
			_gaq.push(['_trackEvent', 'External Link', this.href, location.href]);
		}
	}
});


/******* nav rollover *******/
$("#top_nav img").hover(
	function(){
		var t = $(this).attr("src");
		if(t.indexOf("-ro.png")<0){
			t = t.replace(".png","-ro.png");
		}
		$(this).attr("src", t);
	},
	function(){
		var t = $(this).attr("src");
		t = t.replace("-ro.png",".png");
		$(this).attr("src", t);
	}
);


/******* from blue sky *******/
function validate1()
{
var isValid = true;
var isNewsletterSelected = true;
var errorString = '';
var x = document.OptinForm1;
if (x.field6.value == "")
{
errorString = errorString + "First Name\n" ;
isValid = false;
}
if (x.UEmail.value== "")
{ 
errorString = errorString + "Email Address. \n ";
isValid = false;
}
else {
if (x.UEmail.value.indexOf("@") == -1 || x.UEmail.value.indexOf(".") == -1)
{
errorString = errorString + 'Invalid email address.';
isValid = false;
}
}

if (isValid == true && isNewsletterSelected == true)
{ 
x.submit.disabled = true;
return true;  
} 
else 
{ 
if (isNewsletterSelected == false)
{
errorString = errorString +"----------------------\nPlease select at least one subscription";  
}
alert("Following fields are required:\n\n"+ errorString);  return false; }  
}
