	/*
	 * Sieb				Awesome Website Javashizzle To Engage 2010
	 * Author:			Sieb
	 * Date:			01-10-09
	 * URL:				http://www.siebdesign.nl
	 * Version:			0.16
	 * 
	 * Party time.
	 */
	 
$(document).ready(function()
{

$("#works").fadeIn(800);
						$("#prev").fadeIn(200);
						$("#next").fadeIn(200);

// THE WORKS.

$('#works').cycle({ 
	fx:     'scrollHorz', 
	prev:   '#prev', 
	next:   '#next', 
	timeout: 0,
	speed: 800
});		



// THE WORKS - CONTROLS.


$("#prev").mouseover(function()
{
	$("#works .works-img img").stop().fadeTo(200, 0.4);
	$(".header").stop().animate({"top": "50px"}, 800);
	$(".footer").stop().animate({"bottom": "50px"}, 800);
	$("#prev-graphic").fadeIn(500);
}); 

$("#prev").mouseout(function()
{
	$("#works .works-img img").stop().fadeTo(200, 1);	
	$(".header").stop().animate({"top": "0px"}, 800);
	$(".footer").stop().animate({"bottom": "0px"}, 800);
	$("#prev-graphic").fadeOut(500);
}); 		  

$("#next").mouseover(function()
{
	$("#works .works-img img").stop().fadeTo(200, 0.4);
	$(".header").stop().animate({"top": "50px"}, 800);
	$(".footer").stop().animate({"bottom": "50px"}, 800);
	$("#next-graphic").fadeIn(500);
}); 

$("#next").mouseout(function()
{
	$("#works .works-img img").stop().fadeTo(200, 1);
	$(".header").stop().animate({"top": "0px"},  800);
	$(".footer").stop().animate({"bottom": "0px"}, 800);
	$("#next-graphic").fadeOut(500);
}); 

// KEEP SHOWING WORK AFTER CLICK

$("#next").click(function()
{
	$("#works .works-img img").stop().fadeTo(200, 1);
	$(".header").stop().animate({"top": "0px"},  800);
	$(".footer").stop().animate({"bottom": "0px"}, 800);
	//$("#next-graphic").fadeOut(500);
}); 

$("#prev").click(function()
{
	$("#works .works-img img").stop().fadeTo(200, 1);
	$(".header").stop().animate({"top": "0px"},  800);
	$(".footer").stop().animate({"bottom": "0px"}, 800);
	//$("#next-graphic").fadeOut(500);
}); 

// SWITCH ABOUT TEXT TO DUTCH AND ANDERSOM ;)

$(".langsel").click(function()
{
	$("#col1_eng").slideToggle(500);
	$("#col2_eng").slideToggle(500);
	$("#col1_nl").slideToggle(500);
	$("#col2_nl").slideToggle(500);
	//$("#next-graphic").fadeOut(500);
});

// SHOW MY PARTNERS, PARTNER.

$(".partnertrigger").click(function()
{
	$(".partners").slideToggle();
	$(".network").slideUp();
}); 
$(".networktrigger").click(function()
{
	$(".partners").slideUp();
	$(".network").slideToggle();
}); 

// SEND E-MAIL.

			$('#myForm').ajaxForm(function(data) {
				if (data==1){
					$('#success').fadeIn("slow");
					$('#bademail').fadeOut("slow");
					$('#badserver').fadeOut("slow");
					$('#myForm').resetForm();
				}
				else if (data==2){
					$('#badserver').fadeIn("slow");
				}
				else if (data==3)
				{
					$('#bademail').fadeIn("slow");
				}
			});
		  

});		




// CUFON.

/*
Cufon.replace('h1');
Cufon.replace('h2');
Cufon.replace('h3');
Cufon.replace('.menu', {hover: true});
Cufon.replace('.title', {hover: true});
*/

// Load work

$(document).ready(function(){
		  $('.ajaxtrigger').click(function(){
			$('#target').load($(this).attr('href'));
			return false;
		  });
		});