// JavaScript Document


$(function() {
		$('#slider').nivoSlider({
			effect:'sliceUpDownLeft', //Specify sets like: 'fold,fade,sliceDown'
			slices:15,
			startSlide:0, //Set starting Slide (0 index)
			directionNav:true, //Next & Prev
			animSpeed:1000, //Slide transition speed
			pauseTime:5500,
			directionNavHide:true, //Only show on hover
			controlNav:true, //1,2,3...
			keyboardNav:true, //Use left & right arrows
			pauseOnHover:true, //Stop animation while hovering
			manualAdvance:false, //Force manual transitions
			captionOpacity:0.6, //Universal caption opacity
			controlNavThumbs:true,
			controlNavThumbsSearch: '.jpg', //Replace this with...
			controlNavThumbsReplace: '_t.jpg', //...this in thumb Image src
		});
	});


$(function() {
	$('a[href*=#]').click(function() {
		if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
			var target = $(this.hash);
			target = target.length && target;
			if (target.length) {
				var sclpos = 50;
				var scldurat = 2000;
				var targetOffset = target.offset().top - sclpos;
				$('html,body')
					.animate({scrollTop: targetOffset}, {duration: scldurat, easing: "easeOutExpo"});
				return false;
			}
		}
	});
});
