var Logos = function () {
	var Slideshow = new noobSlide({ box: $('noob1'), items: [0,1,2,3,4], size: 923, autoPlay: true, interval: 5000,
			fxOptions: { duration: 750, transition: Fx.Transitions.Quad.easeInOut, wait: false } });
}

var Sizes = function () {
	
	var wrapper = $('info-logos');
	var windowSize = wrapper.getSize();
	var actualWindowSize = windowSize.y + 481;
	var bg = $('body-bg-logos');
	bg.setStyle('height', actualWindowSize);
	
	var Line = $('line');
	
	var Box5 = $('info-box5');
	var Box5Size = Box5.getSize();
	var Box5actualSize = Box5Size.y;
	Line.setStyle('top', Box5actualSize + 82);
	
	var Box7 = $('info-box7');
	var Box7Size = Box7.getSize();
	var Box7actualSize = Box7Size.y;
	
	Line.setStyle('height', Box7actualSize - 67);
	
}


window.addEvent('domready', function() {
	
	Logos();
	
	MiddleNav();
	
	Sizes();
	
});

var $j = jQuery.noConflict();

var moving = false;

$j(document).ready(function(){
	
	
	// Home - Turn on this light and turn off home light
	
	$j("#home").mouseover(function(){
	
		$j("#home > h2 > a").addClass("active");
		
		$j("#logo-design > h2 > a").removeClass("active");
	
	});
	
	// Home - Turn off this light and turn on home light
	
	$j("#home").mouseout(function(){
	
		$j("#home > h2 > a").removeClass("active");
		
		$j("#logo-design > h2 > a").addClass("active");
	
	});
	
	
	// Logo Design - Turn on this light and turn off home light
	
	$j("#logo-design > h2 > a").mouseover(function(){
		
		$j("#logo-design > ul > li > h3 > a.portfolio-logo").stop().animate({height:'20px'},{queue:false, duration:1, easing: 'easeOutQuad'});
		
	});
	
	// Logo Design - Slide out ul
	
	$j("#logo-design > h2 > a").mouseover(function(){
												   
		$j("#logo-design > ul").stop().animate({height:'94px'},{queue:false, duration:250, easing: 'easeOutQuad'})
	
	});
	
	// Logo Design - Slide in ul
	
	$j("#logo-design > h2 > a").mouseout(function(){
	
		$j("#logo-design > ul").stop().animate({height:'0px'},{queue:false, duration:250, easing: 'easeOutQuad'});
	
	});
	
	// Logo Design Sub Links - Stop ul from sliding back in
	
	$j("#logo-design > ul > li > h3 > a").mouseover(function(){
												   
		$j("#logo-design > ul").stop().animate({height:'94px'},{queue:false, duration:250, easing: 'easeOutQuad'})
	
	});
	
	// Logo Design Sub Links - Slide in ul
	
	$j("#logo-design > ul > li > h3 > a").mouseout(function(){
	
		$j("#logo-design > ul").stop().animate({height:'0px'},{queue:false, duration:250, easing: 'easeOutQuad'})
	
	});
	
	// Logo Design Sub Overview Link - Slide out
	
	$j("#logo-design > ul > li > h3 > a.overview").mouseover(function(){
												   
		$j("#logo-design > ul > li > h3 > a.portfolio-logo").stop().animate({height:'20px'},{queue:false, duration:250, easing: 'easeOutQuad'});
	
	});
	
	// Logo Design Sub Portfolio Link - Slide out
	
	$j("#logo-design > ul > li > h3 > a.portfolio-logo").mouseover(function(){
												   
		$j("#logo-design > ul > li > h3 > a.portfolio-logo").stop().animate({height:'106px'},{queue:false, duration:250, easing: 'easeOutQuad'});
		
		$j("#logo-design > ul").stop().animate({height:'180px'},{queue:false, duration:250, easing: 'easeOutQuad'});
	
	});
	
	// Logo Design Sub Prices Link - Slide out
	
	$j("#logo-design > ul > li > h3 > a.prices").mouseover(function(){
												   
		$j("#logo-design > ul > li > h3 > a.prices").stop().animate({height:'107px'},{queue:false, duration:250, easing: 'easeOutQuad'});
		
		$j("#logo-design > ul").stop().animate({height:'180px'},{queue:false, duration:250, easing: 'easeOutQuad'});
	
	});
	
	
	// Corporate Identity Design - Turn on this light and turn off home light
	
	$j("#corporate-identity-design").mouseover(function(){
	
		$j("#corporate-identity-design > h2 > a").addClass("active");
		
		$j("#logo-design > h2 > a").removeClass("active");
	
	});
	
	$j("#corporate-identity-design > h2 > a").mouseover(function(){
		
		$j("#corporate-identity-design > ul > li > h3 > a.portfolio-identity").stop().animate({height:'20px'},{queue:false, duration:1, easing: 'easeOutQuad'});
		
	});
	
	// Corporate Identity Design - Turn off this light and turn on home light
	
	$j("#corporate-identity-design").mouseout(function(){
	
		$j("#corporate-identity-design > h2 > a").removeClass("active");
		
		$j("#logo-design > h2 > a").addClass("active");
	
	});
	
	// Corporate Identity Design - Slide out ul
	
	$j("#corporate-identity-design > h2 > a").mouseover(function(){
												   
		$j("#corporate-identity-design > ul").stop().animate({height:'94px'},{queue:false, duration:250, easing: 'easeOutQuad'})
	
	});
	
	// Corporate Identity Design - Slide in ul
	
	$j("#corporate-identity-design > h2 > a").mouseout(function(){
	
		$j("#corporate-identity-design > ul").stop().animate({height:'0px'},{queue:false, duration:250, easing: 'easeOutQuad'});
	
	});
	
	// Corporate Identity Design Sub Links - Stop ul from sliding back in
	
	$j("#corporate-identity-design > ul > li > h3 > a").mouseover(function(){
												   
		$j("#corporate-identity-design > ul").stop().animate({height:'94px'},{queue:false, duration:250, easing: 'easeOutQuad'})
	
	});
	
	// Corporate Identity Design Sub Links - Slide in ul
	
	$j("#corporate-identity-design > ul > li > h3 > a").mouseout(function(){
	
		$j("#corporate-identity-design > ul").stop().animate({height:'0px'},{queue:false, duration:250, easing: 'easeOutQuad'})
	
	});
	
	// Corporate Identity Design Sub Overview Link - Slide out
	
	$j("#corporate-identity-design > ul > li > h3 > a.overview").mouseover(function(){
												   
		$j("#corporate-identity-design > ul > li > h3 > a.portfolio-identity").stop().animate({height:'20px'},{queue:false, duration:250, easing: 'easeOutQuad'});
	
	});
	
	// Corporate Identity Design Sub Portfolio Link - Slide out
	
	$j("#corporate-identity-design > ul > li > h3 > a.portfolio-identity").mouseover(function(){
												   
		$j("#corporate-identity-design > ul > li > h3 > a.portfolio-identity").stop().animate({height:'106px'},{queue:false, duration:250, easing: 'easeOutQuad'});
		
		$j("#corporate-identity-design > ul").stop().animate({height:'180px'},{queue:false, duration:250, easing: 'easeOutQuad'});
	
	});
	
	// Corporate Identity Design Sub Prices Link - Slide out
	
	$j("#corporate-identity-design > ul > li > h3 > a.prices").mouseover(function(){
												   
		$j("#corporate-identity-design > ul > li > h3 > a.prices").stop().animate({height:'107px'},{queue:false, duration:250, easing: 'easeOutQuad'});
		
		$j("#corporate-identity-design > ul").stop().animate({height:'180px'},{queue:false, duration:250, easing: 'easeOutQuad'});
	
	});
	
	
	// Prices & Packages - Turn on this light and turn off home light
	
	$j("#prices").mouseover(function(){
	
		$j("#prices > h2 > a").addClass("active");
		
		$j("#logo-design > h2 > a").removeClass("active");
	
	});
	
	// Prices & Packages - Turn off this light and turn on home light
	
	$j("#prices").mouseout(function(){
	
		$j("#prices > h2 > a").removeClass("active");
		
		$j("#logo-design > h2 > a").addClass("active");
	
	});
	
	
	// Contact - Turn on this light and turn off home light
	
	$j("#contact").mouseover(function(){
	
		$j("#contact > h2 > a").addClass("active");
		
		$j("#logo-design > h2 > a").removeClass("active");
	
	});
	
	// Contact - Turn off this light and turn on home light
	
	$j("#contact").mouseout(function(){
	
		$j("#contact > h2 > a").removeClass("active");
		
		$j("#logo-design > h2 > a").addClass("active");
	
	});
	
	
	
	$j('#nav a')
	.css( {backgroundPosition: "0px -3px"} )
	.mouseover(function(){
		$j(this).stop()
			.animate(
				{backgroundPosition:"(-15px -3px)"},
				{duration:125})
			.animate(
				{backgroundPosition:"(-15px -42px)"},
				{duration:5})
			.animate(
				{backgroundPosition:"(0px -42px)"},
				{duration:125})
			})
	.mouseout(function(){
		$j(this).stop()
			.animate(
				{backgroundPosition:"(-15px -42px)"},
				{duration:125})
			.animate(
				{backgroundPosition:"(-15px -3px)"},
				{duration:5})
			.animate(
				{backgroundPosition:"(0px -3px)"},
				{duration:125})
		})

	
	
});
