$(document).ready(function() {
	$("nav#main_nav ul li").hover(
		function() {
			$(this).not("li.current-menu-item, li.current-menu-parent").addClass("menu_hover");
		//	Cufon.refresh();
		}, function() {
			$(this).not("li.current-menu-item, li.current-menu-parent").removeClass("menu_hover");
		//	Cufon.refresh();
		}
	);
	$("section.home article img").hover(
		function() {
			$(this).not("a.sticker img").stop().fadeTo(300, 0.85);
		}, function() {
			$(this).not("a.sticker img").stop().fadeTo(300, 1);
		}
	);
	$(".work").hover(
		function() {
			$(this).find(".work_description").stop(true, true).slideDown(300);
		}, function() {
			$(this).find(".work_description").stop(true, true).slideUp(300);
		}
	);
	
	$('div#work_inner_1').nivoSlider({
		directionNav: false,
		controlNav: false,
		pauseOnHover: false,
		animSpeed: 500,
		pauseTime: 3000,
		effect: "fade" //sliceDown, fold, fade
	});
	$("div#sevices_map a").hover(
		function() {
			var css = {
				"z-index" : 4,
				"background-position" : "bottom left"
			}
			$(this).css(css);
			$("div#s_active_bg").stop().fadeTo(300, 0.7);
		}, function() {
			$activeImage = $(this);
			$("div#s_active_bg").stop().fadeTo(0, 0, function() { 
				var css = {
					"z-index" : 2,
					"background-position" : "top left"
				}
				$(this).hide(); 
				$activeImage.css(css); 
			});
		}
	);
	$("img").lazyload({ threshold: 100 });
});
