$(document).ready(function() {
	$('a.more').click(function() {
	  var movement = "0px";
    $("a.more").removeClass("active");
	  $(this).addClass("active");
	  if ($(this).hasClass("page-2")) {movement = "-345px"}
	  if ($(this).hasClass("page-1")) {movement = "0px"}
	  if ($(this).hasClass("page-3")) {movement = "-690px"}

      $("#pages").animate({marginLeft:movement}, { duration: "slow", easing: "easeInQuad" })

	});


	$('#slider').nivoSlider({
		effect:'sliceDown',
		controlNav:true,
		pauseOnHover:true,
		manualAdvance:true,
	});

	// $('#slider').nivoSlider({
	// 		effect:'random', //Specify sets like: 'fold,fade,sliceDown'
	// 		slices:15,
	// 		animSpeed:500,
	// 		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
	// 	});

	$('div#navigation').hover(function() {
		$("#navigation").stop(true, true).animate({
			height: "50px"
		},
		"fast")

	},
	function() {
		$("#navigation").stop(true, true).animate({
			height: "25px"
		},
		"fast")
	});

	$('div#navigation > div ').hover(function() {

		$(this).children("ul").stop(true, true).animate({
			opacity: "toggle"
		},
		"fast")
			var color = $(this).css('background-color')
			$("#navigation").css('background-color', color)

			$(this).children("a").addClass('selected')
	},
	function() {
		$(this).children("ul").stop(true, true).animate({
			opacity: "toggle"
		},
		"fast")
			$("#navigation").css('background-color', "")

			$(this).children("a").removeClass('selected')
	});

	$('div#navigation li').hover(function() {
		$(this).addClass('active')
	},
	function() {
		$(this).removeClass('active')
	});



});

