// JavaScript Document

var $j = jQuery.noConflict();

$j(function()
{
	Cufon.replace('h2', {fontFamily:'Stratum1 Bold'});
	Cufon.replace('#top_menu_title', {fontFamily: 'Stratum1 Bold'});
	
	$j("html").css("overflow", "hidden");
	$j("#sl-blue").hide();
	$j("#splash_kunst_content").hide();
	$j("#splash_produksjson_content").hide();
	
	if ($j(window).height() < 768)
	{
		var kunst_new_position = ($j(window).height()-$j("#splash_kunst_content").height());
		var produksjson_new_position = ($j(window).height()-$j("#splash_produksjson_content").height());
		$j("#splash_kunst_content").css("top", kunst_new_position);
		$j("#splash_produksjson_content").css("top", produksjson_new_position);
	}
		
	$j("#kunst_area").hover(
		function()
		{
			$j("#sl-orange").stop(true, true).show("fast");
			$j("#splash_kunst_content").stop(true, true).animate({opacity:"show", top:"-=30px"}, 400);
			$j("#sl-blue").stop(true, true).animate({width:"show"}, 400); 
		},
		function()
		{		
			$j("#splash_kunst_content").stop(true, true).animate({opacity:"hide", top:"+=30px"}, 400);
			$j("#sl-blue").stop(true, true).animate({width:"hide"}, 400);
		}
	);

	$j("#produksjson_area").hover(
		function()
		{		
			$j("#sl-blue").stop(true, true).hide();
			$j("#splash_produksjson_content").stop(true, true).animate({opacity:"show", top:"-=30px"}, 400);
			$j("#sl-orange").stop(true, true).animate({width:"hide"}, 400);
		},
		function()
		{			
			$j("#splash_produksjson_content").stop(true, true).animate({opacity:"hide", top:"+=30px"}, 400);
			$j("#sl-orange").stop(true, true).animate({width:"show"}, 400);
		}
	);
});
