function toggleTextOut(e,txtval) {
	if(e.value=="") e.value = txtval;
}
function toggleTextIn(e,txtval) {
	if(e.value==txtval) e.value="";
	else e.select();
}

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;}();

$(document).ready(function(){

$(".swap").hover(
			function(){
				if($(this).attr("src").indexOf("-on.") == -1) {
					var newSrc = $(this).attr("src");
					newSrc = (newSrc.replace(/.jpg|.gif|.png/, '-on' + newSrc.substr(newSrc.length - 4)));
					$(this).attr("src",newSrc);
				}},
				function(){
					if($(this).attr("src").indexOf("-on.") > 0) {
						var oldSrc = $(this).attr("src").replace('-on.', '.');
						$(this).attr("src",oldSrc);
					}
				});
	
	
	//equalHeight($("#content, .sidebar"));


	$("#nav-top li").hover(function(){
		$(this).find('ul').show();													  
	},
	function(){
		$(this).find('ul').hide();	
	}
	);


	$('.spot-content:first').show();
	$('#spotlight .spot-nav a:first').addClass('current');
	
	$('#spotlight .spot-nav a').click(function(){
	// For current class
	$('#spotlight .spot-nav a').removeClass('current');
	$(this).addClass('current');
	
	// Show/side content
	$('.spot-content').hide();
	$('.wrap-spot-content').find('#'+$(this).attr('name')).fadeIn();
												   
	});
	
});




