/** 
NIVO Slider activation 
*/
$(window).load(function() {
	$('#homepage-slider').nivoSlider({
		effect:'sliceDown', //Specify sets like: 'fold,fade,sliceDown'
		slices:15,
		animSpeed:1500, //Slide transition speed
		pauseTime:3000,
		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:true, //Use left & right arrows
		pauseOnHover:true, //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() {
	$('#project-slider').nivoSlider({
		effect:'sliceDown', //Specify sets like: 'fold,fade,sliceDown'
		slices:15,
		animSpeed:1500, //Slide transition speed
		pauseTime:3000,
		startSlide:0, //Set starting Slide (0 index)
		directionNav:false, //Next & Prev
		directionNavHide:false, //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:true, //Use left & right arrows
		pauseOnHover:true, //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
	});
});


/**
 PrettyPhoto
 */
$(document).ready(function(){
		$("a[rel^='prettyPhoto']").prettyPhoto();
	});


/**
 Drop down menu
 */
 document.write('<style>#main-nav li:hover ul {display: none;}</style>');
$(document).ready(function(){

	$("#main-nav li span").hover(function() {

		$(this).parent().find("ul").slideDown(400).show();

		$(this).parent().hover(function() {
		}, function(){
			$(this).parent().find("ul").slideUp(400);
		});
	});

});


/** 
In Field Label plugin activation
*/
$(document).ready(function(){
  $("#search-form label").inFieldLabels();
});
document.write('<style>#search-form label{position:absolute;top:10px;left:6px;cursor:text;}</style>');


/** 
*Simple Accordion
*http://www.sohtanaka.com/web-design/simple-accordion-w-css-and-jquery/
*/
$(document).ready(function(){
	
//Set default open/close settings
$('.accordion-container').hide(); //Hide/close all containers
$('.accordion-trigger:first').addClass('active').next().show(); //Add "active" class to first trigger, then show/open the immediate next container

//On Click
$('.accordion-trigger').click(function(){
	if( $(this).next().is(':hidden') ) { //If immediate next container is closed...
		$('.accordion-trigger').removeClass('active').next().slideUp(); //Remove all .acc_trigger classes and slide up the immediate next container
		$(this).toggleClass('active').next().slideDown(); //Add .acc_trigger class to clicked trigger and slide down the immediate next container
	}
	return false; //Prevent the browser jump to the link anchor
});

});


/** 
jQuery.ScrollTo Activation 
*/
$(document).ready(function(){
$('.go-top').click(function() {
$.scrollTo(0, 800); });
});

$(document).ready(function(){
$('#comments h3 span a').click(function() {
$.scrollTo($('#respond'), 800); });
});

$(document).ready(function(){
$('.scroll-to').click(function() {
$.scrollTo($('#comments'), 800); });
});
