sfHover = function() {
		var sfEls = document.getElementById("nav").getElementsByTagName("LI");
		for (var i=0; i<sfEls.length; i++) {
			sfEls[i].onmouseover=function() {
				this.className+=" over";
			}
			sfEls[i].onmouseout=function() {
				this.className=this.className.replace(new RegExp(" over\\b"), "");
			}
		}
	}
	if (window.attachEvent) window.attachEvent("onload", sfHover);



$(function() {
    $('#main').cornerz({radius:20, background:'#3d3835', corners: "tl tr"})
    $('#main').cornerz({radius:20, background:'#988d86', corners: "bl br"})	
})

$(document).ready(function(){

	/*sfHover = function() {
		var sfEls = document.getElementById("nav").getElementsByTagName("LI");
		for (var i=0; i<sfEls.length; i++) {
			sfEls[i].onmouseover=function() {
				this.className+=" over";
			}
			sfEls[i].onmouseout=function() {
				this.className=this.className.replace(new RegExp(" over\\b"), "");
			}
		}
	}
	if (window.attachEvent) window.attachEvent("onload", sfHover);
*/
    $(".flip-1").click(function () {
		$("#box-1").hide();
		$("#box-2").hide();
		$("#box-3").hide();
		$("#box-4").hide();
		$("#box-tab").hide();
		$("#tmp").hide();
		$("#box-all-livedome").hide();
		$("#box-all-faq").show();
		return false;
	});
    $(".flip-2").click(function () {
		$("#box-all-faq").hide();
		$("#box-all-livedome").hide();
		$("#box-1").show();
		$("#box-2").show();
		$("#box-3").show();
		$("#box-4").show();
		$("#box-tab").show();
		$("#tmp").show();
		return false;
	});
	$(".flip-3").click(function () {
		$("#box-1").hide();
		$("#box-2").hide();
		$("#box-3").hide();
		$("#box-4").hide();
		$("#box-tab").hide();
		$("#tmp").hide();
		$("#box-all-livedome").show();
		$("#box-all-faq").hide();
		return false;
	});
    $(".flip-4").click(function () {
		$("#box-all-faq").hide();
		$("#box-all-livedome").hide();
		$("#box-1").show();
		$("#box-2").show();
		$("#box-3").show();
		$("#box-4").show();
		$("#box-tab").show();
		$("#tmp").show();
		return false;
	});
    $(".tab-1").click(function () {
		if ($("#content-2").css("display")=="none")
		{
			$("#items li:last").addClass("active");
			$("#items li:first").removeClass("active");		
			$("#content-1").hide();
			$("#content-2").show();
		}
		else
		{
			$("#items li:first").addClass("active");
			$("#items li:last").removeClass("active");		
			$("#content-1").show();
			$("#content-2").hide();
		}
		return false;
	});
    $(".tab-2").click(function () {
		if ($("#content-1").css("display")=="none")
		{
			$("#items li:first").addClass("active");
			$("#items li:last").removeClass("active");
			$("#content-2").hide();
			$("#content-1").show();
		}
		else
		{
			$("#items li:last").addClass("active");
			$("#items li:first").removeClass("active");		
			$().addClass("active");		
			$("#content-2").show();
			$("#content-1").hide();
		}
		return false;
	});		
});
// starts the flash player
function play()
			{			
				var fl=document.getElementById("flashplayer");				
				fl.className="shown_player";
				/*fl.style.display="block";
				fl.style.position="absolute";
				fl.style.top='37px';
				fl.style.left='10px';*/
				//fl.style.background-color='#cc0000';
				
				//position:absolute;top:37px;left:19px; background-color:#cc0000; margin-left:0px; margin-top:0px;
				//fl.setAttribute("class","shown_player");
			}
//stops the flash player
function stop()
			{					
				var fl=document.getElementById("flashplayer");
				fl.className="hidden_player";
				//fl.style.display = "none";				
				 //fl.setAttribute("class","hidden_player");
			}
function show(id)
{
	var s=document.getElementById(id);
	s.className="vis";	
	//alert(s.className);
}
function hide(id)
{
	var s=document.getElementById(id);
	s.className="invis";	
}
//show livedome player
function show_player(id)
{
		window.open('http://www.livedome.com/player/live_player.html?portal=livedome.com&id='+id,'Liveplayer',
                                        'height=620,width=990,menubar=no,location=no,resizeable=no,status=no,toolbar=no,dependent=no,scrollbars=no');
}

function show_ondemand_player(id)
{
		window.open('http://kunden.wundermedia.de/livedome/player/demos/'+id+'/livedome.com/','MBC',
                                        'height=620,width=990,menubar=no,location=no,resizeable=no,status=no,toolbar=no,dependent=no,scrollbars=no');
}

function readURL()
{
	var domain="";
	var url_de  = document.URL.search(/livedome.de.+/);
	var url_com = document.URL.search(/livedome.com.+/);
	var url_uk  = document.URL.search(/livedome.co.uk.+/);
	var start_page = document.URL.search(/index.php.+/);
	var start_page_en = document.URL.search(/index_en.php.+/);
	var contact_page = document.URL.search(/kontakt_en.+/);
	var about_us = document.URL.search(/about_us_en.+/);
	var partner = document.URL.search(/partner_en.+/);
	var werbepartner_page = document.URL.search(/werbepartner_en.+/);
	//alert('test');

	//if(url_de!="-1") domain="de"; 
	//if(url_com!="-1") domain="com";
	if(url_uk!="-1")
	{		
		//domain="uk";
		hide("language");
		hide("footer_line");
		hide("contact_us");
		show("contact_us_uk");
		hide("header_en");
		show("header_uk");
		
		if(start_page!="-1") window.location.href="http://www.livedome.co.uk/index_en.php";
		if(start_page_en!="-1") { hide("werbepartner_img_en"); show("werbepartner_img_uk");}// || werbepartner_page!="-1"
		if(contact_page!="-1") 	{ hide("anfahrt"); show("anfahrt_uk");		}		
		
		if(contact_page!="-1" || about_us!="-1" ||  partner!="-1")
		{
			$("#box-1").hide();
			$("#box-2").hide();
			$("#box-3").hide();
			$("#box-4").hide();
			$("#box-tab").hide();
			$("#tmp").hide();
			$("#box-all-livedome").show();
			$("#box-all-faq").hide();
		}
		//alert(domain);
	}	
	
	
	
	return domain;
}
var open_flash_interview=function(id)
	{		
		window.open('http://kunden.wundermedia.de/livedome/player/demos/'+id+'/livedome.com/interview.html','Interview','height=408px,width=480px,menubar=no,location=no,resizeable=yes,status=no,toolbar=no,dependent=no,scrollbars=no');
	}	