function mainmenu(){
//$(" #nav ul ").css({display: "none"}); // Opera Fix
$(".trigger").hover(function(){
		$(this).toggleClass("selected");
		$(this).find('ul:first').ClearTypeFadeIn({ speed: 500 });
		},function(){
		$(this).toggleClass("selected");
		$(this).find('ul:first').hide("fast");
});
}

function searchshow(){
$("#togglesearch").click(function(){
	$("#searchformtoggle").toggle("normal");
});
}

function totopshow(){
$("#toggletotop").hover(function(){
	$("#totoptoggle").show("normal");
	},function(){
	$("#totoptoggle").hide("normal");									 
});
}

function hovertr(){
$(".prodrow").hover(function(){
		$(this).highlightFade();
		},function(){
		$(this).css({backgroundColor: '#E8F0F4'});
});
$(".prodrow").hover(function(){
		$("a:eq(1)", this).css({fontWeight: 'bold'});
		$("a:eq(1)", this).css({letterSpacing: '-1px'});
		},function(){
		$("a:eq(1)", this).css({fontWeight: 'normal'});
		$("a:eq(1)", this).css({letterSpacing: 'normal'});
});
$(".prodrowodd").hover(function(){
		$(this).highlightFade();
		},function(){
		$(this).css({backgroundColor: '#F4F9FE'});
});
$(".prodrowodd").hover(function(){
		$("a:eq(1)", this).css({fontWeight: 'bold'});
		$("a:eq(1)", this).css({letterSpacing: '-1px'});
		},function(){
		$("a:eq(1)", this).css({fontWeight: 'normal'});
		$("a:eq(1)", this).css({letterSpacing: 'normal'});
});
}

function externalLinks() {
 if (!document.getElementsByTagName) return;
 var anchors = document.getElementsByTagName("a");
 for (var i=0; i<anchors.length; i++) {
   var anchor = anchors[i];
   if (anchor.getAttribute("href") &&
	   anchor.getAttribute("rel") == "external")
	 anchor.target = "_blank";
 }
}

$(document).ready(function(){					
	mainmenu(),searchshow(),totopshow(),hovertr(),externalLinks(),$.localScroll();
});

