// Jquery kompatibel zu scriptaculous.js
var $j = jQuery.noConflict();

// Dome Ready
$j(document).ready(function(){

	//Function f�r die linke Navigation 
	$j(".content-left-navi-first-level a").mouseover(function() {	
		$j(this).next("ul.content-left-ul-second-level").slideToggle("slow").siblings("ul.content-left-ul-second-level").slideUp("slow");    	 	
	});

	//Navi aufgeklappt bei selektiertem Men�punkt 
	$j(".content-left-navi-first-level-in-rootline a").next("ul.content-left-ul-second-level").css('display', 'block');   	
	
	//Hauptnavigation Hochfaden 
	$j(".top-navi").hover(function() {$j(this).animate({ marginTop: '-10px' }, 'fast');}, function() {$j(this).animate({ marginTop: '0px' }, 'fast');});
	
	//Schriftgr��e Normal
	//$j(".small").click(function() { $j('#content-middel-box-content').css('font-size', 13); });
  
	//Schriftgr��e Gro�
	//$j(".big").click(function() { $j('#content-middel-box-content').css('font-size', 20); });
	
	//Bookmark 
	//$j('#bookmark').jFav(); 
	
	
	
	/// ---------------------- IPhone störer 
	
	
	/*if(window.location.href.indexOf("/startseite.html") != -1 || window.location.href.indexOf("/index.php?id=5") != -1 || window.location.href == "http://www.tvn.de/")
	{
		openFlashStoerer();
	}*/
  
});
	


function clearForm(elem){
	elem.select();
}


function openFlashStoerer(){
	
	var COOKIE_NAME = 'IphoneStoerer_10';
	var options = { path: '/', expires: 5 };

	if($j.cookie(COOKIE_NAME) != "deactivated")
	{	
		// Cooki setzen
		$j.cookie(COOKIE_NAME, 'deactivated', options);
		// div erstellen 
		$j('<div id="IphoneStoerer" style="width:990px;height:982px;position:absolute;top:0;"></div>').appendTo('#wrapper_outer');
		// cssEigenschaft von c291 (iPhone App)
		$j('#c291').css("height", 210 +"px");
		// Flash in Container laden 
		$j('#IphoneStoerer').flash({
    			src: 'fileadmin/sys/template/swf/stoerer/iphoneStoerer.swf',
    			width: 	100+"%",
    			height: 100+"%",
    			wmode:	"transparent" 
		});
		
		$j('<div id="IphoneStoererImg" style="visibility: hidden; top: -14px; left: 3px; position: relative;"><a href="/pressemitteilungen_view.html?&tx_ttnews[tt_news]=88"><img src="/fileadmin/sys/template/img/IphonePageImage.jpg" alt="Iphone Apps"></a></div>').appendTo('#c291');
	}
	else{
		$j('<div id="IphoneStoererImg" style="top: -14px; left: 3px; position: relative;"><a href="/pressemitteilungen_view.html?&tx_ttnews[tt_news]=88&cHash=b9c44ce787f47a49c328230d61ba4180"><img src="/fileadmin/sys/template/img/IphonePageImage.jpg" alt="Iphone Apps"></a></div>').appendTo('#c291');
	
	}
}


function killFlashStoerer(){
	$j('#IphoneStoerer').remove();	
	$j('#IphoneStoererImg').css("visibility", "visible");
}
