 $(document).ready(function(){
 
 	function goToByScroll(id){
		$('html,body').animate({scrollTop: $("#"+id).offset().top-20},"slow");
	}
	
	$(".top").click(function() {
		goToByScroll("html,body");
	});
	
	$("#showcase").animate({"opacity": "0"}, 0);
	$("#showcase").delay(50).animate({"opacity": "1"}, 500);
	
	 $(".link").hover(function() {
	 	$(this).animate({"color": "#ffffff"}, 250);
	 	}, 
	 	function () {
	 	$(this).animate({"color": "#ff6800"}, 250);
	 	});
if(!$.browser.webkit || !$.browser.opera) {
	if ($.browser.msie && $.browser.version.substr(0, 1) < 9 && $.browser.version.substr(0, 1) > 4 || $.browser.mozilla ) {
	 $("#utility-nav ul li")		
		.mouseover(function(){
		if ($(this).hasClass("selected")) {	
				$("a", this).animate({"color": "#00dde2"}, 250);
			} else {
			 $(this).stop().animate(
				{backgroundPosition:"(0 -8px)"}, 
				{duration:250});
				$("a", this).animate({"color": "#00dde2"}, 250);
			};
			})
		.mouseout(function(){
		if ($(this).hasClass("selected")) {	
				$("a", this).animate({"color": "#00dde2"}, 250);
			} else {
			  $(this).stop().animate(
				{backgroundPosition:"(0 0)"}, 
				{duration:250});
				$("a", this).animate({"color": "#c95da8"}, 250);
				};
	});	

	
	
	$(".nextprev a")
		.css( {backgroundPosition: "0 0"} )
		
		.mouseover(function(){
			$(this).stop().animate(
				{backgroundPosition:"(0 -13px)"}, 
				{duration:250})
			})
		.mouseout(function(){
			$(this).stop().animate(
				{backgroundPosition:"(0 0)"}, 
				{duration:250})
	});	

 	
	$("#images ul li").hover(function() { //On hover...

		var thumbOver = $(this).find("img").attr("src"); //Get image url and assign it to 'thumbOver'

		//Set a background image(thumbOver) on the <a> tag - Set position to bottom
		$(this).find("a.thumb").css({'background' : 'url(' + thumbOver + ') no-repeat bottom left'});

		//Animate the image to 0 opacity (fade it out)
		$(this).find("span").stop().fadeTo('normal', 0 , function() {
			$(this).hide() //Hide the image after fade
		});
	} , function() { //on hover out...
		//Fade the image to full opacity 
		$(this).find("span").stop().fadeTo('normal', 1).show();
	});
	}
}
	 


	 
	 
	$("img.lazy").lazyload({ 
		threshold : -10,
		placeholder : "http://empirikal.net/themes/site_themes/default_site/images/loader.gif",
    	effect : "fadeIn", 
   	});
	 
 });
