$(document).ready(function(){
	$("#accordion").accordion({
		active: false,
		collapsible: true,
		autoHeight: false,
		alwaysOpen: false
	});

	$('#accordion-home .head').click(function() {
		$(this).toggleClass("active").next().toggle('medium');
		return false;
	}).next().hide();

	 
	$('.cs.caption').hover(function(){
			$(".cover", this).stop().animate({top:'150px'},{queue:false,duration:360});
				}, function() {
			$(".cover", this).stop().animate({top:'200px'},{queue:false,duration:360});
	});
	$("#portfolio-categories li:first").css("padding","0 8px 0 0");
	$("#portfolio-categories li:last").css("border-right","none");
	$(".portfolio-box:eq(3),.portfolio-box:eq(7),.portfolio-box:eq(11)").css("margin","0 0 0 0");
	$(".cs:eq(2),.cs:eq(5)").css("margin","40px 0 0 0");
 	$('#coda-slider-1').codaSlider();

$(window).load(function() {
	$('.project-image').nivoSlider({
		effect:'random', //Specify sets like: 'fold,fade,sliceDown'
		slices:15,
		animSpeed:900,
		pauseTime:5000,
		startSlide:0, //Set starting Slide (0 index)
		directionNav:false, //Next & Prev
		directionNavHide:false, //Only show on hover
		controlNav:true, //1,2,3...
		controlNavThumbs:false, //Use thumbnails for Control Nav
      controlNavThumbsFromRel:false, //Use image rel for thumbs
		controlNavThumbsSearch: '.jpg', //Replace this with...
		controlNavThumbsReplace: '_thumb.jpg', //...this in thumb Image src
		keyboardNav:false, //Use left & right arrows
		pauseOnHover:false, //Stop animation while hovering
		manualAdvance:false, //Force manual transitions
		captionOpacity:0.8, //Universal caption opacity
		beforeChange: function(){},
		afterChange: function(){},
		slideshowEnd: function(){} //Triggers after all slides have been shown
	});
});

$(window).load(function() {
	$('#case-study-single-img').nivoSlider({
		effect:'random', //Specify sets like: 'fold,fade,sliceDown'
		slices:15,
		animSpeed:900,
		pauseTime:5000,
		startSlide:0, //Set starting Slide (0 index)
		directionNav:false, //Next & Prev
		directionNavHide:false, //Only show on hover
		controlNav:true, //1,2,3...
		controlNavThumbs:false, //Use thumbnails for Control Nav
      controlNavThumbsFromRel:false, //Use image rel for thumbs
		controlNavThumbsSearch: '.jpg', //Replace this with...
		controlNavThumbsReplace: '_thumb.jpg', //...this in thumb Image src
		keyboardNav:false, //Use left & right arrows
		pauseOnHover:false, //Stop animation while hovering
		manualAdvance:false, //Force manual transitions
		captionOpacity:0.8, //Universal caption opacity
		beforeChange: function(){},
		afterChange: function(){},
		slideshowEnd: function(){} //Triggers after all slides have been shown
	});
});

$(window).load(function() {
	$('.top-slider-image').nivoSlider({
		effect:'random', //Specify sets like: 'fold,fade,sliceDown'
		slices:15,
		animSpeed:900,
		pauseTime:5000,
		startSlide:0, //Set starting Slide (0 index)
		directionNav:true, //Next & Prev
		directionNavHide:true, //Only show on hover
		controlNav:false, //1,2,3...
		controlNavThumbs:false, //Use thumbnails for Control Nav
      controlNavThumbsFromRel:false, //Use image rel for thumbs
		controlNavThumbsSearch: '.jpg', //Replace this with...
		controlNavThumbsReplace: '_thumb.jpg', //...this in thumb Image src
		keyboardNav:false, //Use left & right arrows
		pauseOnHover:false, //Stop animation while hovering
		manualAdvance:true, //Force manual transitions
		captionOpacity:0.8, //Universal caption opacity
		beforeChange: function(){},
		afterChange: function(){},
		slideshowEnd: function(){} //Triggers after all slides have been shown
	});
});

	Cufon.replace('#menu li', { fontFamily: 'Proxima Nova Rg' , hover:true });
	Cufon.replace('#portfolio-categories li a, .portfolio-box-description h3, .post-title h3, h3.case-head', { fontFamily: 'TradeGothic' , hover:true });
	Cufon.replace('.portfolio-box-description p, #cs-testimonial h3, #case-study-single-desc h2, #case-study-single-desc h3, #single-project-content h2, #single-project-content p#job', { fontFamily: 'TradeGothic'});
	Cufon.replace('#case-study-title h3, #portfolio-single-title h3', { fontFamily: 'TradeGothic', textShadow: '#fff 2px 2px, #fff -1px -1px' });
});
