	var isSocial = 0;
	$(document).ready(function(){
		
		$("a.opa80").css({opacity:0.8});
		$("a.opa80 *").css({opacity:0.8});
		
		$("a.opa60").css({opacity:0.6});
		$("a.opa60 *").css({opacity:0.6});
		
		$("a.opa80").hover(function(){
				$(this).stop().animate({opacity:1},200);
				//$(this).find("*").stop().animate({opacity:1},200);
			},function(){
				$(this).stop().animate({opacity:0.8},200);
				//$(this).find("*").stop().animate({opacity:0.8},200);
		});
		
		$("a.opa60").hover(function(){
				$(this).stop().animate({opacity:1},200);
			},function(){
				$(this).stop().animate({opacity:0.6},200);
		});	
		
		$("#nav-bar ul li a .hover").css({opacity:0})
		
		$("#nav-bar ul li a .hover").mouseover(function(){
			$(this).stop().animate({opacity:1},300);
			$(this).siblings(".normal").stop().animate({opacity:0},300);
		});
		
		$("#nav-bar ul li a .hover").mouseout(function(){
			$(this).stop().animate({opacity:0},200);
			$(this).siblings().stop().animate({opacity:1},200);
		});
		
		//language bar animation
		$("#nav-bar .lang-bar a img").css({opacity:0.4});
	
		$("#nav-bar .lang-bar a img").mouseover(function(){
			$(this).stop();
			$(this).animate({opacity:1},200);
		});
		
		$("#nav-bar .lang-bar a img").mouseout(function(){
			$(this).stop();
			$(this).animate({opacity:0.4},200);
		});
		
		
		$("#footer-wrapper .right .first-line .margin .social-box").css({opacity:0.7});
		$("#footer-wrapper .right .first-line .margin .social-box .rollable").css({height:0});
		$("#footer-wrapper .right .first-line .margin .social-box").hover(function(){
			showSocial();
		}, function(){
			hideSocial();
		});
		
		$("a.fx_hover").hover(function(){
			$(this).stop();
			$(this).animate({color:"#888"},200);
			$(this).animate({color:"#FFF"},200);
		},function(){});
		
		$("#job-box").css({opacity:0.9});
		$("#job-box .item").not("#job-box .item.first").css({height:0});
		$("#job-box").hover(function(){
			$("#job-box .item").stop();
			$("#job-box .item").animate({height:25},200);
		},function(){
			$("#job-box .item").not("#job-box .item.first").stop();
			$("#job-box .item").not("#job-box .item.first").animate({height:0},200);
		})
		
		//ISDW 
//		if (!$.browser.msie)
//			$("#isdw .box .last a img").css({opacity:0.6});
//
//		$("#isdw .box .last").hover(function(){
//			$(this).stop();
//			$(this).animate({backgroundColor: "#222"},200).animate({backgroundColor: "#111"},100);
//			if (!$.browser.msie)
//				$(this).find('img').animate({opacity:1},200);
//			
//		},function(){
//			$(this).stop();
//			$(this).animate({backgroundColor: "#000"},200).animate({color:"#999"}, 200);
//			if (!$.browser.msie)
//				$(this).find('img').animate({opacity:0.6},200);
//		});
		
		$("#isdw .box .line a").hover(function(){
			$(this).stop();
			$(this).animate({color:"white"},200);
		},function(){
			$(this).stop();
			$(this).animate({color:"#999"},200);
		});
		

		$(".projectThumb .hover").css({opacity:0,display:"block"});
		$(".projectThumb").hover(function(){
			$(this).find(".hover").stop().animate({opacity:1},200);
		}, function(){
			$(this).find(".hover").stop().animate({opacity:0},200);
		});

		$.get(url_base + "sk/ajax/fbfeed.php", function(data){
		   $("#fbMessage").html($(data).find("fbmessage").text());
		   $("#fbDate").html($(data).find("fbdate").text());
		   $("#fbLikes").html($(data).find("fblikes").text());
		   $("#fbComments").html($(data).find("fbcomments").text());
                   $("#fbComments").append($(data).find("fviewer").text());
		});		
		
		
	});
	
	function showSocial(){
		$("#footer-wrapper .right .first-line .margin .social-box .rollable").stop();
		$("#footer-wrapper .right .first-line .margin .social-box a img.bw").stop();
		$("#footer-wrapper .right .first-line .margin .social-box").stop();
		$("#footer-wrapper .right .first-line .margin .social-box .bottom").stop();

		$("#footer-wrapper .right .first-line .margin .social-box .rollable").animate({height:25},200);
		$("#footer-wrapper .right .first-line .margin .social-box a img.bw").animate({opacity:0},200);
		$("#footer-wrapper .right .first-line .margin .social-box").animate({width:125},200);
		$("#footer-wrapper .right .first-line .margin .social-box .bottom").animate({height:0},200);
	}
	
	function hideSocial(){
		$("#footer-wrapper .right .first-line .margin .social-box .rollable").stop();
		$("#footer-wrapper .right .first-line .margin .social-box a img.bw").stop();
		$("#footer-wrapper .right .first-line .margin .social-box").stop();
		$("#footer-wrapper .right .first-line .margin .social-box .bottom").stop();

		$("#footer-wrapper .right .first-line .margin .social-box .rollable").animate({height:0},200);
		$("#footer-wrapper .right .first-line .margin .social-box a img.bw").animate({opacity:1},200);
		$("#footer-wrapper .right .first-line .margin .social-box").animate({width:80},200);
		$("#footer-wrapper .right .first-line .margin .social-box .bottom").animate({height:14},200);
	}
	
	function scrollUp(){
		$('html,body').animate({scrollTop: 0}, 500);
	}
