// JavaScript Document

//Code by Lloyd Baker
$(document).ready(function(){
	if( $("body").attr("id") == "home" ){
	$("#homeNav a").addClass("active");	
	}	
	
	if( $("body").attr("id") == "port" ){
	$("#portNav a").addClass("active");	
	}
	
	if( $("body").attr("id") == "download" ){
	$("#downNav a").addClass("active");	
	}
			
	if( $("body").attr("id") == "contact" ){
	$("#contactNav a").addClass("active");	
	}
	
	if( $("body").attr("id") == "sitemap" ){
	$("#siteNav a").addClass("active");	
	}
		
$(function(){
	$('#nav a').removeClass("menuHover");
	$('#nav a')
		.css( {backgroundPosition: "0px 0px"} )
		
		.hover(function(){
		$(this).stop()
		.animate({backgroundPosition:"(0px -40px)"}, {duration:200})
		.animate({color: "#ffffff"}, {duration:200})
														
		}, function(){$(this).stop().animate({backgroundPosition:"(0px 0px)"}, {duration:300})
		}); 	
	
	});

$(function(){
	$(".active")
		.hover(function(){ 
		$(this).stop()	
		.animate({backgroundPosition:"(0px -40px)", color: "#ffffff"}, {duration:200})
		
				}, function(){$(this).stop().animate({backgroundPosition:"(0px 0px)", color: "#000000"}, {duration:300})
		}); 
		   
		   });



	$(function(){
		$('.portNext').click(function(){		
         	$('#portContentHolder').stop().animate({"left":"-1000px"}, {duration:600})
			$('#portContentHolder02').stop().animate({"left":"0px"}, {duration:600})
		})
	});

	$(function(){
		$('.portPrev').click(function(){		
         	$('#portContentHolder').stop().animate({"left":"0px"}, {duration:600})
			$('#portContentHolder02').stop().animate({"left":"1000px"}, {duration:600})
		})
	});

$(function(){
	$('.portHolder').hover(function() {
						$('.nextIco', this).stop().animate({"top":"0px"}, {duration:300})
						}	, function(){ $('.nextIco', this).stop().animate({"top":"190px"}, {duration:500})
				 })
	})


	



});
