$(document).ready(function(){scalaria_document_ready();$('.bqend').click(function(){scalaria_flash_end()})})
function scalaria_document_ready(){scalaria_front_hide_viewscycle();scalaria_css_toggle();scalaria_set_height_cookie();scalaria_hide_topimage_fade();scalaria_language_icon_hover();scalaria_change_classes();scalaria_video_cookie_check();scalaria_start();scalaria_flash_front_resize()}
function scalaria_start(){$("#FRONT_sliding_panel_open").click(function(){$("#FRONT_video").height(440);$("#content-topimage").height(440);$("#FRONT_video").slideDown("slow");$("#content-topimage").slideDown("slow");$('#FRONT_sliding_panel_wrapper').addClass('FRONT_sliding_panel_default');$("#FRONT_toggle li").toggle()});$("#FRONT_sliding_panel_close").click(function(){$("#FRONT_video").slideUp("slow");$("#content-topimage").slideUp("slow");$('#FRONT_sliding_panel_wrapper').removeClass('FRONT_sliding_panel_default');$("#FRONT_toggle li").toggle()})}
function appendRef(container,reftag){var Link=$(container).attr("src"),afterLink=reftag;$(container).attr({src:(Link+afterLink)})}
function scalaria_flash_front_resize(){var lv_random=Math.floor(Math.random()*3);switch(lv_random){case 0:lv_randomsrc='orlando';break;case 1:lv_randomsrc='skydiver';break;case 2:lv_randomsrc='x-fighter';break;case 3:lv_randomsrc='intro';break;default:lv_randomsrc='skydiver'};lv_new_videosrc=lv_randomsrc;if($.cookie("video_front_already_seen")==1){$(".front #FRONT_video").height(150);$(".front #content-topimage").height(150);var mutedSrc=lv_new_videosrc;lv_new_videosrc=mutedSrc.replace(".swf","_mute.swf")}else{$(".front #FRONT_video").height(440);$(".front #content-topimage").height(440)};lv_new_videosrc='/sites/all/flash/'+lv_new_videosrc+'.swf';return true}
function scalaria_flash_front_end(){if($.cookie("video_front_already_seen")!=1){$("#block-block-8").hide();$("#block-views-topimage_fade1-block_2").show();$("#block-views-topimage_fade1-block_2").height(420);$("#content-topimage").height(420);$.cookie("video_front_already_seen","1",{expires:1})}else{$("#block-block-8").slideUp("slow");$("#content-topimage").slideUp("slow");$("#FRONT_toggle li").toggle()};return true}
function scalaria_flash_end(){$("#block-block-3").hide();$("#block-views-topimage_fade1-block_1").show();$("#block-views-topimage_fade1-block_1").height(420);$(".node-395 #content-topimage").height(420);$(".node-396 #content-topimage").height(420);$.cookie("video_doxteatro_already_seen","1",{expires:7});return true}
function scalaria_video_cookie_check(){if(!$.cookie("video_doxteatro_already_seen"))$("#itv").height(440);return true}
function scalaria_front_hide_viewscycle(){$("#block-views-topimage_fade1-block_2").hide();return true}
function scalaria_topimage_fade_pause_resume(){$('.views-cycle-prev').toggle(function(){$('#views-cycle-topimage_fade1-block_2').cycle('pause')},function(){$('#views-cycle-topimage_fade1-block_2').cycle('resume')})}
function scalaria_css_toggle(){$('.bqstart').toggle(function(){$('body').removeClass('dark')},function(){$('body').addClass('dark')})}
function createCookie(name,value,days){if(days){var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1e3));var expires="; expires="+date.toGMTString()}else var expires="";document.cookie=name+"="+value+expires+"; path=/"}
function readCookie(name){var nameEQ=name+"=",ca=document.cookie.split(';');for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==' ')c=c.substring(1,c.length);if(c.indexOf(nameEQ)==0)return c.substring(nameEQ.length,c.length)};return null}
function eraseCookie(name){createCookie(name,"",-1)}
function detect_screen_height(){if(window.innerHeight){return window.innerHeight}else if(document.body&&document.body.offsetHeight){return document.body.offsetHeight}else return 0}
function getHeight(win){var de=document.documentElement,Height=window.innerHeight||self.innerHeight||(de&&de.clientHeight)||document.body.clientHeight;return Height}
function scalaria_set_height_cookie(){createCookie("screenheight",getHeight(),1);return true}
function scalaria_hide_topimage_fade(){if((getHeight())<200){$('#block-views-topimage_fade1-block_1').addClass('topimageheightzero');$("#block-views-topimage_fade1-block_1").hide();$("#content-topimage").hide();$("#block-views-topimage_fade1-block_1").height(0)}else $('#block-views-topimage_fade1-block_1').addClass('topimageheight');return true}
function scalaria_language_icon_hover(){$(".language-icon").mouseover(function(){var src=$(this).attr("src").match(/[^\.]+/)+"_over.png";$(this).attr("src",src)}).mouseout(function(){var src=$(this).attr("src").replace("_over","");$(this).attr("src",src)})}
function scalaria_goto_button(){var el=$('.quicktabs_tabpage .field-content');if($(el).html().trim().charAt(0)=="go to"){$(el).text($(el).text().replace("go to","-"))}else $(el).text($(el).text().replace("go to","+"))}
function scalaria_change_classes(){if($(location).attr('href').indexOf("scalaria_tv_overview")!==-1||$(location).attr('href').indexOf("scalaria_impressions_overview")!==-1)$('body').removeClass('sidebar-right')};
jQuery.easing['jswing']=jQuery.easing['swing'];jQuery.extend(jQuery.easing,{def:'easeOutQuad',swing:function(x,t,b,c,d){return jQuery.easing[jQuery.easing.def](x,t,b,c,d)},easeInQuad:function(x,t,b,c,d){return c*(t/=d)*t+b},easeOutQuad:function(x,t,b,c,d){return-c*(t/=d)*(t-2)+b},easeInOutQuad:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t+b;return-c/2*((--t)*(t-2)-1)+b},easeInCubic:function(x,t,b,c,d){return c*(t/=d)*t*t+b},easeOutCubic:function(x,t,b,c,d){return c*((t=t/d-1)*t*t+1)+b},easeInOutCubic:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t+b;return c/2*((t-=2)*t*t+2)+b},easeInQuart:function(x,t,b,c,d){return c*(t/=d)*t*t*t+b},easeOutQuart:function(x,t,b,c,d){return-c*((t=t/d-1)*t*t*t-1)+b},easeInOutQuart:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t+b;return-c/2*((t-=2)*t*t*t-2)+b},easeInQuint:function(x,t,b,c,d){return c*(t/=d)*t*t*t*t+b},easeOutQuint:function(x,t,b,c,d){return c*((t=t/d-1)*t*t*t*t+1)+b},easeInOutQuint:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t*t+b;return c/2*((t-=2)*t*t*t*t+2)+b},easeInSine:function(x,t,b,c,d){return-c*Math.cos(t/d*(Math.PI/2))+c+b},easeOutSine:function(x,t,b,c,d){return c*Math.sin(t/d*(Math.PI/2))+b},easeInOutSine:function(x,t,b,c,d){return-c/2*(Math.cos(Math.PI*t/d)-1)+b},easeInExpo:function(x,t,b,c,d){return(t==0)?b:c*Math.pow(2,10*(t/d-1))+b},easeOutExpo:function(x,t,b,c,d){return(t==d)?b+c:c*(-Math.pow(2,-10*t/d)+1)+b},easeInOutExpo:function(x,t,b,c,d){if(t==0)return b;if(t==d)return b+c;if((t/=d/2)<1)return c/2*Math.pow(2,10*(t-1))+b;return c/2*(-Math.pow(2,-10*--t)+2)+b},easeInCirc:function(x,t,b,c,d){return-c*(Math.sqrt(1-(t/=d)*t)-1)+b},easeOutCirc:function(x,t,b,c,d){return c*Math.sqrt(1-(t=t/d-1)*t)+b},easeInOutCirc:function(x,t,b,c,d){if((t/=d/2)<1)return-c/2*(Math.sqrt(1-t*t)-1)+b;return c/2*(Math.sqrt(1-(t-=2)*t)+1)+b},easeInElastic:function(x,t,b,c,d){var s=1.70158,p=0,a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4}else var s=p/(2*Math.PI)*Math.asin(c/a);return-(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b},easeOutElastic:function(x,t,b,c,d){var s=1.70158,p=0,a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4}else var s=p/(2*Math.PI)*Math.asin(c/a);return a*Math.pow(2,-10*t)*Math.sin((t*d-s)*(2*Math.PI)/p)+c+b},easeInOutElastic:function(x,t,b,c,d){var s=1.70158,p=0,a=c;if(t==0)return b;if((t/=d/2)==2)return b+c;if(!p)p=d*(.3*1.5);if(a<Math.abs(c)){a=c;var s=p/4}else var s=p/(2*Math.PI)*Math.asin(c/a);if(t<1)return-.5*(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;return a*Math.pow(2,-10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p)*.5+c+b},easeInBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*(t/=d)*t*((s+1)*t-s)+b},easeOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*((t=t/d-1)*t*((s+1)*t+s)+1)+b},easeInOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;if((t/=d/2)<1)return c/2*(t*t*(((s*=1.525)+1)*t-s))+b;return c/2*((t-=2)*t*(((s*=1.525)+1)*t+s)+2)+b},easeInBounce:function(x,t,b,c,d){return c-jQuery.easing.easeOutBounce(x,d-t,0,c,d)+b},easeOutBounce:function(x,t,b,c,d){if((t/=d)<(1/2.75)){return c*(7.5625*t*t)+b}else if(t<(2/2.75)){return c*(7.5625*(t-=(1.5/2.75))*t+.75)+b}else if(t<(2.5/2.75)){return c*(7.5625*(t-=(2.25/2.75))*t+.9375)+b}else return c*(7.5625*(t-=(2.625/2.75))*t+.984375)+b},easeInOutBounce:function(x,t,b,c,d){if(t<d/2)return jQuery.easing.easeInBounce(x,t*2,0,c,d)*.5+b;return jQuery.easing.easeOutBounce(x,t*2-d,0,c,d)*.5+c*.5+b}});
jQuery.cookie=function(name,value,options){if(typeof value!='undefined'){options=options||{};if(value===null){value='';options.expires=-1};var expires='';if(options.expires&&(typeof options.expires=='number'||options.expires.toUTCString)){var date;if(typeof options.expires=='number'){date=new Date();date.setTime(date.getTime()+(options.expires*24*60*60*1e3))}else date=options.expires;expires='; expires='+date.toUTCString()};var path=options.path?'; path='+(options.path):'',domain=options.domain?'; domain='+(options.domain):'',secure=options.secure?'; secure':'';document.cookie=[name,'=',encodeURIComponent(value),expires,path,domain,secure].join('')}else{var cookieValue=null;if(document.cookie&&document.cookie!=''){var cookies=document.cookie.split(';');for(var i=0;i<cookies.length;i++){var cookie=jQuery.trim(cookies[i]);if(cookie.substring(0,name.length+1)==(name+'=')){cookieValue=decodeURIComponent(cookie.substring(name.length+1));break}}};return cookieValue}};
/*
function Flap_Close() { 
	document.getElementById("Top1").style.height="60px"; document.getElementById("Hartlauer").style.height="60px"; document.getElementById("Top1").style.backgroundColor="#DADADA"; document.getElementById("Hartlauer").style.backgroundColor="#DADADA"; 
} 

function Flap_Open() { 
	document.getElementById("Top1").style.height="400px"; document.getElementById("Hartlauer").style.height="400px"; document.getElementById("Top1").style.backgroundColor="#DADADA"; document.getElementById("Hartlauer").style.backgroundColor="#DADADA"; 
}

function gross() {
	document.getElementById("test12345").style.clip = "rect(0px 468px 600px 0px)";	
}

function klein() {
	document.getElementById("test12345").style.clip = "rect(250px 468px 600px 0px)";	
}

function iab_interstitial() { 
  document.getElementById('onesb').style.visibility='hidden'; 
  document.getElementById('onesb').style.posTop=-1000; 
}

function showad()
{
setTimeout("iab_hide()",20000); 
}


function iab_hide() 
{ 
document.getElementById('Layer1').style.visibility='hidden'; 
document.getElementById('Layer1').style.posTop=-1000; 
} 


function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=500,height=1071,left = 200,top = 300');");
}

function farbwechsel() { 
document.body.style.backgroundImage="url(http://tbn0.google.com/images?q=tbn:RVEkrDfxqSv-JM:http://www.werbeplanung.at/upload/oe24_Logo603.jpg)";
} 


//var isInternetExplorer = navigator.appName.indexOf("Microsoft") != -1;

function jalousie_close() {
				//alert("jalousie_close()")

				//var flapbarObj = isInternetExplorer ? document.all.flapbar : document.flapbar;
				//flapbarObj.collapse();
				//var skyscraperObj = isInternetExplorer ? document.all.skyscraper : document.skyscraper;
				//skyscraperObj.collapse();

				//	resize container
				//flapbarObj.style.height = "90px";
				document.getElementById("adcontainerTop").style.height="90px"; document.getElementById("Jalousine").style.height="90px"; document.getElementById("adcontainerTop").style.backgroundColor="#FFFFFF"; document.getElementById("Jalousine").style.backgroundColor="#FFFFFF"; 
	document.getElementById("main").style.position = "absolute";
	document.getElementById("main").style.top="0px";
	document.getElementById("sky").style.top="90px"; 
			}

function jalousie_open() {
				//alert("jalousie_open()")

				//var flapbarObj = isInternetExplorer ? document.all.flapbar : document.flapbar;
				//flapbarObj.expand();
				//var skyscraperObj = isInternetExplorer ? document.all.skyscraper : document.skyscraper;
				//skyscraperObj.expand();

				//	resize container
				//flapbarObj.style.height = "400px";
				document.getElementById("adcontainerTop").style.height="400px"; document.getElementById("Jalousine").style.height="400px"; document.getElementById("adcontainerTop").style.backgroundColor="#FFFFFF"; document.getElementById("Jalousine").style.backgroundColor="#FFFFFF"; 
	document.getElementById("main").style.position = "absolute";
	document.getElementById("main").style.top="300px"; 
	document.getElementById("sky").style.top="400px"; 
			}



function jalousie_firstopen() { 
	document.getElementById("adcontainerTop").style.height="400px"; document.getElementById("Jalousine").style.height="400px"; document.getElementById("adcontainerTop").style.backgroundColor="#FFFFFF"; document.getElementById("Jalousine").style.backgroundColor="#FFFFFF";
	document.getElementById("main").style.position = "absolute";
	document.getElementById("main").style.top="300px"; 
}


function hakle_close() {
				document.getElementById("adcontainerTop").style.height="95px"; 
				document.getElementById("Jalousine_klein").style.visibility="visible"; 
				document.getElementById("Jalousine_gross").style.visibility="hidden"; 
				document.getElementById("adcontainerTop").style.backgroundColor="#DADADA"; 
	document.getElementById("main").style.position = "absolute";
	document.getElementById("main").style.top="0px";
	document.getElementById("sky").style.top="95px"; 
			}

function hakle_open() {
				document.getElementById("adcontainerTop").style.height="400px"; 
				document.getElementById("Jalousine_klein").style.visibility="hidden"; 
				document.getElementById("Jalousine_gross").style.visibility="visible"; 
				document.getElementById("adcontainerTop").style.backgroundColor="#DADADA"; 
		document.getElementById("main").style.position = "absolute";
	document.getElementById("main").style.top="300px"; 
	document.getElementById("sky").style.top="400px"; 
			}


function itv_close() {
	flapbarObj.style.height = "90px";
	document.getElementById("adcontainerTop").style.height="95px"; 
	document.getElementById("itv").style.height="95px"; 
	document.getElementById("adcontainerTop").style.backgroundColor="#DADADA"; 
	document.getElementById("itv").style.backgroundColor="#DADADA"; 
	document.getElementById("main").style.position = "absolute";
	document.getElementById("main").style.top="0px";
	document.getElementById("sky").style.top="95px"; 
			}
			
			
function itv_open() {
	document.getElementById("adcontainerTop").style.height="400px"; 
	document.getElementById("itv").style.height="400px"; 
	document.getElementById("adcontainerTop").style.backgroundColor="#DADADA"; 
	document.getElementById("itv").style.backgroundColor="#DADADA"; 
	document.getElementById("main").style.position = "absolute";
	document.getElementById("main").style.top="300px"; 
			}

function iab_resize(size) {
document.getElementById("itv").style.height=size+"px";
//document.getElementById("adTop").style.height=size+"px"; 
//document.getElementById("fullContent").style.top=size+"px";
//document.getElementById("adTop").style.backgroundColor="white"; 
document.getElementById("itv").style.backgroundColor="white"; 
//document.getElementById("fullContent").style.position = "absolute";
}

function jalousine_open() {
				document.getElementById("adcontainerTop").style.height="400px"; document.getElementById("Jalousine").style.height="400px"; document.getElementById("adcontainerTop").style.backgroundColor="#FFFFFF"; document.getElementById("Jalousine").style.backgroundColor="#FFFFFF"; 
	document.getElementById("main").style.position = "absolute";
	document.getElementById("main").style.top="300px"; 
	document.getElementById("sky").style.top="400px"; 
}

function jalousine_close() {
				document.getElementById("adcontainerTop").style.height="105px"; document.getElementById("Jalousine").style.height="105px"; document.getElementById("adcontainerTop").style.backgroundColor="#FFFFFF"; document.getElementById("Jalousine").style.backgroundColor="#FFFFFF"; 
	document.getElementById("main").style.position = "absolute";
	document.getElementById("main").style.top="0px";
	document.getElementById("sky").style.top="105px"; 
}

function spop()
{
setTimeout("iab_hide()",10000); 
}



function IABclose() {
document.getElementById("a1").style.height="90px";
document.getElementById("adcontainerTop").style.height="90px"; 
document.getElementById("adTop").style.height="90px"; 
document.getElementById("fullContent").style.position = "absolute";
	document.getElementById("fullContent").style.top="95px"; 
}


function IABopen() {
document.getElementById("a1").style.height="600px";
document.getElementById("adcontainerTop").style.height="600px"; 
document.getElementById("adTop").style.height="600px"; 
document.getElementById("fullContent").style.position = "absolute";
	document.getElementById("fullContent").style.top="600px"; 
} 

function TMobile_Close() { 
	document.getElementById("adcontainerx02").style.height="95px"; document.getElementById("TMobile").style.height="95px"; document.getElementById("adcontainerx02").style.backgroundColor="#DADADA"; document.getElementById("TMobile").style.backgroundColor="#DADADA"; 
} 

function TMobile_Open() { 
	document.getElementById("adcontainerx02").style.height="250px"; document.getElementById("TMobile").style.height="250px"; document.getElementById("adcontainerx02").style.backgroundColor="#DADADA"; document.getElementById("TMobile").style.backgroundColor="#DADADA"; 
}

function TMobile_FirstOpen() { 
	document.getElementById("adcontainerx02").style.height="250px"; document.getElementById("TMobile").style.height="250px"; document.getElementById("adcontainerx02").style.backgroundColor="#DADADA"; document.getElementById("TMobile").style.backgroundColor="#DADADA";
	setTimeout("TMobile_Close()",3000); 
}


jalousie  = {
	init : function(params){
		this.mini = params.mini;
		this.big = params.big;
		this.ank = params.ank;
		this.ank.onclick = function(){
			jalousie.move();
		}
		this.state = 0;
	},

	move : function(){
		if(this.state){
			this.state = 0;
			this.mini.style.display = 'block';
			this.big.style.display = 'none';
			this.ank.style.left = "700px";
		}else{
			this.state = 1;
			this.mini.style.display = 'none';
			this.big.style.display = 'block';
			this.ank.style.left = "800px";
		}
	}
}

function getXYcoordobjfcad (obj) 
{ 
	var elm = obj;
	if ( document.layers ) return elm;
	var rd = { x:0 ,y:0 }; 
	do 
	{ 
		rd.x += parseInt( elm.offsetLeft ); 
		rd.y += parseInt( elm.offsetTop );       
		elm = elm.offsetParent;
	} 
	while ( elm );
	return rd;
}
function getXYcoordfcad ( nvn ) 
{ 
	var elm = document.images[nvn];
	if ( document.layers ) return elm;
	var rd = { x:0 ,y:0 }; 
	do 
	{ 
		rd.x += parseInt( elm.offsetLeft ); 
		rd.y += parseInt( elm.offsetTop );    
alert("offsetleft: " + elm.offsetLeft + ", offsettop: " + elm.offsetTop + ", x: " + rd.x + ", y: " + rd.y);
		elm = elm.offsetParent;
	} 
	while ( elm );
//alert(rd.x);
	return rd;
}

function initFlapbannerfcad()
{
var pos_flap = getXYcoordfcad( 'flap_empty' );
}	


var pubid = '154253';
var page = 'oe24';
var ts = new Date().getTime();
document.write(unescape('%3Cimg src="'+document.location.protocol+'//et.twyn.com/sense?pubid='
+escape(pubid)+'&page='+escape(page)+'&ts='+ts+'" width="10" height="1" /%3E'));

*/;
;

