function nfyWallpaper()
{$(".container_skyscraper").attr("class","container_skyscraper_wallpaper");$("#container_banner").attr("id","container_banner_wallpaper");}function formatTitleFancybox(title,currentArray,currentIndex,currentOpts)
{return'
'+(title&&title.length?''+title+'':'')+'
Bild '+(currentIndex+1)+'/'+currentArray.length+'
';}
jQuery.fn.center=function(absolute){return this.each(function(){var t=jQuery(this);t.css({position:absolute?'absolute':'fixed',left:'50%',top:'50%',zIndex:'99'}).css({marginLeft:'-'+(t.outerWidth()/2)+'px',marginTop:'-'+(t.outerHeight()/2)+'px'});if(absolute){t.css({marginTop:parseInt(t.css('marginTop'),10)+jQuery(window).scrollTop(),marginLeft:parseInt(t.css('marginLeft'),10)+jQuery(window).scrollLeft()});}});};function openPopup(url)
{return window.open(url,'_blank','scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no');}
function fillDefaults(defaults,formId)
{for(field in defaults)
{if($("#"+formId+" :input[name="+field+"]").val()=='')
{$("#"+formId+" :input[name="+field+"]").val(defaults[field]);}}}
function clearDefaults(defaults,fieldName,formId)
{if(fieldName!=false)
{if($("#"+formId+" :input[name="+fieldName+"]").val()==defaults[fieldName])
{$("#"+formId+" :input[name="+fieldName+"]").val('');}}
else
{for(field in defaults)
{if($("#"+formId+" :input[name="+field+"]").val()==defaults[field])
{$("#"+formId+" :input[name="+field+"]").val('');}}}}
function writeDate()
{var currDate=new Date();var year=currDate.getFullYear();var m=currDate.getMonth()+1;var month=(m<10)?'0'+m:m;var d=currDate.getDate();var day=(d<10)?'0'+d:d;var dayNr=currDate.getDay();var dayNames=new Array('Sonntag','Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag');var dayTextDe=dayNames[dayNr];var completeDate=dayTextDe+', '+day+'.'+month+'.'+year;return completeDate;}
function getSubdomain(returnValue)
{var full=window.location.host;var parts=full.split('.');var sub=parts[0];var domain=parts[1];var type=parts[2];var domainInfo=new Array();domainInfo['sub']=sub;domainInfo['domain']=domain;domainInfo['type']=type;if(typeof domainInfo[returnValue]!='undefined')
{return domainInfo[returnValue];}}
function getLogoStringBySubdomain()
{var subdomain=getSubdomain('sub');var tmpDomain=getSubdomain('domain');var domain=tmpDomain.replace(/b4b/gi,'');var subdomainArray=new Array();subdomainArray['alb-bodensee']='bodensee';subdomainArray['albbodensee']='bodensee';subdomainArray['baden']='baden';subdomainArray['berlin-brandenburg']='berlin-brandenburg';subdomainArray['berlinbrandenburg']='berlin-brandenburg';subdomainArray['bremen']='bremen';subdomainArray['hamburg']='hamburg';subdomainArray['heilbronn-franken']='heilbronn-franken';subdomainArray['mainfranken']='mainfranken';subdomainArray['mecklenburg']='mecklenburg';subdomainArray['mv']='mecklenburg';subdomainArray['mittelfranken']='mittelfranken';subdomainArray['mittelhessen']='mittelhessen';subdomainArray['mittelstand']='mittelstand';subdomainArray['mittlerer-neckar']='mittlerer-neckar';subdomainArray['mittlererneckar']='mittlerer-neckar';subdomainArray['niedersachsen']='niedersachsen';subdomainArray['nord']='nord';subdomainArray['oberbayern']='oberbayern';subdomainArray['offenbach']='offenbach';subdomainArray['ostbayern']='ostbayern';subdomainArray['revier']='revier';subdomainArray['rhein-main']='rhein-main';subdomainArray['rheinmain']='rhein-main';subdomainArray['rhein-neckar']='rhein-neckar';subdomainArray['rheinneckar']='rhein-neckar';subdomainArray['rhein-neckar-odenwald']='rhein-neckar';subdomainArray['rheinland']='rheinland';subdomainArray['saar-pfalz']='saar-pfalz';subdomainArray['saarpfalz']='saar-pfalz';subdomainArray['sachsen-anhalt']='sachsen-anhalt';subdomainArray['sachsenanhalt']='sachsen-anhalt';subdomainArray['sachsen']='sachsen';subdomainArray['schwaben']='schwaben';subdomainArray['thueringen']='thueringen';subdomainArray['westfalen']='westfalen';subdomainArray['wiesbaden']='wiesbaden';if(typeof subdomain!='undefined'&&subdomain!='cms'&&subdomain!='')
{if(typeof subdomainArray[subdomain]!='undefined')
{return subdomainArray[subdomain];}
else
{if(typeof domain!='undefined'&&domain!='')
{if(typeof subdomainArray[domain]!='undefined')
{return subdomainArray[domain];}}}}}jQuery.extend(jQuery.easing,{easein:function(x,t,b,c,d){return c*(t/=d)*t+b;},easeinout:function(x,t,b,c,d){if(toptions.headers.index(clicked[0]);options.active=clickedActive?$([]):clicked;toggle.call(this,toShow,toHide,data,clickedActive,down);return false;};function findActive(headers,selector){return selector!=undefined?typeof selector=="number"?headers.filter(":eq("+selector+")"):headers.not(headers.not(selector)):selector===false?$([]):headers.filter(":eq(0)");}
$.extend($.ui.accordion,{defaults:{selectedClass:"selected",alwaysOpen:true,animated:'slide',event:"click",header:"a",autoheight:true,running:0,navigationFilter:function(){return this.href.toLowerCase()==location.href.toLowerCase();}},animations:{slide:function(options,additions){options=$.extend({easing:"swing",duration:300},options,additions);if(!options.toHide.size()){options.toShow.animate({height:"show"},options);return;}
var hideHeight=options.toHide.height(),showHeight=options.toShow.height(),difference=showHeight/hideHeight;options.toShow.css({height:0,overflow:'hidden'}).show();options.toHide.filter(":hidden").each(options.complete).end().filter(":visible").animate({height:"hide"},{step:function(now){var current=(hideHeight-now)*difference;if($.browser.msie||$.browser.opera){current=Math.ceil(current);}
options.toShow.height(current);},duration:options.duration,easing:options.easing,complete:function(){if(!options.autoheight){options.toShow.css("height","auto");}
options.complete();}});},bounceslide:function(options){this.slide(options,{easing:options.down?"bounceout":"swing",duration:options.down?1000:200});},easeslide:function(options){this.slide(options,{easing:"easeinout",duration:700})}}});})(jQuery);$(document).ready(function(){$('#top_search_input').focus(function(){if(this.value=='Suchbegriff eingeben')
{this.value=' ';}});$('.top_article_toparticle_cont').cycle({fx:'scrollHorz',speed:500,next:'.top_article_arrow_next',prev:'.top_article_arrow_prev',after:function(curr,next,opts){var index=opts.currSlide;$('.top_article_left_teaser').removeClass('ta_active');$('.top_article_left_teaser').eq(index).addClass('ta_active');}});$('.top_article_toparticle_cont').cycle('pause');$('.top_article_left_teaser').each(function(i){$(this).click(function(){$('.top_article_toparticle_cont').cycle(i);return false;});});var writeArticleSendContent=function(){var str=$('#articleSendForm').serialize();$.ajax({type:'POST',url:'/pu_all/ajax/articleSend.php',data:str,success:function(content){$('#articleSendContent').html(content);}});};$('#articleSendButton').click(writeArticleSendContent);var writeGallerySendContent=function(){var str=$('#gallerySendForm').serialize();$.ajax({type:'POST',url:'/pu_all/ajax/gallerySend.php',data:str,success:function(content){$('#gallerySendContent').html(content);}});};$('#gallerySendButton').click(writeGallerySendContent);var writeVideoSendContent=function(){var str=$('#videoSendForm').serialize();$.ajax({type:'POST',url:'/pu_all/ajax/videoSend.php',data:str,success:function(content){$('#videoSendContent').html(content);}});};$('#videoSendButton').click(writeVideoSendContent);var writeBdirSendContent=function(){var str=$('#bdirSendForm').serialize();$.ajax({type:'POST',url:'/pu_all/ajax/bdirentrySend.php',data:str,success:function(content){$('#bdirSendContent').html(content);}});};$('#bdirSendButton').click(writeBdirSendContent);var writeUfuSendContent=function(){var str=$('#ufuSendForm').serialize();$.ajax({type:'POST',url:'/pu_all/ajax/ufuSend.php',data:str,success:function(content){$('#ufuSendContent').html(content);}});};$('#ufuSendButton').click(writeUfuSendContent);$('#date_topbar').html(writeDate());var logostring=getLogoStringBySubdomain();if(typeof logostring!='undefined'&&logostring!='')
{$('#b4blogolink').html('
');}
function slideTheMenuUp(){$(this).find('.subnav').slideUp('fast');$(this).removeClass('active');}
function slideTheMenuDown(){$(this).click(function(){$(this).addClass('active');$(this).find('.subnav').slideDown('fast');});}
$('ul.topnav li').hoverIntent({sensitivity:7,interval:100,over:slideTheMenuDown,timeout:0,out:slideTheMenuUp})});