$(document).ready(function() {
	
	$(".nav_home").click(function(e){
			e.preventDefault();
			
			$('#ryska_posten_content').stop(true,true).fadeOut("200");
			$('#ryska_posten_content').stop(true,true).html('');
			$('#ryska_posten_content').load(this.href +" #target", function(){  
			
				$('#ryska_posten_content').stop(true,true).fadeIn("300");
				$("#sub_menu").stop(true,true).fadeOut("fast");	
				$("#swed").stop(true,true).hide();
				$("#english").stop(true,true).fadeIn("fast");
				$(".back").animate({width:"44",left:"0"},450);
				$.getScript('js/swfobject.js');
				$.getScript('js/swfobject_home.js');
				$.getScript('js/jquery.cycle.all.latest.js');
				$.getScript('js/pussel.js');
				$.getScript('js/slideshow.js');
			
			});
			
	});
		
	$(".nav").click(function(e){
			e.preventDefault();
			var DennaUrl = $(this).attr('name');
			
			$('#ryska_posten_content').stop(true,true).fadeOut("200");
			$('#ryska_posten_content').stop(true,true).html('');
			$('#ryska_posten_content').load(this.href +" #target", function(){  
			
				$('#ryska_posten_content').stop(true,true).fadeIn("300");
				$("#sub_menu").stop(true,true).fadeOut("fast");	
				$("#swed").stop(true,true).hide();
				$("#english").stop(true,true).fadeIn("fast");
					$.getScript('js/work.js');
					
					if(DennaUrl=="environment"){
					$.getScript('js/swfobject.js');
					$.getScript('js/swfobject_env.js');
						$(".back").animate({width:"47",left:"133"},450);
					}
					if(DennaUrl=="work"){
						$(".back").animate({width:"100",left:"180"},450);
					}
					if(DennaUrl=="news"){$(".back").animate({width:"62",left:"280"},450);}if(DennaUrl=="contact"){$(".back").animate({width:"60",left:"342"},450);}		
			});
			
	});
	
	$(".nav_english").click(function(e){
			e.preventDefault();
			
			$('#ryska_posten_content').stop(true,true).fadeOut("200");
			$('#ryska_posten_content').stop(true,true).html('');
			$('#ryska_posten_content').load(this.href +" #target", function(){  
			
				$('#ryska_posten_content').stop(true,true).fadeIn("300");
				$("#sub_menu").stop(true,true).fadeOut("fast");	
				$("#english").stop(true,true).hide();
				$("#swed").stop(true,true).fadeIn("fast");
				
			
			});
			
	});
	
	$(".nav_book").click(function(e){
			e.preventDefault();
			var DennaUrl = $(this).data('name');
			
			$('#ryska_posten_content').stop(true,true).fadeOut("200");
			$('#ryska_posten_content').stop(true,true).html('');
			$('#ryska_posten_content').load(this.href +" #target", function(){  
			
				$('#ryska_posten_content').stop(true,true).fadeIn("300");
				$("#sub_menu").stop(true,true).fadeIn("fast");	
				$("#swed").stop(true,true).hide();
				$("#english").stop(true,true).fadeIn("fast");
				$(".back").animate({width:"89",left:"44"},450);
			
			});
			
	});
	
	$(".nav_eventpage").click(function(e){
			e.preventDefault();
			
			$('#ryska_posten_content').stop(true,true).fadeOut("200");
			$('#ryska_posten_content').stop(true,true).html('');
			
			$('#ryska_posten_content').load(this.href +" #target", function(){  
				$.getScript('js/event.js');
				$('#ryska_posten_content').stop(true,true).fadeIn("300");
				$("#sub_menu").stop(true,true).fadeIn("fast");	
				$("#swed").stop(true,true).hide();
				$("#english").stop(true,true).fadeIn("fast");
				$(".back").animate({width:"89",left:"44"},450);
					
			
			});
			
	});
	
	$("#news_top").hover(
			function() { $("#news_bubble").fadeIn("fast"); },
			function() { $("#news_bubble").fadeOut("fast"); }
	);
	
});
