/* Designed by WEB CHANNEL www.webchannel.ae */

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(){
	
	$(".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);
		};
		});
	$('#navigation ul').hide();
	
	$("#navigation li").hover(
	function()
	{
		$(this).children('ul').show();
		$(this).addClass('selected');
		$(this).children('ul').stop().animate({'top': 28}, {queue: false});
		$(this).children('ul').css({'z-index': '9' });
		$(this).height(65);
	}, function()
	{
		$(this).children('ul').hide();
		$(this).removeClass('selected');
		$(this).children('ul').stop().animate({'top': 20}, 500);
		$(this).height(30);
		$(this).children('ul').css({
			'z-index': '-1'
		})
	});
	
	$("#navigation li li").hover(
	function()
	{
		$(this).children('ul').show();
		$(this).addClass('selected');
		$(this).children('ul').stop().animate({'top': 20}, {queue: false});
		$(this).children('ul').css({'z-index': '9' });
		$(this).height(30);
	}, function()
	{
		$(this).children('ul').hide();
		$(this).removeClass('selected');
		$(this).children('ul').stop().animate({'top': 22}, 500);
		$(this).height(30);
		$(this).children('ul').css({
			'z-index': '-1'
		})
	});
	
	
	$('#box-outer #box').hover(function(){
					$(this).find('.more').hide();						   
					$(this).stop().animate({top:'0px'},{queue:false,duration:800});
				}, function() {
					$(this).stop().animate({top:'280px'},{queue:false,duration:800});
					
					setTimeout( function() {
						$('#box').find('.more').show();	
						
						} , 1000);

					
				});
	
	
	$('#navigation li a').click(function() {
	//spotLoad(); 
	})
	


});

$(window).ready(function() {
			spotLoad(); 			 
})


function spotLoad() {
	$('#spotlight img.spot').hide();
	setTimeout( function() { $('#spotlight img.spot').fadeIn("slow") } , 10);
	}


	


/*
CSS Browser Selector v0.3.2
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
*/
function css_browser_selector(u){var ua = u.toLowerCase(),is=function(t){return ua.indexOf(t)>-1;},g='gecko',w='webkit',s='safari',h=document.getElementsByTagName('html')[0],b=[(!(/opera|webtv/i.test(ua))&&/msie\s(\d)/.test(ua))?('ie ie'+RegExp.$1):is('firefox/2')?g+' ff2':is('firefox/3')?g+' ff3':is('gecko/')?g:/opera(\s|\/)(\d+)/.test(ua)?'opera opera'+RegExp.$2:is('konqueror')?'konqueror':is('chrome')?w+' chrome':is('applewebkit/')?w+' '+s+(/version\/(\d+)/.test(ua)?' '+s+RegExp.$1:''):is('mozilla/')?g:'',is('j2me')?'mobile':is('iphone')?'iphone':is('ipod')?'ipod':is('mac')?'mac':is('darwin')?'mac':is('webtv')?'webtv':is('win')?'win':is('freebsd')?'freebsd':(is('x11')||is('linux'))?'linux':'','js']; c = b.join(' '); h.className += ' '+c; return c;}; css_browser_selector(navigator.userAgent);


