/*

//color trans code:
(function(jQuery){jQuery.each(['backgroundColor','borderBottomColor','borderLeftColor','borderRightColor','borderTopColor','color','outlineColor'],function(i,attr){jQuery.fx.step[attr]=function(fx){if(fx.state==0){fx.start=getColor(fx.elem,attr);fx.end=getRGB(fx.end);}
fx.elem.style[attr]="rgb("+[Math.max(Math.min(parseInt((fx.pos*(fx.end[0]-fx.start[0]))+fx.start[0]),255),0),Math.max(Math.min(parseInt((fx.pos*(fx.end[1]-fx.start[1]))+fx.start[1]),255),0),Math.max(Math.min(parseInt((fx.pos*(fx.end[2]-fx.start[2]))+fx.start[2]),255),0)].join(",")+")";}});function getRGB(color){var result;if(color&&color.constructor==Array&&color.length==3)
return color;if(result=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(color))
return[parseInt(result[1]),parseInt(result[2]),parseInt(result[3])];if(result=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(color))
return[parseFloat(result[1])*2.55,parseFloat(result[2])*2.55,parseFloat(result[3])*2.55];if(result=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(color))
return[parseInt(result[1],16),parseInt(result[2],16),parseInt(result[3],16)];if(result=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(color))
return[parseInt(result[1]+result[1],16),parseInt(result[2]+result[2],16),parseInt(result[3]+result[3],16)];}
function getColor(elem,attr){var color;do{color=jQuery.curCSS(elem,attr);if(color!=''&&color!='transparent'||jQuery.nodeName(elem,"body"))
break;attr="backgroundColor";}while(elem=elem.parentNode);return getRGB(color);};})(jQuery);

$(document).ready(function(){
if($('.promo-holder').length>0){
var chFrame=function(src){
if(typeof(src) != 'object'){
	if($('.promo-text-white-frame li.hv').length>0)return;
	src = $('.promo-text-white-frame li.a').next();
}
if(src.length<1)src=$('.promo-text-white-frame li:first');
if($(src).hasClass('a'))return;
$('.promo-text-white-frame li').stop(true,true).css({color:'#000000'});
var tli = $(src);
$('.promo-hl-strip').stop(true,false);
$('.promo-text-white-frame li.a').removeClass('a');
tli.addClass('a');
tli.animate({color:'#ffffff'},400);
$('.promo-hl-strip').animate({top:(44*($('.promo-text-white-frame li').index(tli)))+'px'},200,
function(){
$('.promo-title h1').html(tli.html());
$('.promo-text-frame p, .promo-text-frame ul[id]').hide();
var tid = tli.attr('id').substring(4);
$('#promo-para-'+tid).show();
$('.promo-picture').css({backgroundImage:'url(/templates/gravitant/images/img'+tid+'.png)'});
});
};
$(document).ready(function(){
$('.promo-text-white-frame li').eq(0).css({color:'#ffffff'});
$('.promo-text-white-frame li').hover(function(){$(this).addClass('hv');},function(){$(this).removeClass('hv');}).
mouseenter(function(){chFrame(this);});
setInterval(chFrame,7000);
});
}
});

*/


 //<!-- setting the original position for the active link highlight -->
    
jQuery("#highlight").animate({ left: "10px"}, 1 );   
jQuery('#nav1').css({'color':'#ff7a04','font-weight':'bold'});



//<!--NAV1 -->

jQuery('#nav1').click(function() {

	//<!-- hide other divs -->
	jQuery('#div2:visible').hide(1);
	jQuery('#div3:visible').hide(1);
	jQuery('#div4:visible').hide(1);
	jQuery('#div5:visible').hide(1);


	jQuery('#div1').fadeIn('slow', function() {
		// Animation complete
	});
	jQuery("#highlight").animate({ left: "10px"}, 'slow' );
	jQuery(this).css({'color':'#ff7a04','font-weight':'bold'}); 

	//<!-- reset other navs -->
	jQuery('#nav2').css({'color':'#ffffff','font-weight':'normal'});
	jQuery('#nav3').css({'color':'#ffffff','font-weight':'normal'});
	jQuery('#nav4').css({'color':'#ffffff','font-weight':'normal'});
	jQuery('#nav5').css({'color':'#ffffff','font-weight':'normal'});    
	
	return false;
});



//<!--NAV2 -->    

jQuery('#nav2').click(function() {

	//<!-- hide other divs -->
	jQuery('#div1:visible').hide(1);
	jQuery('#div3:visible').hide(1);
	jQuery('#div4:visible').hide(1);
	jQuery('#div5:visible').hide(1);


	jQuery('#div2').fadeIn('slow', function() {
		// Animation complete
	});
	jQuery("#highlight").animate({ left: "195px"}, 'slow' );
	jQuery(this).css({'color':'#ff7a04','font-weight':'bold'});

	//<!-- reset other navs -->
	jQuery('#nav1').css({'color':'#ffffff','font-weight':'normal'});
	jQuery('#nav3').css({'color':'#ffffff','font-weight':'normal'});
	jQuery('#nav4').css({'color':'#ffffff','font-weight':'normal'});
	jQuery('#nav5').css({'color':'#ffffff','font-weight':'normal'});

	return false;
});

//<!--NAV3 -->

jQuery('#nav3').click(function() {

	//<!-- hide other divs -->
	jQuery('#div2:visible').hide(1);
	jQuery('#div1:visible').hide(1);
	jQuery('#div4:visible').hide(1);
	jQuery('#div5:visible').hide(1);

	jQuery('#div3').fadeIn('slow', function() {
		// Animation complete
	});
	jQuery("#highlight").animate({ left: "390px"}, 'slow' );
	jQuery(this).css({'color':'#ff7a04','font-weight':'bold'});

	//<!-- reset other navs -->
	jQuery('#nav2').css({'color':'#ffffff','font-weight':'normal'});
	jQuery('#nav1').css({'color':'#ffffff','font-weight':'normal'});
	jQuery('#nav4').css({'color':'#ffffff','font-weight':'normal'});
	jQuery('#nav5').css({'color':'#ffffff','font-weight':'normal'});

	return false;
});

//<!--NAV4 -->

jQuery('#nav4').click(function() {

	<!-- hide other divs -->
	jQuery('#div2:visible').hide(1);
	jQuery('#div3:visible').hide(1);
	jQuery('#div1:visible').hide(1);
	jQuery('#div5:visible').hide(1);


	jQuery('#div4').fadeIn('slow', function() {
		// Animation complete
	});
	jQuery("#highlight").animate({ left: "585px"}, 'slow' );
	jQuery(this).css({'color':'#ff7a04','font-weight':'bold'});

	//<!-- reset other navs -->
	jQuery('#nav2').css({'color':'#ffffff','font-weight':'normal'});
	jQuery('#nav3').css({'color':'#ffffff','font-weight':'normal'});
	jQuery('#nav1').css({'color':'#ffffff','font-weight':'normal'});
	jQuery('#nav5').css({'color':'#ffffff','font-weight':'normal'});	
	
	return false;
});


//<!--NAV5 -->

jQuery('#nav5').click(function() {

	//<!-- hide other divs -->
	jQuery('#div2:visible').hide(1);
	jQuery('#div3:visible').hide(1);
	jQuery('#div1:visible').hide(1);
	jQuery('#div4:visible').hide(1);


	jQuery('#div5').fadeIn('slow', function() {
		// Animation complete
	});
	jQuery("#highlight").animate({ left: "765px"}, 'slow' );
	jQuery(this).css({'color':'#ff7a04','font-weight':'bold'});

	//<!-- reset other navs -->
	jQuery('#nav2').css({'color':'#ffffff','font-weight':'normal'});
	jQuery('#nav3').css({'color':'#ffffff','font-weight':'normal'});
	jQuery('#nav1').css({'color':'#ffffff','font-weight':'normal'});
	jQuery('#nav4').css({'color':'#ffffff','font-weight':'normal'});	
	
	return false;
});
