$(document).ready(function() { 

if ($("div#header_img img").size() > 0){
	$("div#header_img").height(320);
	$(".subpagenav-shadow").css("top", "-30px")



}

if ($("#subpages ul").size() == 0){
	$(".subpagenav-shadow").hide();
	$("#content_main").css("left", "140px");
	}




$(".selected.icl-level-2").parent().parent('li').addClass('selected_page_side');
$("body").append('<div class="shadow_bottom"></div>');
$('.main_socialLinks a, .socialLinks a').click(function(){
	newPopup($(this).attr('href'));	
	return false;
});
});



$(window).load(function () {  
   $("div#header_img").tabs("#header_img > img", { 

	        // enable "cross-fading" effect 
	        effect: 'fade',
				fadeInSpeed: 2000, 
	        fadeOutSpeed: 2000, 

	        // start from the beginning after the last tab 
	        rotate: true

	    // use the slideshow plugin. It accepts its own configuration 
	    }).slideshow({
		autoplay: true,
		interval: 6000
	});


});  
function newPopup(url) {
	popupWindow = window.open(url,'popUpWindow','height=900,width=1000,left=10,top=10,resizable=yes,scrollbars=yes,toolbar=yes,menubar=yes,location=yes,directories=yes,status=yes')
}

