/* FX.Slide */
/* toggle window for the login section */
/* Works with mootools-release-1.2 */
/* more info at http://demos.mootools.net/Fx.Slide */

window.addEvent('domready', function(){

	$('login').setStyle('height','auto');
	var mySlide = new Fx.Slide('login').hide();  //starts the panel in closed state  

    $('toggleLogin').addEvent('click', function(e){
		e = new Event(e);
		mySlide.toggle();
		e.stop();
	});
});



/* Button Fadin Hover */
jQuery.noConflict();
jQuery(function() {
				
	jQuery(document).ready(function(){
		jQuery(".clientlogin").click(function () {
			jQuery(this).children(".img").toggle();
				return false;
		});
	});

	// set opacity to full on page load
	jQuery("a span").css("opacity","1");
	// on mouse over
	jQuery("a span").hover(function () {
		// animate opacity to nill
		jQuery(this).stop().animate({
			opacity: 0
		}, "fast");
	},
	// on mouse out
	function () {
		// animate opacity to full
		jQuery(this).stop().animate({
			opacity: 1
		}, "fast");
	});
});



/* Sercvices Section */
jQuery(document).ready(function(){
	
	//Fix Errors - http://www.learningjquery.com/2009/01/quick-tip-prevent-animation-queue-buildup/
	//Remove outline from links
	jQuery("a").click(function(){
		jQuery(this).blur();
	});
	
	
	////////////////////////////////////////
	//When mouse rolls over web section
	jQuery("div.web").mouseover(function(){
		jQuery("li.drop-web").stop().animate({height:'365px'},{queue:false, duration:500});
	});
	//When mouse is removed
	jQuery("div.web").mouseout(function(){
		jQuery("li.drop-web").stop().animate({height:'30px'},{queue:false, duration:300});
	});
	
	jQuery("div.web a.button-portfolio").mouseover(function(){
		jQuery("div.graphic a.button-portfolio, div.print a.button-portfolio, div.host a.button-portfolio").animate({ opacity: 0.5 }, 200);
	});
	jQuery("div.web a.button-portfolio").mouseout(function(){
		jQuery("div.graphic a.button-portfolio, div.print a.button-portfolio, div.host a.button-portfolio").animate({ opacity: 1.0 }, 200);
	});
	
	////////////////////////////////////////
	//When mouse rolls over graphic section
	jQuery("div.graphic").mouseover(function(){
		jQuery("li.drop-graphic").stop().animate({height:'365px'},{queue:false, duration:500})
	});
	//When mouse is removed
	jQuery("div.graphic").mouseout(function(){
		jQuery("li.drop-graphic").stop().animate({height:'30px'},{queue:false, duration:300})
	});
	
	jQuery("div.graphic a.button-portfolio").mouseover(function(){
		jQuery("div.web a.button-portfolio, div.print a.button-portfolio, div.host a.button-portfolio").animate({ opacity: 0.5 }, 200);
	});
	jQuery("div.graphic a.button-portfolio").mouseout(function(){
		jQuery("div.web a.button-portfolio, div.print a.button-portfolio, div.host a.button-portfolio").animate({ opacity: 1.0 }, 200);
	});
	

	////////////////////////////////////////
	//When mouse rolls over print section
	jQuery("div.print").mouseover(function(){
		jQuery("li.drop-print").stop().animate({height:'365px'},{queue:false, duration:500})
	});
	//When mouse is removed
	jQuery("div.print").mouseout(function(){
		jQuery("li.drop-print").stop().animate({height:'30px'},{queue:false, duration:300})
	});	
	
	jQuery("div.print a.button-portfolio").mouseover(function(){
		jQuery("div.web a.button-portfolio, div.graphic a.button-portfolio, div.host a.button-portfolio").animate({ opacity: 0.5 }, 200);
	});
	jQuery("div.print a.button-portfolio").mouseout(function(){
		jQuery("div.web a.button-portfolio, div.graphic a.button-portfolio, div.host a.button-portfolio").animate({ opacity: 1.0 }, 200);
	});
	
	
	////////////////////////////////////////
	//When mouse rolls over hosting section
	jQuery("div.host").mouseover(function(){
		jQuery("li.drop-host").stop().animate({height:'365px'},{queue:false, duration:500})
	});
	//When mouse is removed
	jQuery("div.host").mouseout(function(){
		jQuery("li.drop-host").stop().animate({height:'30px'},{queue:false, duration:300})
	});
		
	jQuery("div.host a.button-portfolio").mouseover(function(){
		jQuery("div.web a.button-portfolio, div.graphic a.button-portfolio, div.print a.button-portfolio").animate({ opacity: 0.5 }, 200);
	});
	jQuery("div.host a.button-portfolio").mouseout(function(){
		jQuery("div.web a.button-portfolio, div.graphic a.button-portfolio, div.print a.button-portfolio").animate({ opacity: 1.0 }, 200);
	});
	
});

/* Form Labels */
jQuery(function(){ 
	jQuery("label").inFieldLabels(); 
	jQuery("input").attr("autocomplete","off");
});

/* Form  Sliding Inputs */
jQuery().ready(function() {  
	jQuery('.kwicks').kwicks({  
		 max : 170,  
		 spacing : 5  
	 });  
});

/* Colorbox */
jQuery(document).ready(function(){
	jQuery(".services a").colorbox({width:"1050px", height:"460px", iframe:true});
});


/* Cufon */
Cufon.replace('h1', { fontFamily: 'Myriad Pro' });
Cufon.replace('h3', { fontFamily: 'Myriad Pro' });
Cufon.replace('h4', { fontFamily: 'Myriad Pro' });
Cufon.replace('h6', { fontFamily: 'Myriad Pro' });
Cufon.replace('#quote', { fontFamily: 'KievitPro-Regular' });
