/*
 Labor: Version 2.6.0
*/
(function(){window.G8=window.G8||{};$(document);$(window);var a={};(function k(){a.menuIsSwitching=false;a.origImgWidth=680;a.full2ndLevelWidth=906;a.currViewMode="NORMAL";a.contentSaveframeNormal=70;a.contentSaveframeRapport=50;a.topOffset=132;a.hideTextRatio=0.6;a.siteIsScaled=false;a.currLang=false;a.currUrl=location.href;a.rapportScaleFactor=0.2;a.wordings={};a.wordings.de={changeView:"Ansicht wechseln",viewNormal:"Normal",viewMiniatur:"Miniatur"};a.wordings.en={changeView:"change view",viewNormal:"normal",
viewMiniatur:"mini"}})();var q=function k(){function h(){a.DomMainColDescription=$("#frmMainColDescription");a.DomMainColDetailcontents=$("#frmMainColDetailcontents");a.DomZoomPopup=$("#frmZoompop");a.currLang=location.href.indexOf("/de/")!=-1?"de":"en";$(window).bind("resize",$.debounce(300,c));i()}function j(d,e){var l=e/a.origImgWidth<a.hideTextRatio;d.each(function(){var g=$(this);l&&g.hide();g.width()>e&&g.data("origWidth",g.width()).width(e)})}function f(d){d.each(function(){var e=$(this);e.data("origWidth")&&
e.width(e.data("origWidth"));e.show()})}function b(){var d=$("#frmMainColDetailcontents"),e=$("#frmMainColContents"),l=$(window).width();if(d.length){var g=$("#frmMenuCol");e=$("#frmMainColDescription");g=g.width();var n=e.length?e.width():0,o=d.find(".idStartText, .idContentsAbove, .idContentsAboveAfterText, .idContentsBeneathBeneath");d.width(a.origImgWidth);if(g+n+d.width()>l){a.siteIsScaled=true;d.width(l-g-n);j(o,d.width())}else{a.siteIsScaled=false;d.width(a.origImgWidth);f(o)}e.css("left",
g+d.width());if(a.siteIsScaled){$(".idContentFlash",d).find(".idContentFlashAltImg").show();$(".idContentFlashSwf",d).hide()}else{$(".idContentFlashAltImg",d).hide();$(".idContentFlash",d).width(a.origImgWidth).find(".idContentFlashSwf").show()}a.siteIsScaled?$(".idContentImg,.idContentFlashAltImg",d).removeClass("idLinkCursor").removeClass("idZoomOutCursor").addClass("idZoomInCursor"):$(".idContentImg,.idContentFlashAltImg",d).removeClass("idLinkCursor").removeClass("idZoomOutCursor").removeClass("idZoomInCursor")}else if(e.length){d=
906;g=$("#frmMenuCol");g=g.width();if(g+d>l){a.siteIsScaled=true;e.width(l-g)}else{a.siteIsScaled=false;e.width(a.full2ndLevelWidth)}}}function c(){b()}function i(){r.tglRapportLink();$("a").bind("focus",s);$("a").bind("click",t.clk_anyLink);$("#mailForm").bind("submit",u.sbm_contactForm);v.reinitHomeFlash();b();a.DomMainColDescription.add($("html,body")).scrollTop(0);m()}function m(){if($(".twitterBlock").length){p("http://twitter.com/javascripts/blogger.js");p("http://twitter.com/statuses/user_timeline/das_LABOR.json?callback=twitterCallback2&amp;count=3")}}
function p(d){var e=$("head");e.find("script[src="+d+"]").length||e.append('<script type="text/javascript" src="'+d+'"><\/script>')}function s(){this.blur&&this.blur()}function w(){var d=a.DomMainColDetailcontents.width();d+=parseInt(a.DomMainColDetailcontents.css("padding-left"))+parseInt(a.DomMainColDetailcontents.css("padding-right"));return d<a.origImgWidth?a.origImgWidth*(d/a.origImgWidth)-20:a.origImgWidth}return{initPage:h,getMaxImgWidth:w,updateDisplay:i}}(),v=function k(){function h(){$("#hafenAniBox").flashembed({src:"../../img/labor_hafen_harbor.swf",
wmode:"opaque"})}return{reinitHomeFlash:h}}(),t=function k(){function h(){var b=$(this),c=b.attr("href");if(!b.hasClass("js_directLink")&&b.attr("target")!="_blank"&&c!=""&&c!="#"&&!c.hasStr("http:","https:")){f(b);return false}}function j(b){var c=document.createElement("a");c.href=b;return b=c.href}function f(b){var c=b.attr("href");c=j(c);var i=$(".mainNavAct");if(!i.length){var m=$(".subNavAct");if(m.length)i=m.parents(".boxSubNav").prev().find(".mainNav")}if(i.length)if((b=b.hasClass("subNav")?
b.parents(".boxSubNav").prev().find(".mainNav"):b.hasClass("mainNav")?b:false)&&i[0]!=b[0]&&i.parent(".boxMainNav").next(".boxSubNav").length)i.parent(".boxMainNav").next(".boxSubNav").slideUp(300,function(){location.href=c});else location.href=c;else location.href=c}return{clk_anyLink:h}}(),r=function k(){function h(){var b=$("#RapportLink"),c=a.DomMainColDescription.find(".idContainer");if(c.hasClass("js_hasRapportLink")){if(!b.length){b=$('<div id="RapportLink">'+a.wordings[a.currLang].changeView+
'<img src="../../img/icon_viewrapport.gif" id="ImgRapportLink" class="idLinkCursor" alt="'+a.wordings[a.currLang].viewMiniatur+'" title="'+a.wordings[a.currLang].viewMiniatur+'"></div>');c.find(".afterRapportLink").length?c.find(".afterRapportLink").before(b):c.append(b)}}else b.length&&b.remove();$("#ImgRapportLink").bind("click",j);$(".idContentImg,.idContentFlashAltImg",a.DomMainColDetailcontents).bind("click",f)}function j(){$("#RapportLink");var b=$("#ImgRapportLink");if(a.currViewMode=="NORMAL"){$("html,body").scrollTop(0);
$(".idContentText,.idSpacerContentMiddle,.idContentFlashSwf,.idStartText",a.DomMainColDetailcontents).hide();$(".idContentImg,.js_spacerContentEnd,.idContentFlash",a.DomMainColDetailcontents).animate({width:a.origImgWidth*a.rapportScaleFactor},500).find(".idContentFlashAltImg").show();$(".idContentImg,.idContentFlashAltImg",a.DomMainColDetailcontents).addClass("idLinkCursor").removeClass("idZoomOutCursor").removeClass("idZoomInCursor");b.attr("src","../../img/icon_viewnormal.gif").attr("alt",a.wordings[a.currLang].viewNormal).attr("title",
a.wordings[a.currLang].viewNormal);a.currViewMode="RAPPORT"}else{var c=q.getMaxImgWidth();$(".idContentImg,.js_spacerContentEnd,.idSpacerContentMiddle",a.DomMainColDetailcontents).show().animate({width:c},500);if(c/a.origImgWidth>=a.hideTextRatio){$(".idStartText",a.DomMainColDetailcontents).show();$(".idContentText",a.DomMainColDetailcontents).width(c).show()}if(a.siteIsScaled){$(".idContentFlash",a.DomMainColDetailcontents).width(c).find(".idContentFlashAltImg").show();$(".idContentFlashSwf",a.DomMainColDetailcontents).hide()}else{$(".idContentFlashAltImg",
a.DomMainColDetailcontents).hide();$(".idContentFlash",a.DomMainColDetailcontents).width(a.origImgWidth).find(".idContentFlashSwf").show()}a.siteIsScaled?$(".idContentImg,.idContentFlashAltImg",a.DomMainColDetailcontents).removeClass("idLinkCursor").removeClass("idZoomOutCursor").addClass("idZoomInCursor"):$(".idContentImg,.idContentFlashAltImg",a.DomMainColDetailcontents).removeClass("idLinkCursor").removeClass("idZoomOutCursor");b.attr("src","../../img/icon_viewrapport.gif").attr("alt",a.wordings[a.currLang].viewMiniatur).attr("title",
a.wordings[a.currLang].viewMiniatur);a.currViewMode="NORMAL"}}function f(){var b=$(this);if(a.currViewMode=="RAPPORT"){var c=$("#ImgRapportLink");c.trigger("click");setTimeout(function(){if(b.hasClass("idContentFlashAltImg")&&!a.siteIsScaled)b=b.parent().find(".idContentFlashSwf");$("html,body").animate({scrollTop:b.top()-a.topOffset},500)},500)}else a.siteIsScaled&&x.showZoomed(b)}return{tglRapportLink:h}}(),x=function k(){function h(f){var b='<div class="idClosePopupLink idLinkCursor">'+a.wordings[a.currLang].changeView+
':<img class="idClosePopup" src="../../img/icon_viewback.gif" alt="'+a.wordings[a.currLang].viewNormal+'" title="'+a.wordings[a.currLang].viewNormal+'"></div>';a.DomZoomPopup.find(".idContainer").html(a.DomMainColDetailcontents.html()).prepend(b).find(".js_spacerContentEnd").before(b).end().find(".idClosePopupLink").bind("click",function(){j($(a.DomZoomPopup.find(".idContentImg,.idContentFlash").eq(0)))}).end().find(".idContentImg,.idSpacerContentMiddle,.js_spacerContentEnd,.idContentFlash").width(a.origImgWidth).end().find(".idContentText,.idSpacerContentMiddle,.idContentFlashSwf,.idContentFlash").show().end().find(".idContentFlashAltImg").hide().end().find(".idContentImg,.idContentFlashAltImg").removeClass("idLinkCursor").removeClass("idZoomInCursor").addClass("idZoomOutCursor");
a.DomZoomPopup.left(0).top(0).fadeIn(400,function(){a.DomZoomPopup.find(".idContentImg,.idContentFlashAltImg").each(function(){obj=$(this);if(obj.html()==f.html()){if(obj.hasClass("idContentFlashAltImg"))obj=obj.parent().find(".idContentFlashSwf");$("html,body").animate({scrollTop:obj.top()-10},500)}})}).find(".idContentImg").one("click",function(){j($(this))})}function j(f){a.DomZoomPopup.fadeOut(400,function(){a.DomMainColDetailcontents.find(".idContentImg").each(function(){obj=$(this);if(obj.html()==
f.html()){var b=$("html,body");b.animate({scrollTop:obj.top()-a.topOffset},500)}});a.DomZoomPopup.find(".idContainer").html("")})}return{showZoomed:h}}(),u=function k(){function h(f){var b={};f=f.find("input,textarea,select");f.each(function(){var c=$(this);if(c.attr("name")){var i=c.attr("name");c=c.val();b[i]=c}});return b}function j(){var f=$("#mailForm"),b=h(f);$.post("../../php/mailsend.php",b,function(c){f.hide();c=="OK"?$("#contactFormSuccess").show(300):$("#contactFormError").show(300)});
return false}return{sbm_contactForm:j}}();$(function(){q.initPage()})})();
