$(document).ready(function(){

	swfobject.embedSWF("/flash/top.swf", "FlashPlace", "960", "350", "9.0.0", "expressInstall.swf", {}, { 'scale':'noscale','menu': 'false', 'wmode': 'transparent' }, { 'align':'top' } );
	
	$("#Menu ul").css({display: "none"}); // Opera Fix
	$("#Menu li").hover(function(){ $(this).find('ul:first').css({visibility: "visible",display: "none"}).show(200); },function(){ $(this).find('ul:first').css({visibility: "hidden"}); });
	
	$('a.Rep,a.RepGB').each(function(){
		var e = $(this).attr("href").replace("/","").split(".html")[0]+"@"+$(this).attr("rel");
		$(this).attr({"href":"mailto:"+e});
		if($(this).attr('class').indexOf('RepGB')==-1) $(this).text(e);
	});
	
	$(".lightbox").fancybox({
		'autoScale'			: true,
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'type'				: 'image'
	});
	
	$("#Main .Text p:last").css({'padding-bottom':'0px'});
	
	$("#FastJump").hover(
		function () { $(this).stop().fadeTo('fast', 1); }, 
		function () { $(this).stop().fadeTo('slow', 0.3); }
	);

	
});

function Go2Home() {
	var lang = window.location.pathname.split("/")[1];
	window.location = "/"+(lang.length==2?lang+"/":"");
}

function EmbedSWF(url,place,w,h) {
	swfobject.embedSWF(url, place, w, h, "9.0.0", "expressInstall.swf", false, { 'menu':'false', 'wmode':'transparent' }, false);
}

function checkEmail(x){return/^[\w\.-]+@([\w-]+\.)*[a-z]{2,4}$/.test(x)}

function ShowError(txt) {
	$.fancybox({
		'autoScale'			: true,
		'content'			: '<div id="Question"><div class="txt">'+txt+'</div></div>'
	});
	return false;
}

