/*
* hudNET Core
*
* (c) 2010 hudNET | Christian Dölling
*
*/
window.hudNET={init:function(){try{if(console!==undefined){this._console=true}}catch(A){if(this._devmode){var B=$('<div id="hudNET-console" />').css({position:"absolute",zIndex:10000,left:0,bottom:0,height:150,overflow:"auto",width:"100%",background:"#eee",borderTop:"1px solid black"}).append("<table></table>").appendTo("body")}}},trace:function(B,A){if(!this._devmode){return }A=A||0;if(!this._console){this._traceCount++;$("#hudNET-console > table").append('<tr><td class="first">'+this._traceCount+"</td><td>"+B+"</td></tr>");$("#hudNET-console").get(0).scrollTop=100000}else{if(A==0&&console.log){console.log(B)}else{if(A==1&&console.warn){console.warn(B)}}}},shuffleArray:function(B){for(var C,A,D=B.length;D;C=parseInt(Math.random()*D),A=B[--D],B[D]=B[C],B[C]=A){}return B},getCenterTop:function(A){return($(window).height()-A)/2+$(window).scrollTop()},getCenterLeft:function(A){return($(window).width()-A)/2}};hudNET.balance={subMenuOpen:"mousedown",subMenuPosition:1,init:function(){var I=this;if($.browser.opera&&parseInt($.browser.version)<10){return }if($.browser.msie&&parseInt($.browser.version)<6){return }if($.browser.msie){this.subMenuOpen="click"}hudNET.imageviewer.init();$(document).click(function(){I.subMenuHideAll()});$('<div id="menuMainDummy" />').css("height",$("#menuMain").outerHeight(true)).insertAfter("#menuMain");$("#menuMain").css({position:"absolute",zIndex:1000,left:0});$("#menuMain li a").each(function(){$(this).bind("click",function(K){return false});$(this).bind(I.subMenuOpen,function(K){I.subMenuShow($(this).attr("className"));$(this).addClass("selected");return false})});$("#menuMain, .menuSub").disableSelection();$(".menuSub ul li").each(function(){$(this).data("backgroundColor",$(this).css("backgroundColor"))}).hover(function(){$(this).css({backgroundColor:"#A63800",backgroundPosition:"5px -15px",color:"#fff"});$(this).children().css("color","#fff")},function(){$(this).css({backgroundColor:$(this).data("backgroundColor"),backgroundPosition:"5px 5px",color:"#000"});$(this).children().css("color","#000")});var D=480,E=323,A=466/25,J=26/309,G=20,F=20,H=20,C=25;$(".menuSub").each(function(){var M=$(this).find("div.content").outerWidth(true)-20,L=$(this).find("div.content").outerHeight(true)-5,R=0,O=0;R=M-D+H+(L*J)+1;O=Math.round(-R/A-0.3);$(this).find(".submenu_bg_nw").css({left:"0px",top:"0px"});$(this).find(".submenu_bg_ne").css({backgroundPosition:R+"px "+O+"px",height:(C+G+L)+"px",width:(M+H+(L*J)+3)+"px"});$(this).find(".submenu_bg_w").css({left:"0px",height:(L)+"px"});$(this).find(".submenu_bg_sw").css({left:"0px",top:(G+L)+"px"});$(this).find(".submenu_bg_s").css({top:(G+L)+"px",width:(M)+"px"});$(this).find(".submenu_bg_se").css({top:(G+L)+"px",left:(F+M)+"px"});var Q=355,K=314,N=63/302,P=G+L+$(this).find(".submenu_bg_se").outerHeight(false)-5;shadowHeight=C+G+L-O+5-5;$(this).find(".submenu_shadow_ne").css({top:(O-10)+"px",left:"13px",width:(13+M+(shadowHeight*N)+17)+"px",height:(C+G+L-O+5-5)+"px"});$(this).find(".submenu_shadow_sw").css({top:P+"px",left:"13px"});$(this).find(".submenu_shadow_s").css({top:P+"px",left:(13+11)+"px",width:(M+10)+"px"});$(this).find(".submenu_shadow_se").css({top:P+"px",left:(13+11+M+10)+"px"})});$(".zoom").css("cursor","pointer");if($.browser.msie&&parseInt($.browser.version)<7){var B=$(window).width();if(B<1000){B=1000}$("#contentWrapper").width(B-2);$(window).resize(function(){var K=$(window).width();if(K<1000){K=1000}$("#contentWrapper").width(K-2)});$(".sidebox h4 + p").css("marginTop",3);$(".sidebox h5 + h4").css("marginTop",0);$(".sidebox p + h5").css("marginTop",10)}},subMenuShow:function(H){var E=$("."+H).parent();var G=E.offset().top-25;var A=160;if(this.subMenuPosition==0){A=E.offset().left+$("."+H).width()+25}$("#"+H).css({left:-1000,top:G}).show();function C(){return $("#"+H+" .submenu_shadow_s").offset().top+$("#"+H+" .submenu_shadow_s").outerHeight(false)}var B=$(window).height()+$(window).scrollTop(),F=C(),D=E.offset().top;if(B<F){G-=F-B+5}this.subMenuHideAll();$("#"+H).css({left:A,top:G}).show();F=C();if(D+32>F){$("#"+H).css({top:G+(D+32-F)})}$("#menuMainSelector").css({left:30,top:D}).show();$("#menuMainSelectorEnd").css({left:A-25,top:E.offset().top-0}).show()},showMenuSelector:function(A,C){if(!A){$("#menuMainSelector, #menuMainSelectorEnd").hide();return }var B=$("."+C).parent();$("#menuMainSelector").css({left:30,top:B.offset().top-0}).show()},deselectAll:function(){$("#menuMain ul li a").removeClass("selected")},subMenuHideAll:function(){$("#menuMain ul li a").removeClass("selected");$(".menuSub").hide();$("#menuMainSelector, #menuMainSelectorEnd").hide()},subMenuHide:function(A){$("#"+A).hide()}};hudNET.flipbook={books:null,defaultSettings:{id:-1,type:"gif",parent:"body",numFrames:0,dim:{left:0,top:0,width:100,height:100},show:true,framesLoaded:false,frameCurrent:0,playing:0,interval:[0,0],frameRepeat:1,frameRepeatCurrent:1,frameLastVisible:-1,loopCount:0},playSettings:{seq:[0,0],interval:[0,0],frameRepeat:1,loop:1000000,onFinish:null},init:function(){if(this.books!=null){return }this.books=new Array();var A=this;window.setInterval(function(){A.doFrame()},40)},doFrame:function(){var D=this;if(this.books===undefined){return false}for(var C in this.books){var A=this.books[C];if(A.playing!=0&&A.framesLoaded){var B=false;A.frameRepeatCurrent++;if(A.frameRepeatCurrent>A.playSettings.frameRepeat){B=true;A.frameRepeatCurrent=1}if(B){A.frameCurrent++;if(A.frameCurrent>A.playSettings.interval[1]){A.loopCount++;if(A.playSettings.loop>0&&A.loopCount<A.playSettings.loop){A.frameCurrent=A.playSettings.interval[0]}else{A.frameCurrent--;this.stop(A.id);if(A.playSettings.onFinish!=null){A.playSettings.onFinish()}}}}this.displayFrame(A.id)}}},displayFrame:function(D,C){var B=this.books[D].frameCurrent;B=this.books[D].playSettings.seq[B];if(this.books[D].oneImageFile){this.books[D].div.css("backgroundPosition","0px "+(-B*this.books[D].dim.height)+"px");return }for(var A=0;A<this.books[D].imgArray.length;A++){$(this.books[D].imgArray[A]).hide()}$(this.books[D].imgArray[B]).show()},gotoFrame:function(B,A){this.stop(B);this.books[B].frameCurrent=A.frame;if(A.seq!==undefined){this.books[B].playSettings.seq=A.seq}this.displayFrame(B)},play:function(B,A){this.stop(B);this.books[B].playSettings=null;A=$.extend({},this.playSettings,this.books[B].playSettings,A);this.books[B].playSettings=A;this.books[B].playSettings.interval=this.adjustInterval(B,A.interval);this.books[B].loopCount=0;this.books[B].frameCurrent=0;this.books[B].playing=1},adjustInterval:function(B,A){if(A[1]=="last"){A[1]=this.books[B].playSettings.seq.length-1}A[0]=Math.max(A[0],0);A[1]=Math.min(A[1],this.books[B].playSettings.seq.length-1);return A},stop:function(A){this.books[A].playing=0;this.books[A].loopCount=0;this.books[A].frameRepeatCurrent=1},isPlaying:function(A){return this.books[A].playing!=0},add:function(C,F,B){var D=this;C=$.extend({},this.defaultSettings,C);if(C.id==-1){return -1}var H=$("<div />").attr("id",C.id).css({position:"absolute"}).css(C.dim);$(C.parent).append(H);var E=[];C.imagesLoadedArray=[];for(var A=1;A<C.numFrames+1;A++){C.imagesLoadedArray.push(0)}this.books[C.id]=C;if(!C.oneImageFile){for(var A=1;A<C.numFrames+1;A++){var G=$("<img />").attr("src",C.file+A+"."+C.type).css({position:"absolute"}).hide().data("count",A-1).load(function(){C.imagesLoadedArray[$(this).data("count")]=1;D._checkImageLoad(C.id,B)});H.append(G);if($(G).width()>0){C.imagesLoadedArray[A-1]=1}G.css(C.dim);E.push(G)}}else{hudNET.trace("Generating with only one image file");H.append(G);H.css({background:"url("+C.file+") no-repeat 0px 0px"});C.framesLoaded=true}$(E[0]).show();if(!C.show){H.hide()}$(H).find("*").disableSelection();C.div=H;C.imgArray=E;C.playSettings={};C.playSettings=$.extend({},this.playSettings);C.playSettings.seq=[];for(var A=0;A<C.numFrames;A++){C.playSettings.seq.push(A)}C.playSettings.interval=[0,C.numFrames-1];if(F!==undefined){F(C.id)}this._checkImageLoad(C.id,B);return C.id},_checkImageLoad:function(E,C){var D=this.books[E],A=0;for(var B=0;B<D.numFrames;B++){A+=D.imagesLoadedArray[B]}if(A>=D.numFrames&&!D.framesLoaded){D.framesLoaded=true;if(C!==undefined){C(E)}}}};hudNET.overlay={alpha:0.65,time:200,overlay:null,container:null,init:function(){if(this.overlay!=null){return }this.isInit=true;hudNET.trace("INIT Overlay");var A=this;this.overlay=$('<div class="overlay noprint">').appendTo("body")},show:function(F){if(this.overlay==null){this.init()}var A=F.show,C=F.evClick,E=F.alpha==null?this.alpha:F.alpha,D=F.time==null?this.time:F.time,B=this;if(A){this.overlay.css({height:$(document).height()});$(this.overlay).css({backgroundPosition:"0 "+$(window).scrollTop()+"px"});if(C=="hide"){this.overlay.bind("click.hudNET-overlay",function(){B.show(false)})}else{if(C){this.overlay.bind("click.hudNET-overlay",function(){C()})}}this.overlay.fadeTo(D,E);$(window).bind("resize.hudNET-overlay",function(){})}else{this.overlay.unbind("hudNET-overlay.click");this.overlay.fadeOut(200)}}};hudNET.viewer={wrapper:null,iconClose:null,iconLoading:null,isInit:false,init:function(){if(this.isInit){return }hudNET.trace("INIT Viewer");var A=this;this.isInit=true;this.wrapper=$('<div class="hudNET-viewer-wrapper" />').appendTo("body");this.iconClose=$('<div class="hudNET-viewer-close" />').appendTo("body");this.iconLoading=$('<div class="hudNET-viewer-loading" />').appendTo(this.wrapper)},show:function(A){if(!this.isInit){this.init()}this.iconLoading.css("display",A?"block":"none");this.wrapper.css({width:40,height:40}).css({left:hudNET.getCenterLeft(50),top:hudNET.getCenterTop(50)}).show(0)},enlarge:function(K,H,F,B,L,J){var I=this,G,D,E=K/H,C=H+5+5+17+F,M,A=$(window).height();this.iconLoading.hide();if(B){if(C+20>A){C=A-20;H=C-5-5-17-F;K=H*E;M=K+5+5}}G=hudNET.getCenterTop(H+F);D=hudNET.getCenterLeft(K);if(G<=0){G=30}if(D<=0){D=30}this.iconClose.one("click",function(){if($.isFunction(L)){L()}I.hide()}).css({left:D+K-1,top:G-17});this.wrapper.animate({height:H+F,top:G},250,"linear").animate({width:K,left:D},200,"linear",function(){I.iconClose.show();if($.isFunction(J)){J(D+5,G+5,K,H+F)}})},hide:function(){this.wrapper.hide();this.iconClose.hide()}};hudNET.imageviewer={alpha:0.85,container:null,image:null,zoomIcon:null,headerScroll:true,init:function(){if(this.loading!=null){return }var A=this;this.zoomIcon=$('<img id="hudNET-imageviewer-zoomicon" />').attr("src","/data/im/icon/icon-image-zoom.gif").css("cursor","pointer").appendTo("body");this.container=$('<div class="hudNET-viewer-container noprint"></div>').append('<div class="header" />').appendTo("body");$("#content img.zoom").each(function(){$(this).mousedown(function(){title=A.getImageTitle($(this));A.showImage($(this).attr("src"),title)})}).hover(function(){$(A.zoomIcon).data("image",$(this));$(A.zoomIcon).css({display:"block",left:$(this).offset().left+$(this).width()-19,top:$(this).offset().top+0})},function(){$(A.zoomIcon).css({display:"none"})});$(A.zoomIcon).mousedown(function(){title=A.getImageTitle($(this).data("image"));A.showImage($(this).data("image").attr("src"),title);$(this).css({display:"none"})}).hover(function(){$(this).css({display:"block"})},function(){$(this).css({display:"none"})})},getImageTitle:function(A){title=$(A).attr("title");if($.trim(title)==""){title=$(A).next("span").html()}return title},loadImage:function(A,C){var B=this;this.image=new Image();$.get("/data/inc/imagedata.php?tstamp="+new Date().getTime(),{filename:A},function(E){if(E=="null"){var D=30;hudNET.viewer.enlarge(500,D+0,0,true,function(){B.hideImage()},function(F,I,G,H){B.container.css({width:G,height:H+D,left:F,top:I});B.container.find(".header").html("Das gesuchte Bild wurde leider nicht gefunden");B.container.fadeIn(30)});window.setTimeout(function(){B.hideImage();hudNET.viewer.hide()},1800);return }E=E.split("###");$(B.image).load(function(){var H=parseInt(E[0]),F=parseInt(E[1]),G=C==""?0:30;B.container.find(".header").css({display:(C=="")?"none":"block"});hudNET.viewer.enlarge(H,F,G,true,function(){B.hideImage()},function(I,L,J,K){B.container.css({width:J,height:K+G,left:I,top:L});$(B.image).css({width:J,height:K-G});B.container.append(B.image);B.container.find(".header").html(C);B.container.fadeIn(300)})}).error(function(){}).attr("src",A+E[3])},"text")},showImage:function(D,C){hudNET.overlay.show({show:true});if($.trim(C)!=""){C=C.replace(/-<br \/>/g,"");C=C.replace(/-<BR \/>/g,"");C=C.replace(/-<br>/g,"");C=C.replace(/-<BR>/g,"");C=C.replace(/<br \/>/g,"");C=C.replace(/<BR \/>/g,"");C=C.replace(/<br>/g,"");C=C.replace(/<BR>/g,"")}else{C=""}var B=this;var A=D.substr(0,D.lastIndexOf("_"))+"_lg";hudNET.viewer.show(true);this.loadImage(A,C)},hideImage:function(){this.container.hide();$(this.image).remove();this.image=null;hudNET.overlay.show({show:false})}};hudNET.video={isInit:false,playerVersion:8,init:function(){if(this.isInit){return }hudNET.trace("INIT Video");var A=this;this.isInit=true;hudNET.overlay.init()},show:function(C){if(!this.isInit){this.init()}var A=this;hudNET.trace("show");if(hudNET.balanceTeaser){hudNET.balanceTeaser.animate(false)}if(C.videoVolume<=0){C.videoVolume=0.7}C.videoStill="";C.videoAuto=1;var B=C.guiShowElements<16?0:16;hudNET.overlay.show({show:true});hudNET.viewer.show(true);hudNET.viewer.enlarge(parseInt(C.videoWidth),parseInt(C.videoHeight),B,true,function(){A.hide()},function(D,I,F,G){$('<div id="videoContainerContentWrapper" />').css({position:"absolute",zIndex:10003,left:-3000,top:0,backgroundColor:"#000",width:200,height:200}).append('<div id="videoContainerContent" />').appendTo("body");var E=C,H={wmode:"window"};E.videoWidth=F;E.videoHeight=G-B;A.embedVideo("videoContainerContent",F,G,E,H);$("#videoContainerContentWrapper").css({left:D,top:I})})},hide:function(){var A=this,B=$("#videoContainerContent").get(0);B.jsCall({f:"closeConnection",p1:0});$.doTimeout(100,function(){$("#videoContainerContent").remove();$("#videoContainerContentWrapper").remove();hudNET.overlay.show({show:false})})},embedVideo:function(C,B,A,E,D){E.guiPlayStateBGColor="0x760800";E.guiPlayStateColorLoaded="0x000000";E.guiPlayStateColorPlayed="0xFFF5D3";D.bgcolor="#000000";D.menu="false";D.scale="noScale";if(D.wmode===undefined){D.wmode="transparent"}if(D.allowFullscreen===undefined){D.allowFullscreen="false"}swfobject.embedSWF("/data/flash/videoplayer.swf?v="+this.playerVersion,C,B,A,"9.0.0",false,E,D)}};hudNET.balanceTeaser={teaserCurrent:1,teaserCount:-1,speed:200,numDiffTabs:5,tabVersionOffset:60,tabStateOffset:50,isSwitching:false,init:function(){var C=this;hudNET.trace("INIT Teaser");this.teaserCount=$("#teaserData .teaserContent").size();$("#teaser .pages").show().addClass("corner-bottom");$("#teaser .pages li").disableSelection().hover(function(){$(this).addClass("hover");if(!$(this).hasClass("selected")){C.adjustBGPosition($(this),-C.tabStateOffset*1)}},function(){$(this).removeClass("hover");if(!$(this).hasClass("selected")){C.adjustBGPosition($(this),0)}}).click(function(){C.show(parseInt($(this).attr("className")),false,true)});var B=new Array();for(var A=0;A<this.teaserCount;A++){B.push(A%this.numDiffTabs+1)}B=hudNET.shuffleArray(B);for(var A=0;A<this.teaserCount;A++){$("#teaser .pages li:eq("+A+")").addClass("v"+B[A]);$("#teaser .pages li:eq("+A+")").css("backgroundPosition","0px "+(-this.tabVersionOffset*(B[A]-1))+"px")}},adjustBGPosition:function(A,C){var B=A.css("backgroundPosition");B=B.split(" ");A.css({backgroundPosition:C+"px "+B[1]})},setCurrentId:function(C){var B=this;this.teaserCurrent=C;$("#teaser .pages li").removeClass("selected").each(function(){B.adjustBGPosition($(this),0)});var A=$("#teaser .pages li:eq("+(C-1)+")");A.addClass("selected");B.adjustBGPosition(A,-this.tabStateOffset*2)},next:function(A){if(!A){this.animate(false)}this.teaserCurrent=this.teaserCurrent+1>this.teaserCount?1:this.teaserCurrent+1;this.show(this.teaserCurrent,A,true)},show:function(E,A,D){var B=this,C=this.speed;if(B.isSwitching){return }if(!D){C=0}this.setCurrentId(E);if(!A){this.animate(false)}$("#teaser .stage > div").fadeOut(C,function(){var H=$.trim(B.getDataText(B.teaserCurrent));if(H==""){var G=B.getData(0,B.teaserCurrent);$("#teaser .stage").html(G);$("#teaser .stage > div").css({display:"none"}).fadeIn(C)}else{var F=B.getFlashType(B.teaserCurrent);if(F=="flash"){var G=B.getData(0,B.teaserCurrent);$("#teaser .stage").html(G);$("#teaser .stage .teaser-flash").attr("id","teaserFlashContainer");$("#teaser .stage > div").css({display:"block"});B.makeFlashContent(H,"teaser-flash")}else{if(F=="video"){var G=B.getData(0,B.teaserCurrent);$("#teaser .stage").html(G);$("#teaser .stage > div").css({display:"none"});$("#teaser .stage .teaser-video").attr("id","teaserVideoContainer");$("#teaser .stage > div").css({display:"none"}).fadeIn(B.speed);B.makeVideoContent(H,"teaser-video")}}}});if(D){B.isSwitching=true;$("#teaser .intro > div").hide("slide",{direction:"down",easing:"swing"},this.speed,function(){$("#teaser .intro").html(B.getData(1,B.teaserCurrent));$("#teaser .intro > div").show("slide",{direction:"down",easing:"swing"},B.speed);B.isSwitching=false})}else{$("#teaser .intro").html(B.getData(1,B.teaserCurrent));$("#teaser .intro > div").show()}},makeFlashContent:function(C,A){var B={};var D={wmode:"transparent"};swfobject.embedSWF(C,"teaserFlashContainer","548","250","9.0.0",false,B,D)},makeVideoContent:function(C,A){var B=$.evalJSON(C);var D={wmode:"transparent"};hudNET.video.embedVideo("teaserVideoContainer","548","250",B,D)},getData:function(A,B){if(A==0){return $("#teaserData div.teaserContent:eq("+(B-1)+") .stage").html()}else{if(A==1){return $("#teaserData div.teaserContent:eq("+(B-1)+") .intro").html()}else{if(A==2){return $("#teaserData div.teaserContent:eq("+(B-1)+") .page-link").html()}}}},getDataText:function(A){return $("#teaserData div.teaserContent:eq("+(A-1)+") .stage div div div").text()},getFlashType:function(C){var A=$("#teaserData div.teaserContent:eq("+(C-1)+") .stage .teaser-flash");var B=$("#teaserData div.teaserContent:eq("+(C-1)+") .stage .teaser-video");if(A.size()>0){return"flash"}else{return"video"}},animate:function(C,A){A=A|1000;var B=this;if(C){$.doTimeout("teaser",A,function(){B.next(true);return true})}else{$.doTimeout("teaser")}}};hudNET.balanceVirtual={frameCurrent:0,infoCurrent:"",positions:null,speed:300,shadow:null,init:function(){var B=this,A={},C={menu:"false",scale:"noScale",wmode:"transparent"};swfobject.embedSWF("balance_virtuell_neu.swf","flashContent","620","450","9.0.0","expressInstall.swf",A,C);this.shadow=$("<div />").addClass("shadow").append('<div class="top" />').append('<div class="bottom" />').css({opacity:0.3});$("#content").append(this.shadow);this.positions={serv:{0:{p:2,x:422,y:162},1:{p:3,x:153,y:138},3:{p:0,x:200,y:150}},bekl:{0:{p:1,x:387,y:111},1:{p:0,x:164,y:80}},trek:{0:{p:3,x:110,y:170},3:{p:0,x:208,y:154}},anha:{0:{p:3,x:104,y:227}},zube:{0:{p:0,x:175,y:80}},helm:{0:{p:0,x:124,y:220},3:{p:0,x:121,y:103}},post:{0:{p:1,x:553,y:218},1:{p:0,x:160,y:180},3:{p:1,x:525,y:117}},jong:{0:{p:0,x:124,y:220},1:{p:3,x:153,y:175},3:{p:1,x:478,y:150}},werk:{0:{p:2,x:539,y:266},1:{p:3,x:125,y:222},2:{p:0,x:176,y:33},3:{p:2,x:380,y:250}},thea:{1:{p:1,x:380,y:210},3:{p:1,x:564,y:109}},renn:{1:{p:2,x:500,y:310},2:{p:0,x:171,y:266},3:{p:2,x:478,y:294}},ortl:{1:{p:3,x:78,y:301},2:{p:3,x:91,y:142},3:{p:2,x:384,y:246}},cros:{1:{p:2,x:474,y:311},2:{p:0,x:174,y:295}},krad:{2:{p:1,x:442,y:191}},einr:{2:{p:1,x:590,y:280}},indi:{2:{p:2,x:390,y:280}},moun:{2:{p:3,x:95,y:277},3:{p:2,x:560,y:395}}};$(".virtual-content-info").addClass("corner").append('<div class="icon-close" />').find("a").each(function(){$(this).html($(this).html()+" (der Rundgang wird verlassen)").click(function(){B.hideCurrent(false)})}).end().find(".icon-close").click(function(){B.hideCurrent(true)})},hideCurrent:function(A){if(A){$("#vc-"+this.infoCurrent).fadeOut(this.speed);this.shadow.fadeOut(this.speed)}else{$("#vc-"+this.infoCurrent).hide();this.shadow.hide()}this.infoCurrent=""},setFrame:function(A){this.frameCurrent=A;this.hideCurrent(false)},show:function(F){if(this.infoCurrent==F){return }var C=this,H=this.positions[F][this.frameCurrent].p,A=$("#flashContent").position().left+this.positions[F][this.frameCurrent].x,G=$("#flashContent").position().top+this.positions[F][this.frameCurrent].y,E=$("#vc-"+F).outerWidth(false),D=$("#vc-"+F).outerHeight(false);if(H==1||H==2){A-=E}if(H==2||H==3){G-=D}$("#vc-"+F).css({left:A,top:G});this.shadow.hide().css({left:A+8,top:G+8}).find(".top").height(D-15);if(this.infoCurrent==""){B(F)}else{$("#vc-"+this.infoCurrent).fadeOut(C.speed,function(){B(F)})}function B(I){$("#vc-"+I).fadeIn(C.speed);C.shadow.fadeIn(C.speed);C.infoCurrent=I}}};hudNET.___animBikes={initAnim:function(F){hudNET.flipbook.init();F=F?F:"body";var C="fb_bike",H="fb_man",B="fb_lantern",E=6;holder=$("<div />").css({position:"absolute",top:10,left:820}).appendTo(F);hudNET.flipbook.add({id:B,parent:holder,file:"/data/im/anim/lantern",numFrames:1,show:false,dim:{width:43,height:54}},D,D);hudNET.flipbook.add({id:C,parent:holder,file:"/data/im/anim/bike2_",numFrames:3,show:false,dim:{width:63,height:47}},D,D);hudNET.flipbook.add({id:H,parent:holder,file:"/data/im/anim/man1_",numFrames:3,show:false,dim:{width:28,height:69}},D,D);function D(I){E--;if(E<=0){G()}}function G(){$("#"+C).show().css({left:-12,top:30});$("#"+H).show().css({left:80,top:-80});$("#"+B).show();$("#"+C).one("mouseover",A)}function A(){hudNET.flipbook.play(C,{seq:[0,1,2],interval:[0,2],frameRepeat:2,loop:0,onFinish:function(){$("#"+H).animate({left:45,top:20},1200,"swing");hudNET.flipbook.play(H,{seq:[0,1],interval:[0,1],frameRepeat:4,loop:10000})}});window.setTimeout(function(){hudNET.flipbook.play(C,{seq:[2,1,0],interval:[0,2],frameRepeat:2,loop:0,onFinish:function(){hudNET.flipbook.gotoFrame(H,{frame:0,seq:[2]});$("#"+C).one("mouseover",A)}})},3000)}}};hudNET.___animJuggler={initAnim:function(H){hudNET.flipbook.init();H=H?H:"body";var J="fb_juggler",E="fb_dog",A="fb_keulen",C=6,F=null,G=$("<div />").css({position:"absolute",top:8,left:825}).appendTo(H);hudNET.flipbook.add({id:E,parent:G,file:"/data/im/anim/dog1_",numFrames:4,show:false,dim:{width:28,height:32}},K,K);hudNET.flipbook.add({id:J,parent:G,file:"/data/im/anim/juggler2_",numFrames:1,show:false,dim:{width:39,height:66}},K,K);hudNET.flipbook.add({id:A,parent:G,file:"/data/im/anim/keulen",numFrames:1,show:false,dim:{width:33,height:21}},K,K);function K(L){C--;if(C<=0){I()}}function I(){$("#"+J).show().css({left:0,top:0});$("#"+E).show().css({left:47,top:37});$("#"+A).show().css({left:22,top:67});hudNET.flipbook.play(E,{seq:[0,1],interval:[0,1],frameRepeat:7});$("#"+E).one("mouseover",B);F=window.setTimeout(D,Math.round(Math.random()*2000))}function D(){$("#"+E).unbind("mouseover.dog",B);$("#"+E).animate({left:"-=10",top:"-=10"},120,"linear").animate({left:"+=10",top:"+=10"},120,"linear",function(){$("#"+E).one("mouseover.dog",B)});F=window.setTimeout(D,Math.round(Math.random()*2000)+500)}function B(){window.clearTimeout(F);$("#"+E).stop(true,true);hudNET.flipbook.play(E,{seq:[2,3],interval:[0,1],frameRepeat:1});$("#"+E).animate({left:9,top:29},120,"linear").animate({left:-6,top:33},100,"linear");window.setTimeout(function(){$("#"+E).animate({left:47,top:35},1600,"swing",function(){I()})},2000)}}};hudNET.___animUnicycle={initAnim:function(G){hudNET.flipbook.init();G=G?G:"body";var E="fb_unicycle",D="fb_unicycle_rider",F=4;holder=$("<div />").css({position:"absolute",top:2,left:810}).appendTo(G);hudNET.flipbook.add({id:E,parent:holder,file:"/data/im/anim/mono1_",numFrames:9,show:false,dim:{width:60,height:76}},I,I);hudNET.flipbook.add({id:D,parent:holder,file:"/data/im/anim/mono2_",numFrames:3,show:false,dim:{width:60,height:76}},I,I);function I(J){F--;if(F<=0){A()}}function A(){$("#"+E).show().css({left:0,top:0});$("#"+D).hide().css({left:-5,top:-30});hudNET.flipbook.gotoFrame(D,{frame:0,seq:[0]});hudNET.flipbook.play(E,{seq:[0,1,2,1],interval:[0,3],frameRepeat:7});$("#"+E).one("mouseover",C)}function C(){hudNET.flipbook.play(E,{seq:[3,4,5,4],interval:[0,3],frameRepeat:2,loop:1000});$("#"+E).animate({left:"+=30"},400,"swing").animate({left:"-=60"},400,"swing").animate({left:"+=40"},300,"swing").animate({left:"-=10"},100,"linear",B)}function B(){hudNET.flipbook.play(E,{seq:[6,6,7,7,8],interval:[0,"last"],frameRepeat:2,loop:0});$("#"+E).animate({left:"-=130"},500,"linear");$("#"+D).show().animate({left:"-=10",top:"-=2"},40,"linear").animate({left:"-=20",top:"+=5"},80,"linear").animate({left:"-=15",top:"+=10"},80,"linear").animate({left:"-=10",top:"+=15"},80,"linear").animate({left:"-=5",top:"+=20"},80,"linear",H)}function H(){hudNET.flipbook.play(D,{seq:[1,2],interval:[0,1],frameRepeat:8,loop:6,onFinish:A})}}};hudNET.___animAusbildung={initAnim:function(G){hudNET.flipbook.init();G=G?G:"body";var I="fb_chalkboard",Q="fb_chalkboardBase",M="fb_professor",N=false,O="fb_chalk",S=4;holder=$("<div />").css({position:"absolute",top:5,left:820}).appendTo(G);trigger=$("<div />").css({position:"absolute",left:8,top:4,width:58,height:42,background:"transparent"});hudNET.flipbook.add({id:Q,parent:holder,file:"/data/im/anim/ausbildung-chalkboard-base_all.gif",oneImageFile:true,numFrames:3,show:false,dim:{width:81,height:44}},F,F);hudNET.flipbook.add({id:I,parent:holder,file:"/data/im/anim/ausbildung-chalkboard_all.gif",oneImageFile:true,numFrames:16,show:false,dim:{width:70,height:42}},F,F);hudNET.flipbook.add({id:O,parent:holder,file:"/data/im/anim/ausbildung-chalk_all.gif",oneImageFile:true,numFrames:4,show:false,dim:{width:23,height:6}},F,F);hudNET.flipbook.add({id:M,parent:holder,file:"/data/im/anim/ausbildung-professor_all.gif",oneImageFile:true,numFrames:9,show:false,dim:{width:73,height:65}},F,F);trigger.appendTo(holder);function F(T){S--;if(S<=0){S=10000;hudNET.trace("all loaded");$("#"+Q).show().css({left:-10,top:24});$("#"+I).show().css({left:2,top:4});$("#"+M).show().css({left:80,top:20});$("#"+O).show();R()}}function R(){$("#"+O).css({left:10,top:39});hudNET.flipbook.gotoFrame(I,{frame:0,seq:[0]});hudNET.flipbook.gotoFrame(O,{frame:0,seq:[0]});N=false;A(1);trigger.one("mouseover",K)}function P(){var T=Math.round(Math.random()*1000)+1000;window.setTimeout(function(){A(Math.ceil(Math.random()*4))},T)}function A(T){if(N){return }if(T==1){hudNET.flipbook.gotoFrame(M,{frame:0,seq:[1]});$("#"+M).animate({left:40,top:15},500,"swing");P()}else{if(T==2){hudNET.flipbook.gotoFrame(M,{frame:0,seq:[2]});$("#"+M).animate({left:33,top:15},500,"swing");P()}else{if(T==3){hudNET.flipbook.gotoFrame(M,{frame:0,seq:[3]});$("#"+M).animate({left:17,top:16},500,"swing");P()}else{if(T==4){hudNET.flipbook.gotoFrame(M,{frame:0,seq:[0]});$("#"+M).animate({left:30,top:12},500,"swing");P()}}}}}function K(){N=true;hudNET.flipbook.gotoFrame(M,{frame:0,seq:[5]});$("#"+M).stop(true,false).animate({left:70,top:15},500,"swing");hudNET.flipbook.play(I,{seq:[0,1,2,3,4,5],interval:[0,5],frameRepeat:1,loop:2,onFinish:H});hudNET.flipbook.play(Q,{seq:[0,1,2,1,0,1,2,1,0,1,0],interval:[0,"last"],frameRepeat:2,loop:1});$("#"+O).animate({top:"-=20"},360,"swing").animate({top:"+=50"},600,"swing");hudNET.flipbook.play(O,{seq:[0,1,2,3],interval:[0,3],frameRepeat:5,loop:1})}function H(){hudNET.flipbook.play(I,{seq:[0,1,2,3,4,5],interval:[0,5],frameRepeat:2,loop:2,onFinish:E})}function E(){hudNET.flipbook.play(I,{seq:[0,1,2,3,4,5],interval:[0,5],frameRepeat:3,loop:1,onFinish:D})}function D(){hudNET.flipbook.play(I,{seq:[8,6,2,3,4,7],interval:[0,5],frameRepeat:4,loop:1,onFinish:C})}function C(){hudNET.flipbook.gotoFrame(I,{frame:0,seq:[8]});window.setTimeout(J,1000)}function J(){hudNET.flipbook.gotoFrame(M,{frame:0,seq:[6]});$("#"+M).animate({left:31,top:5},360,"linear",B)}function B(){hudNET.flipbook.play(M,{seq:[7,8],interval:[0,"last"],frameRepeat:1,loop:200000});hudNET.flipbook.play(I,{seq:[8,9,10,11,12],interval:[0,"last"],frameRepeat:5,loop:0});$("#"+M).animate({left:"-=58"},800,"linear",L)}function L(){hudNET.flipbook.play(I,{seq:[13,14,15,0],interval:[0,"last"],frameRepeat:5,loop:0});$("#"+O).css({left:10,top:39});hudNET.flipbook.gotoFrame(O,{frame:0,seq:[0]});$("#"+M).animate({left:"+=58"},800,"linear",R)}}};

