$(window).load(function() {
	$('#banner').nivoSlider({
		effect:				'fold',
		slices:				10,
		animSpeed: 			500,
		pauseTime:			6000,
		startSlide:			0,
		directionNav:		false, //Next & Prev
		directionNavHide:	true, //Only show on hover
		controlNav:			true, //1,2,3...
		pauseOnHover:		true, //Stop animation while hovering
		beforeChange:		function(){},
		afterChange:		function(){}
	});
});


(function($){
	$.fn.clearDefault = function(){
		return this.each(function(){
			var default_value = $(this).val();
			$(this).focus(function(){
				if ($(this).val() == default_value) $(this).val("");
			});
			$(this).blur(function(){
				if ($(this).val() == "") $(this).val(default_value);
			});
		});
	};
})(jQuery);


$(document).ready(function() {


	/* 	EXTERNAL LINKS
		-------------------------------------------------------------*/

		$(".external").click( function() {
			window.open( $(this).attr("href") );
			return false;
		});



	/* 	COLORBOX LINKS
	-------------------------------------------------------------*/
		
		$("a.vimeo").colorbox();
		$("a.colorbox").colorbox;




	/*	CLEAR INPUT FIELDS ONFOCUS
		-------------------------------------------------------------*/
		
		$(".clear").clearDefault();

		
});

