
var futura = { src: 'fileadmin/templates/swf/futura.swf' };

// sIFR.domains = ['novemberborn.net'] // Don't check for domains in this demo
sIFR.useStyleCheck = true;
sIFR.activate(futura);

sIFR.replace(futura,{
  selector:"#inhalt-center h1",
  css:[".sIFR-root { color:#0d2754; height: 28px }" ],
  wmode:"transparent"
});
/*
sIFR.replace(futura, {
	selector: '#inhalt-center h1',
	css: { '.sIFR-root': { 'color':'#0d2754', 'height':'28px' }}
});
*/
sIFR.replace(futura, {
	selector: '.subteaser h2',
	css: { '.sIFR-root': { 'color':'#ffffff', 'backgroundColor': 'transparent' }},
	wmode: 'transparent'
});

sIFR.replace(futura, {
	selector: '.ap-teaser h2',
	css: { '.sIFR-root': { 'color':'#0d2754', 'backgroundColor': 'transparent', 'fontSize':'15px' }},
	wmode: 'transparent'
});

sIFR.replace(futura, {
	selector: '#content .teaser h2',
	css :{ '.sIFR-root' : { 'color' : '#202020' }}
});


/*
    var futura = {
      src: 'fileadmin/templates/swf/futura.swf'
    };



    // sIFR.domains = ['novemberborn.net'] // Don't check for domains in this demo
    sIFR.useStyleCheck = true;
    sIFR.activate(futura);


	sIFR.replace(futura, {selector: '.subteaser h2',css: {
        '.sIFR-root': {
			'color':'#ffffff',
			'backgroundColor': 'transparent'
		 }

      },
		 wmode: 'transparent' });


	sIFR.replace(futura, {selector: '.ap-teaser h2',css: {
        '.sIFR-root': {
			'color':'#0d2754',
			'backgroundColor': 'transparent',
			'fontSize':'15px'
		 }
      },
		 wmode: 'transparent' });

    sIFR.replace(futura, {selector: '#content .teaser h2', css :{
			'.sIFR-root' : {
				color : '#202020'
			}
		}});
	sIFR.replace(futura, {selector: '#inhalt-center h1',css: {
        '.sIFR-root': { 'color':'#0d2754',
		'height':'18px' }
      } });


*/
/*
window.addEvent('domready',function(){
FLIR.init( { path: 'fileadmin/templates/php/' } );
FLIR.auto();

// Or, you can pass an array of selectors to the auto function to be replaced.
FLIR.auto( [ 'h1', 'h2', 'h3.special', 'strong#important' ] );
//console.log('ASDF');
});

*/
/*
sIFR.replaceElement(named({sSelector:".subteaser h2", sFlashSrc:"fileadmin/templates/js/sifr2/futura.swf", sColor:"#ffffff", sLinkColor:"#000000", sBgColor:"#FFFFFF", sHoverColor:"#CCCCCC", nPaddingTop:0, nPaddingBottom:0}));
sIFR.replaceElement(named({sSelector:".ap-teaser h2", sFlashSrc:"fileadmin/templates/js/sifr2/futura.swf", sColor:"#0d2754", sLinkColor:"#000000", sBgColor:"#FFFFFF", sHoverColor:"#CCCCCC", nPaddingTop:0, nPaddingBottom:0}));
sIFR.replaceElement(named({sSelector:"#content .teaser h2", sFlashSrc:"fileadmin/templates/js/sifr2/futura.swf", sColor:"#202020", sLinkColor:"#000000", sBgColor:"#FFFFFF", sHoverColor:"#CCCCCC", nPaddingTop:0, nPaddingBottom:0}));
sIFR.replaceElement(named({sSelector:"#inhalt-center h1", sFlashSrc:"fileadmin/templates/js/sifr2/futura.swf", sColor:"#0d2754", sLinkColor:"#000000", sBgColor:"#FFFFFF", sHoverColor:"#CCCCCC", nPaddingTop:0, nPaddingBottom:0}));
*/


window.addEvent('load',function(){

	if($('flashbox'))
	{
		var swf = new Swiff('fileadmin/templates/swf/ikor_new2.swf', {
		id: 'fpswf',
		width: 930, //931
		height: 295, //293
		params: {
				wmode: 'transparent'
		},
		vars : {
			xml_content : 'index.php?id=1&xml=true&no_cache=1'+((window.location).toString().test(/(\en\/)/i)?'&L=1':'')
		}
		});

		swf.inject($('flashbox'));
	}

	$("srchsbmt").addEvent("click",function($e)
	{
		$e.stop();
		$$("form")[0].submit();
	});

	if(Browser.Engine.webkit)
	{
		$$("#inhalt").addClass("safari");
	}

	if($$(".tx-indexedsearch-res").length > 1)
	{
		$$(".tx-indexedsearch-res").getLast().getElements("p").setStyle("borderBottom","none");

		var tpages = Math.ceil(parseInt($$(".tx-indexedsearch-whatis")[0].get('text').split(" ")[0]) / 10);

		$$("#pagi a")[grottosearch._last === null?0:grottosearch._last+1 - ($$("#pagi a")[0].get('text')-1)].addClass("current");


		if(tpages > 1)
		{

			new Element("div",{'id':'fpagi'}).inject($$(".tx-indexedsearch-res")[0]);
			var blink = new Element("div",{'id':'fp-back'}).inject($("fpagi"));
			var flink = new Element("div",{'id':'fp-next'}).inject($("fpagi"));

			var lnks = $$("#pagi a");

			if(grottosearch._last > -1 && grottosearch._last != null)
			{
				//zur.ck link
				new Element("a",{
					'text' : ENGLISH?'previous':'zur.ck',
					'href': '#',
					'events' : {
						click : function($e)
						{
							$e.stop();
							document.tx_indexedsearch['tx_indexedsearch[pointer]'].value=grottosearch._last;
							document.tx_indexedsearch['tx_indexedsearch[_freeIndexUid]'].value='-1';
							document.tx_indexedsearch.submit();
						}
					}

				}).inject($("fp-back"));
			}

			if(grottosearch._next)
			{
				//n.chster link
				new Element("a",{
					'text' : ENGLISH?'next':'weiter',
					'href': '#',
					'events' : {
						click : function($e)
						{
							$e.stop();
							document.tx_indexedsearch['tx_indexedsearch[pointer]'].value=grottosearch._next;
							document.tx_indexedsearch['tx_indexedsearch[_freeIndexUid]'].value='-1';
							document.tx_indexedsearch.submit();
						}
					}

				}).inject($("fp-next"));
			}

		}
	}


	if((window.location + "").test(/glossar/i))
	{

		var toptar = $$('a[text$="oben"]')[0].get('href').split("/").getLast().substr(1);


		new Element("a",{
			text : '',
			name : toptar,
			styles : {
				background : 'none',
				padding : 0
			}
		}).inject($("glossar-index"),"before");

		var tmp = $("glossar-index").get('text').split(" ");
		$("glossar-index").empty();
		tmp.each(function(item){

		    if(tar = $$("h2[text="+item+"]")[0])
		    {
		        new Element("a",{
		            text : item,
		            href : window.location.pathname + '#glossar-'+item
		        }).inject($("glossar-index"));

		        $("glossar-index").appendText(" ");

		        tar.empty();
		        new Element("a",{name : 'glossar-'+item, text : item, 'styles' : {
		        		background:'none'
		        	}}).inject(tar);
		    }
		});
	}

});




