function toggleTextOut(e,txtval) {
	if(e.value=="") e.value = txtval;

}
function toggleTextIn(e,txtval) {
	if(e.value==txtval) e.value="";
	else e.select();
}
$(document).ready(function(){
	if($(".nav-main li.current").attr("class") == "current"){
		var curSrc = $(".nav-main li.current a").find("span img").attr("src").replace(".gif","-on.gif");				   
		$(".nav-main li.current a").find("span img").attr("src",curSrc);
	}
	
	
	$(".nav-main li").not(".current").find("a").hover(
			function(){ 
			  if($(this).find("span img").attr("src")) { 
				if($(this).find("span img").attr("src").indexOf("-on") == -1) {
					var newSrc = $(this).find("span img").attr("src").replace(".gif","-on.gif");
					$(this).find("span img").attr("src",newSrc);
				}
			}
				
		},
		function(){
				
			if($(this).find("span img").attr("src")) {
				if($(this).find("span img").attr("src").indexOf(".gif") != -1) {
					var oldSrc = $(this).find("span img").attr("src").replace("-on.gif",".gif");
					$(this).find("span img").attr("src",oldSrc);
				}
		    }
				
		});
	
	
	$(".dropdown").hover(function(){
		 var vv = $('a', $(this).parent());
		 if($(vv).parent().hasClass('current')) {
			var oldSrc = $(vv).find("span img").attr("src").replace(".gif",".gif");
			$(vv).find("span img").attr("src",oldSrc);
		 } else {
		 	var newSrc = $(vv).find("span img").attr("src").replace(".gif","-on.gif");
			$(vv).find("span img").attr("src",newSrc);	
		 }
	}, function(){
		var vv = $('a', $(this).parent());
		if($(vv).parent().hasClass('current')) {
			 var newSrc = $(vv).find("span img").attr("src").replace("-on.gif","-on.gif");
			$(vv).find("span img").attr("src",newSrc);	
		} else {
			var oldSrc = $(vv).find("span img").attr("src").replace("-on.gif",".gif");
			$(vv).find("span img").attr("src",oldSrc);
		}
	})
	
			

	$(".swap").hover(
			function(){
				if($(this).attr("src").indexOf("-on") == -1) {
				var newSrc = $(this).attr("src").replace(".gif","-on.gif");
				$(this).attr("src",newSrc);
				}},
				function(){
				if($(this).attr("src").indexOf(".gif") != -1) {
				var oldSrc = $(this).attr("src").replace("-on.gif",".gif");
				$(this).attr("src",oldSrc);
				}
				});
	
	 $(".nav-main li").hover(
		  function () {
			 $(this).addClass("hover");
			 $(".nav-main li li").removeClass("hover");
		  }, 
		  function () {
			 $(this).removeClass("hover");
		  }
	);
	$(".block").hover(
		  function () {
			 $(this).addClass("show");
		  }, 
		  function () {
			 $(this).removeClass("show");
		  }
	);

	$(".list-solutions li:odd").css("background-color", "#f9f9f9");	
	
	$(".btn-close a").toggle(
      function () {
        $(".nav-footer").css("display", "none");
		//$(".nav-footer").hide("slow");
		$(".btn-close a").addClass("open");
      },
      function () {
         //$(".nav-footer").css("display", "block");
		 $(".nav-footer").show("slow");
		 $(".btn-close a").removeClass("open");
      }
    );
	
	//Default Action
	$(".dropdown .tab-content").hide(); //Hide all content
	$(".dropdown ul.nav-sub li:first").addClass("active").show(); //Activate first tab
	$(".dropdown .tab-content:first").show(); //Show first tab content

	$(".dropdown ul.nav-sub li").mouseover(function() {
		$(".dropdown ul.nav-sub li").removeClass("active"); //Remove any "active" class
		$(this).addClass("active"); //Add "active" class to selected tab
		$(".dropdown .tab-content").hide(); //Hide all tab content	
		var activeTab = $(this).find("a").attr("accesskey"); //Find the rel attribute value to identify the active tab + content
		$(activeTab).fadeIn(); //Fade in the active content		
		return false;
	});

});
function equalHeight(group) {
	tallest = 0;
	group.each(function() {
		thisHeight = $(this).height();
		if(thisHeight > tallest) {
			tallest = thisHeight;
		}
	});
	group.height(tallest);
}
/*
CSS Browser Selector v0.2.7
Rafael Lima (http://rafael.adm.br)
http://rafael.adm.br/css_browser_selector
License: http://creativecommons.org/licenses/by/2.5/
Contributors: http://rafael.adm.br/css_browser_selector#contributors
*/
var css_browser_selector = function() {var ua=navigator.userAgent.toLowerCase(),is=function(t){return ua.indexOf(t) != -1;},h=document.getElementsByTagName('html')[0],b=(!(/opera|webtv/i.test(ua))&&/msie (\d)/.test(ua))?('ie ie'+RegExp.$1):is('firefox/2')?'gecko ff2':is('firefox/3')?'gecko ff3':is('gecko/')?'gecko':is('opera/9')?'opera opera9':/opera (\d)/.test(ua)?'opera opera'+RegExp.$1:is('konqueror')?'konqueror':is('applewebkit/')?'webkit safari':is('mozilla/')?'gecko':'',os=(is('x11')||is('linux'))?' linux':is('mac')?' mac':is('win')?' win':'';var c=b+os+' js'; h.className += h.className?' '+c:c;}();

