
/* - ++resource++schuetterhof.theme.javascripts/main_template.js - */
// http://www.schuetterhof.com/portal_javascripts/++resource++schuetterhof.theme.javascripts/main_template.js?original=1
var headerimgurls=new Array();jq(window).bind('load', function(){headerimgurls.push(jq("#headerimg").attr('src'));jq("#headerimglist").find("li").each(function(){headerimgurls.push(jq(this).html())})
jq('#headerimg').wrap('<span style="position: relative;"></span>');if(headerimgurls.length>1){window.setTimeout(function(){loadNextPicture(1)},4000)}});
function loadNextPicture(index){var $$=jq('#headerimg');var nextImage=new Image();jq(nextImage).load(function(){$$.parent().prepend(this);if(jq.browser.msie||jq.browser.mozilla){$$.css({'position':'absolute','left':0,'background':'','top':this.offsetTop})}
else if(jq.browser.opera&&jq.browser.version<9.5){$$.css({'position':'absolute','left':0,'background':'','top':"0"})} else{$$.css({'position':'absolute','left':0,'background':''})}
$$.fadeOut("normal", function(){$$.remove();jq(nextImage).attr("id","headerimg").addClass("headerimg");if((id=index+1)==headerimgurls.length)
id=0;window.setTimeout(function(){loadNextPicture(id)},10000)})}).error(function(){}).attr('src',headerimgurls[index])}

