	var isSocial = 0;
	var pulse_stopped = false;
	
	$(document).ready(function(){
		$(".shine").css({opacity:0});
		setTimeout("$('.shine.first').animate({opacity:1},3000,'easeOutBounce');",500);
		setTimeout("$('.shine.second').animate({opacity:1},3000,'easeOutBounce');",1000);
		setTimeout("$('.shine.third').animate({opacity:1},3000,'easeOutBounce');",1500);

		$("#nav-bar ul li a img.hover").css({opacity:0})
		
		$("#nav-bar ul li a img.hover").mouseover(function(){
			$(this).stop();
			$(this).animate({opacity:1},300);
		});
		
		$("#nav-bar ul li a img.hover").mouseout(function(){
			$(this).stop();
			$(this).animate({opacity:0},300);
		});
		
		//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);
		});
		
		$("#header-box .video-ad #play-box a").hover(function(){
			
			pulse_stopped = true;
			$("#header-box .video-ad #play-box a").stop().stop();
			$("#header-box .video-ad #play-box a").animate({opacity:1},400);
		}, function(){
			pulse_stopped = false;
		});

		$("#header-box .video-ad #play-box .second a").css({opacity:0.8});
		
		$("#content-wrapper .bottom .image-box div img.bw").css({opacity:0});
		$("#content-wrapper .bottom .image-box div img.hover").css({opacity:0});
		
		$("#content-wrapper .bottom .image-box").hover(function(){
			$("#content-wrapper .bottom .image-box div img.bw").not($(this).find('img')).stop();
			$(this).find('img.hover').stop();
			$(this).find('.sub-pannel').stop();
			
			$("#content-wrapper .bottom .image-box div img.bw").not($(this).find('img')).animate({opacity:1},200);
			$(this).find('img.hover').animate({opacity:1},200);
			$(this).find('.sub-pannel').animate({height:43},200);
			
		},function(){
			$("#content-wrapper .bottom .image-box .bw").not($(this)).stop();
			$(this).find('img.hover').stop();
			$(this).find('.sub-pannel').stop();
			
			$("#content-wrapper .bottom .image-box .bw").not($(this)).animate({opacity:0},200);
			$(this).find('img.hover').animate({opacity:0},200);
			$(this).find('.sub-pannel').animate({height:0},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 .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);
		})
		pulsePlayButton();		
	});
	
	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 initVideo(){
		var aTime = 1200;
		$(".behind-video").animate({opacity:0}, aTime).hide();
		$("#header-box").animate({height:530}, aTime);
		setTimeout("showVideo()",1);
		$("#header-box .video-ad #play-box .second a").hide();
	}
	
	function showVideo(){
		$("#video-box").css({opacity:0});
		$("#video-box").css({display:'block'});
		$("#video-box").animate({opacity:1},1200);
		
	}
	
	
	
	function showGallery(gallery_name){
		$.get(url_base + "sk/ajax/gallery.php?gallery=" + gallery_name, function(data){
			TINY.box.show(data,0,940,475,0);	
			galleryScroll(1);
		});

	}
	
	function galleryScroll(index){
		var offset = index * 920;
		$("#gallery .roller-box").animate({scrollLeft: offset}, 600, "easeOutQuint");
	}
	
	function pulsePlayButton(){
		var freq = 1000;
		if (!pulse_stopped){
			$("#header-box .video-ad #play-box .second a").animate({opacity:0.3}, freq, "easeInSine").animate({opacity:0.7}, freq ,"easeOutSine");
		}
		setTimeout("pulsePlayButton()", (freq * 2) + 100);
	}
