$(document).ready(function() {
	
	//page scrolling
	
	
	//background color change
	$(".Home").click(function(){
			$("body").stop().animate({backgroundColor:'#ffd018'}, 300);
			$('html, body').animate({scrollTop: $("#welcomeMooze").offset().top}, 2000);
	});
	
	$(".wel-Work, .work").click(function(){
			$("body").stop().animate({backgroundColor:'#c6db2b'}, 300)
			$('html, body').animate({scrollTop: $("#portfolio").offset().top}, 2000);
	});
	
	$(".wel-about, .aboutus").click(function(){
			$("body").stop().animate({backgroundColor:'#ff91d6'}, 300);
			$('html, body').animate({scrollTop: $("#aboutMooze").offset().top}, 2000);
	});
	
	$(".wel-contact, .contactus").click(function(){
			$("body").stop().animate({backgroundColor:'#7fd6ff'}, 300);
			$('html, body').animate({scrollTop: $("#mContact").offset().top}, 2000);
	});
	
	
	
	
	//welcome navigation
	$("#main #welcomeMooze a").css("backgroundPosition","0px 0px"); 
	
	$("#main #welcomeMooze a").hover(function() {	//On hover...
		$(this).stop().animate({ 
			backgroundPosition: "-119px 0px" //Find the span tag and move it up 40 pixels
		}, 200);
	} , function() { //On hover out...
		$(this).stop().animate({
			backgroundPosition: "0px 0px" //Move the span back to its original state (0px)
		}, 200);
	});
	
	//about navigation
	
	$("#aboutMooze .nav a").css("backgroundPosition","0px 0px"); 
	
	$("#aboutMooze .nav a").hover(function() {	//On hover...
		$(this).stop().animate({ 
			backgroundPosition: "-55px 0px" //Find the span tag and move it up 40 pixels
		}, 200);
	} , function() { //On hover out...
		$(this).stop().animate({
			backgroundPosition: "0px 0px" //Move the span back to its original state (0px)
		}, 200);
	});
	
	//portfolio navigation
	
	$("#portfolio .nav a").css("backgroundPosition","0px 0px"); 
	
	$("#portfolio .nav a").hover(function() {	//On hover...
		$(this).stop().animate({ 
			backgroundPosition: "-55px 0px" //Find the span tag and move it up 40 pixels
		}, 200);
	} , function() { //On hover out...
		$(this).stop().animate({
			backgroundPosition: "0px 0px" //Move the span back to its original state (0px)
		}, 200);
	});
	
	//contact navigation
	
	$("#mContact .nav a").css("backgroundPosition","0px 0px"); 
	
	$("#mContact .nav a").hover(function() {	//On hover...
		$(this).stop().animate({ 
			backgroundPosition: "-55px 0px" //Find the span tag and move it up 40 pixels
		}, 200);
	} , function() { //On hover out...
		$(this).stop().animate({
			backgroundPosition: "0px 0px" //Move the span back to its original state (0px)
		}, 200);
	});
	
	//contact email
	
	$("#conMooze a").css("backgroundPosition","0px 0px");
	
	$("#conMooze a").hover(function() {	//On hover...
		$(this).stop().animate({ 
			backgroundPosition: "-200px 0px" //Find the span tag and move it up 40 pixels
		}, 200);
	} , function() { //On hover out...
		$(this).stop().animate({
			backgroundPosition: "0px 0px" //Move the span back to its original state (0px)
		}, 200);
	});
	
	//submit btn
	
	$("#subForm").css("backgroundPosition","0px 0px");
	
	$("#subForm a").hover(function() {	//On hover...
		$("#subForm").stop().animate({ 
			backgroundPosition: "-100px 0px" //Find the span tag and move it up 40 pixels
		}, 200);
	} , function() { //On hover out...
		$("#subForm").stop().animate({
			backgroundPosition: "0px 0px" //Move the span back to its original state (0px)
		}, 200);
	});
	
	//webkit download
	//black
	
	$("#blkLnk .wbdwnLink a").css("backgroundPosition","0px 0px");
	
	$("#blkLnk .wbdwnLink a").hover(function() {	//On hover...
		$(".wbdwnLink a").stop().animate({ 
			backgroundPosition: "-163px 0px" //Find the span tag and move it up 40 pixels
		}, 200);
	} , function() { //On hover out...
		$("#blkLnk .wbdwnLink a").stop().animate({
			backgroundPosition: "0px 0px" //Move the span back to its original state (0px)
		}, 200);
	});
	
	//white
	$("#whtLnk .awbdwnLink a").css("backgroundPosition","0px 0px");
	
	$("#whtLnk .awbdwnLink a").hover(function() {	//On hover...
		$("#whtLnk .awbdwnLink a").stop().animate({ 
			backgroundPosition: "-163px 0px" //Find the span tag and move it up 40 pixels
		}, 200);
	} , function() { //On hover out...
		$("#whtLnk .awbdwnLink a").stop().animate({
			backgroundPosition: "0px 0px" //Move the span back to its original state (0px)
		}, 200);
	});
	
	//webkit pic
	//black
	
	$("#blkLnk .blkPic a").css("backgroundPosition","0px 0px");
	
	$("#blkLnk .blkPic a").hover(function() {	//On hover...
		$("#blkLnk .blkPic a").stop().animate({ 
			backgroundPosition: "-444px 0px" //Find the span tag and move it up 40 pixels
		}, 200);
	} , function() { //On hover out...
		$("#blkLnk .blkPic a").stop().animate({
			backgroundPosition: "0px 0px" //Move the span back to its original state (0px)
		}, 200);
	});
	
	//white
	$("#whtLnk .whtPic a").css("backgroundPosition","0px 0px");
	
	$("#whtLnk .whtPic a").hover(function() {	//On hover...
		$("#whtLnk .whtPic a").stop().animate({ 
			backgroundPosition: "-444px 0px" //Find the span tag and move it up 40 pixels
		}, 200);
	} , function() { //On hover out...
		$("#whtLnk .whtPic a").stop().animate({
			backgroundPosition: "0px 0px" //Move the span back to its original state (0px)
		}, 200);
	});
	
	
	//input and textarea rollover
	
	$("input").addClass("input-main");
					$("input").focus(function(){
						$(this).addClass("input-main-h").removeClass("input-main");
				}).blur(function(){
						$(this).removeClass("input-main-h").addClass("input-main");
	    	});
			
	$("li:last").addClass("forTA");
					$("textarea").focus(function(){
						$("li:last").addClass("forhTA").removeClass("forTA");
				}).blur(function(){
						$("li:last").removeClass("forhTA").addClass("forTA");
	    	}
	);
			
			
	//image horizontal scrolling
	$('.boxgrid.slideright').hover(function(){
					$(".cover", this).stop().animate({left:'-300px'},{queue:false,duration:300});
				}, function() {
					$(".cover", this).stop().animate({left:'10px'},{queue:false,duration:300});
				});
				
	//pirobox
	$().piroBox({
			my_speed: 400, //animation speed
			bg_alpha: 0.1, //background opacity
			slideShow : true, // true == slideshow on, false == slideshow off
			slideSpeed : 4, //slideshow duration in seconds(3 to 6 Recommended)
			close_all : '.piro_close,.piro_overlay'// add class .piro_overlay(with comma)if you want overlay click close piroBox

	});
	
});
