$(document).ready(function() {
	
	// set easing for everything
	jQuery.easing.def="easeOutExpo";
 
	// main vertical slider
	$("#vert").tinycarousel({ controls: false, pager: true, animation: true, duration: 750, axis: "y"  });

	// home quotes
	$("#quotes").cycle({ timeout: 15000, speed: 2500, sync: 0 }); 
	
	// portfolio horizontal slider
	$("#work").tinycarousel2({ controls: false, pager: true, animation: true, duration: 1000, axis: "x"  });		

	// client sections - kind of hacky but it works
	$("#client1 .work-text").jCarouselLite({ visible: 1, easing: "easeOutExpo", speed: 600, circular: false , btnNext: "#client1 .btn-next", btnGo: ["#client1 .c1", "#client1 .c2", "#client1 .c3", "#client1 .c4", "#client1 .c5", "#client1 .c6", "#client1 .c7", "#client1 .c8", "#client1 .c9", "#client1 .c10", "#client1 .c11"] });
	$("#client1 .work-images").jCarouselLite({ visible: 1, easing: "easeOutExpo", speed: 600, circular: false , btnNext: "#client1 .btn-next", btnGo: ["#client1 .c1", "#client1 .c2", "#client1 .c3", "#client1 .c4", "#client1 .c5", "#client1 .c6", "#client1 .c7", "#client1 .c8", "#client1 .c9", "#client1 .c10", "#client1 .c11"] });

	$("#client2 .work-text").jCarouselLite({ visible: 1, easing: "easeOutExpo", speed: 600, circular: false , btnNext: "#client2 .btn-next", btnGo: ["#client2 .c1", "#client2 .c2", "#client2 .c3", "#client2 .c4", "#client2 .c5", "#client2 .c6", "#client2 .c7", "#client2 .c8", "#client2 .c9", "#client2 .c10"] });
	$("#client2 .work-images").jCarouselLite({ visible: 1, easing: "easeOutExpo", speed: 600, circular: false , btnNext: "#client2 .btn-next", btnGo: ["#client2 .c1", "#client2 .c2", "#client2 .c3", "#client2 .c4", "#client2 .c5", "#client2 .c6", "#client2 .c7", "#client2 .c8", "#client2 .c9", "#client2 .c10"] });

	$("#client3 .work-text").jCarouselLite({ visible: 1, easing: "easeOutExpo", speed: 600, circular: false , btnNext: "#client3 .btn-next", btnGo: ["#client3 .c1", "#client3 .c2", "#client3 .c3", "#client3 .c4", "#client3 .c5", "#client3 .c6", "#client3 .c7", "#client3 .c8", "#client3 .c9", "#client3 .c10"] });
	$("#client3 .work-images").jCarouselLite({ visible: 1, easing: "easeOutExpo", speed: 600, circular: false , btnNext: "#client3 .btn-next", btnGo: ["#client3 .c1", "#client3 .c2", "#client3 .c3", "#client3 .c4", "#client3 .c5", "#client3 .c6", "#client3 .c7", "#client3 .c8", "#client3 .c9", "#client3 .c10"] });

	$("#client4 .work-text").jCarouselLite({ visible: 1, easing: "easeOutExpo", speed: 600, circular: false , btnNext: "#client4 .btn-next", btnGo: ["#client4 .c1", "#client4 .c2", "#client4 .c3", "#client4 .c4", "#client4 .c5", "#client4 .c6", "#client4 .c7", "#client4 .c8", "#client4 .c9", "#client4 .c10"] });
	$("#client4 .work-images").jCarouselLite({ visible: 1, easing: "easeOutExpo", speed: 600, circular: false , btnNext: "#client4 .btn-next", btnGo: ["#client4 .c1", "#client4 .c2", "#client4 .c3", "#client4 .c4", "#client4 .c5", "#client4 .c6", "#client4 .c7", "#client4 .c8", "#client4 .c9", "#client4 .c10"] });

	$("#client5 .work-text").jCarouselLite({ visible: 1, easing: "easeOutExpo", speed: 600, circular: false , btnNext: "#client5 .btn-next", btnGo: ["#client5 .c1", "#client5 .c2", "#client5 .c3", "#client5 .c4", "#client5 .c5", "#client5 .c6", "#client5 .c7", "#client5 .c8", "#client5 .c9", "#client5 .c10"] });
	$("#client5 .work-images").jCarouselLite({ visible: 1, easing: "easeOutExpo", speed: 600, circular: false , btnNext: "#client5 .btn-next", btnGo: ["#client5 .c1", "#client5 .c2", "#client5 .c3", "#client5 .c4", "#client5 .c5", "#client5 .c6", "#client5 .c7", "#client5 .c8", "#client5 .c9", "#client5 .c10"] });

	$("#client6 .work-text").jCarouselLite({ visible: 1, easing: "easeOutExpo", speed: 600, circular: false , btnNext: "#client6 .btn-next", btnGo: ["#client6 .c1", "#client6 .c2", "#client6 .c3", "#client6 .c4", "#client6 .c5", "#client6 .c6", "#client6 .c7", "#client6 .c8", "#client6 .c9", "#client6 .c10"] });
	$("#client6 .work-images").jCarouselLite({ visible: 1, easing: "easeOutExpo", speed: 600, circular: false , btnNext: "#client6 .btn-next", btnGo: ["#client6 .c1", "#client6 .c2", "#client6 .c3", "#client6 .c4", "#client6 .c5", "#client6 .c6", "#client6 .c7", "#client6 .c8", "#client6 .c9", "#client6 .c10"] });

	$("#client7 .work-text").jCarouselLite({ visible: 1, easing: "easeOutExpo", speed: 600, circular: false , btnNext: "#client7 .btn-next", btnGo: ["#client7 .c1", "#client7 .c2", "#client7 .c3", "#client7 .c4", "#client7 .c5", "#client7 .c6", "#client7 .c7", "#client7 .c8", "#client7 .c9", "#client7 .c10"] });
	$("#client7 .work-images").jCarouselLite({ visible: 1, easing: "easeOutExpo", speed: 600, circular: false , btnNext: "#client7 .btn-next", btnGo: ["#client7 .c1", "#client7 .c2", "#client7 .c3", "#client7 .c4", "#client7 .c5", "#client7 .c6", "#client7 .c7", "#client7 .c8", "#client7 .c9", "#client7 .c10"] });

	$("#client8 .work-text").jCarouselLite({ visible: 1, easing: "easeOutExpo", speed: 600, circular: false , btnNext: "#client8 .btn-next", btnGo: ["#client8 .c1", "#client8 .c2", "#client8 .c3", "#client8 .c4", "#client8 .c5", "#client8 .c6", "#client8 .c7", "#client8 .c8", "#client8 .c9", "#client8 .c10"] });
	$("#client8 .work-images").jCarouselLite({ visible: 1, easing: "easeOutExpo", speed: 600, circular: false , btnNext: "#client8 .btn-next", btnGo: ["#client8 .c1", "#client8 .c2", "#client8 .c3", "#client8 .c4", "#client8 .c5", "#client8 .c6", "#client8 .c7", "#client8 .c8", "#client8 .c9", "#client8 .c10"] });
	

	// add active class for client view controls
	$(".controls a").click(function() {
		$(this).siblings().removeClass("active");
		$(this).addClass("active");
	});
	
	$(".btn-next").click(function() {	
		$(this).hide();
		$(this).delay("600").fadeIn("slow");
		var elem = $(this).parents(".client").find(".controls a.active");		
		if (!elem.hasClass("last")) { elem.removeClass("active").next("a").addClass("active"); };
		
		});







});




