if(typeof com==="undefined"){var com=function(){}}if(typeof com.babiel==="undefined"){com.babiel=function(){}}if(typeof com.babiel.aa==="undefined"){com.babiel.aa=function(){}}if(typeof com.babiel.aa.js==="undefined"){com.babiel.aa.js=function(){}}com.babiel.aa.js.UserAgentDetectingRedirectComponent=function(b){var d;var c;var e="mobileRedirectPrompt";this.__construct=function(f){d=this;c={event:{init:{data:{self:d},handler:d.onEventInit,eventType:"load",selector:window}},mapping:{},content:{}};try{this.setOptions(f);a()}catch(g){}};this.setOptions=function(f){if(typeof f!=="object"){throw (new TypeError('Argument "settings" isn\'t an object.'))}jQuery.extend(true,c,f)};this.checkRedirection=function(){if(!navigator.cookieEnabled){return}var g=navigator.userAgent;try{var f=JSON.parse(jQuery.cookie(e))}catch(h){}jQuery.each(c.mapping,function(k,m){var j=new RegExp(k,"i");if(g.search(j)>-1){var l=false;if(f==undefined||f=={}){l=confirm(c.content.redirectMessage);if(l){window.location=m}else{jQuery.cookie("mobileRedirectPrompt",JSON.stringify({reply:"0"}),{path:"/",expires:0.0417})}return false}}})};this.onEventInit=function(f){d.checkRedirection()};var a=function(){d.setupEvents(c.event)};this.__construct(b);this.constructor()};com.babiel.aa.js.UserAgentDetectingRedirectComponent.prototype=new com.babiel.application.jsctrl.JQueryComponent();com.babiel.aa.js.AdvisorComponent=function(e,a,k){var h;var g;var j;var d;var f;this.__construct=function(o,m,l){h=this;d="";f="";try{this.setInputSelector(o);this.setParameters(l);this.setData(m);c()}catch(n){throw (new com.babiel.application.jsctrl.InvalidParameterException(n))}};this.getInputSelector=function(){return g};this.getParameters=function(){return j};this.getData=function(){return f};var b=function(l){var n=new RegExp("([?]|[&])"+l+"=([0-9A-Za-z_-]*)");var m=null;if(typeof window.location.search=="string"){var o=n.exec(window.location.search);if(o!==null&&o.length>1){m=o[2]}}return m};this.setInputSelector=function(l){if(!($(l))){throw (new com.babiel.application.jsctrl.InvalidParameterException("Can't get an HTML ELement with Selector \""+l+'".'))}g=l};this.setParameters=function(l){if(typeof l!=="object"){throw (new TypeError('Argument "obj" isn\'t an object.'))}j=l};this.setData=function(l){if(typeof l==="string"||typeof l==="object"){f=l}else{throw (new TypeError('Argument "dataOrUrl" isn\'t an object or string.'))}};var c=function(){$(g).autocomplete(f,j)};this.__construct(e,a,k);this.constructor()};com.babiel.aa.js.AdvisorComponent.prototype=new com.babiel.application.jsctrl.Component();com.babiel.aa.js.AnchorContentComponent=function(b){var g;var f;this.__construct=function(j){g=this;f={event:{toggleContent:{data:{},handler:d,eventType:"click",selector:"a[href]"},hideContent:{data:{},handler:e,eventType:"load",selector:window}},content:{effect:{hide:{type:"hide",speed:false},show:{type:"show",speed:false}},selector:false}};try{this.setOptions(j);a()}catch(k){throw (new com.babiel.application.jsctrl.InvalidParameterException(k))}};var h=function(j){var l=[];var k=new RegExp("^a$","i");$(j).each(function(m,n){if(typeof n==="object"&&k.test(n.tagName)){l.push(n)}});if(l.length>0){return $(l)}return $(j).find("a")};this.getOptions=function(){return f};var e=function(j){g.getLogger().debug("Hide content...");$(f.content.selector)[f.content.effect.hide.type](f.content.effect.hide.speed);return false};var d=function(k){e(k);var j=h(this);j.each(function(){var l=jQuery.url.setUrl(this.href).attr("anchor");if(l!=""){$("a[name]").each(function(){if(this.name===l){g.getLogger().debug('Show content of anchor "'+l+'".');$(this).parents(f.content.selector)[f.content.effect.show.type](f.content.effect.show.speed)}})}});return false};this.setOptions=function(j){if(typeof j!=="object"){throw (new TypeError('Argument "settings" isn\'t an object.'))}jQuery.extend(true,f,j)};var a=function(){c(f.event)};var c=function(k){g.getLogger().debug("Setup definied events automatically.");if(typeof k==="object"){var j;for(key in k){j=k[key];if(typeof j==="object"&&typeof j.handler==="function"&&typeof j.eventType==="string"&&typeof j.selector!=="undefined"){g.getLogger().debug('Setup event handler for event "'+key+'" with selector "'+j.selector+'"');var l=(j.data!==undefined)?j.data:{};$(j.selector).unbind(j.eventType,j.handler).bind(j.eventType,l,j.handler)}else{g.getLogger().debug('Setup event handler for event "'+key+'" failed.')}}}else{g.getLogger().warn("Can not setup events, no settings available.")}};this.__construct(b);this.constructor()};com.babiel.aa.js.AnchorContentComponent.prototype=new com.babiel.application.jsctrl.Component();com.babiel.aa.js.DialogComponent=function(e,j,b,f){var c;var k;var g;var d;var h;this.__construct=function(l,o,n,m){c=this;g={};h={requestParameters:{}};try{this.setMainSelector(l);this.setButtonSelector(o);this.setOptions(m);this.setDialogParameters(n);a()}catch(p){}};this.getButtonSelector=function(){return k};this.getDialogParameters=function(){return g};this.getMainSelector=function(){return d};this.getOptions=function(){return h};this.getRequestUrl=function(){return h.requestUrl};this.loadView=function(l){$.get(h.requestUrl,h.requestParameters,function(m){$("body").append(m);g.close=function(){$(this).dialog("destroy");$(this).remove()};$(d).dialog(g);$(d).find(".closeDialog").click(function(){$(d).dialog("close")})},"html")};this.setButtonSelector=function(l){if(!($(l))){throw (new com.babiel.application.jsctrl.InvalidParameterException("Can't get an HTML ELement with Selector \""+l+'".'))}k=l};this.setDialogParameters=function(l){if(typeof l!=="object"){throw (new TypeError('Argument "parameters" isn\'t an object.'))}g=l};this.setMainSelector=function(l){if(typeof l!=="string"){throw (new TypeError('Argument "selector" isn\'t a string.'))}d=l};this.setOptions=function(l){if(typeof l!=="object"){throw (new TypeError('Argument "settings" isn\'t an object.'))}if(typeof l.requestParameters==="undefined"){l.requestParameters={}}h=l};this.setRequestUrl=function(l){if(typeof l!=="string"){throw (new TypeError('Argument "url" isn\'t a string.'))}h.requestUrl=l};var a=function(){$(d).hide();$(k).click(function(){var l=$(this).attr("href");if(typeof l==="string"&&l!==""){jQuery.extend(h.requestParameters,jQuery.url.setUrl(l).params())}$(this).removeAttr("target");if(typeof h.requestUrl!=="undefined"&&h.requestUrl!=""){c.loadView(this)}else{g.close=function(){$(this).dialog("destroy");$(this).hide()};$(d).dialog(g);$(d).find(".closeDialog").click(function(){$(d).dialog("close")})}return false})};this.__construct(e,j,b,f);this.constructor()};com.babiel.aa.js.DialogComponent.prototype=new com.babiel.application.jsctrl.Component();com.babiel.aa.js.InitialValueComponent=function(b){var d;var c;this.__construct=function(f){d=this;c={event:{setupEventHandlerForElements:{data:{},handler:e,eventType:"load",selector:window}},content:{input:{elements:[],event:{focusInput:{handler:function(h){if(h.data.initialValue!==undefined){if($(this).val()===h.data.initialValue){$(this).val("")}}},eventType:"focus"},initInput:{handler:function(h){if(h.data.initialValue!==undefined){if(h.data.initialValue!==""){$(this).val(h.data.initialValue)}}},eventType:"init"},leaveInput:{handler:function(h){if(h.data.initialValue!==undefined){if($(this).val()===""){$(this).val(h.data.initialValue)}}},eventType:"blur"}}},selector:false}};try{this.setOptions(f);a()}catch(g){throw (new com.babiel.application.jsctrl.InvalidParameterException(g))}};this.getOptions=function(){return c};var e=function(j){d.getLogger().debug("Setup event handler function of input elements.");var k=c.content.input.elements;if(k instanceof Array){for(var g=0;g<k.length;g++){var f=k[g];if(f.selector!==undefined&&f.data!==undefined){var h={focusInput:{data:(typeof f.data==="object")?f.data:{},selector:f.selector},initInput:{data:(typeof f.data==="object")?f.data:{},selector:f.selector},leaveInput:{data:(typeof f.data==="object")?f.data:{},selector:f.selector}};jQuery.extend(true,h,c.content.input.event);d.setupEvents(h);jQuery(f.selector).trigger("init")}else{d.getLogger().warn('Can not setup event handler for element with index "'+g+'".')}}}return false};this.setOptions=function(f){if(typeof f!=="object"){throw (new TypeError('Argument "settings" isn\'t an object.'))}jQuery.extend(true,c,f)};var a=function(){d.setupEvents(c.event)};this.__construct(b);this.constructor()};com.babiel.aa.js.InitialValueComponent.prototype=new com.babiel.application.jsctrl.JQueryComponent();com.babiel.aa.js.MapsComponent=function(s){var m;var z;var r;var y;var g;var A;var k;this.__construct=function(B){m=this;z=false;g={event:{init:{data:{self:m},handler:m.onEventInit,eventType:"ready",selector:document},submitForm:{data:{self:m},handler:function(){return false},eventType:"submit",selector:false},searchTerm:{data:{self:m},handler:m.onEventSearchTerm,eventType:"keyup",selector:false}},content:{map:{marker:{callback:false,linkTarget:"common",elements:[],icon:{},iconShadow:{},random:{count:0},requestParameters:{},requestUrl:"__unknown__",zIndex:10000},parameter:{zoom:1,center:new google.maps.LatLng(24,0),mapTypeControl:false,mapTypeId:google.maps.MapTypeId.HYBRID,navigationControl:true,navigationControlOptions:{style:google.maps.NavigationControlStyle.SMALL},scaleControl:false},selector:false,zoom:{min:false,max:false}},search:{elements:[],inputSelector:false,resultsSelector:false,requestParameters:{},requestUrl:"__unknown__"}}};A=false;try{this.setOptions(B);p()}catch(C){throw (new com.babiel.application.jsctrl.InvalidParameterException(C))}};var a=function(B){m.getLogger().debug("Aborting xhr...");if(B===undefined){m.getLogger().debug("No XMLHttpRequest object found.");return}B.abort();A=false};var o=function(C){if(C instanceof Array){for(var B=0;B<C.length;B++){if(C[B] instanceof google.maps.Marker){C[B].setMap(z)}}}};var e=function(B){var C={};var D=$(B);D.each(function(){try{if(this.tagName!=="icon"){throw (new TypeError('Object isn\'t an element of tag "icon".'))}var H=$(this).attr("name");if(typeof H!=="string"||H===""){throw (new TypeError('Attribute "name" is not a string or empty.'))}var E=$(this).attr("src");if(typeof E!=="string"||E===""){throw (new TypeError('Attribute "src" is not a string or empty.'))}var G=parseInt($(this).find("size").attr("width"));var F=parseInt($(this).find("size").attr("height"));var P=(!isNaN(G)&&!isNaN(F))?new google.maps.Size(G,F):false;var J=parseInt($(this).find("anchor").attr("x"));var I=parseInt($(this).find("anchor").attr("y"));var K=(!isNaN(J)&&!isNaN(I))?new google.maps.Point(J,I):false;var O=parseInt($(this).find("origin").attr("x"));var N=parseInt($(this).find("origin").attr("y"));var M=(!isNaN(O)&&!isNaN(N))?new google.maps.Point(O,N):false;C[H]=new google.maps.MarkerImage(E,P,K,M)}catch(L){m.getLogger().warn("Exception: "+L)}});return C};var b=function(B){var D=[];var C=g.content.map.marker;var E=$(B);E.each(function(){try{if(this.tagName!=="marker"){throw (new TypeError('Object isn\'t an element of tag "marker".'))}var M={zIndex:C.zIndex};C.zIndex++;var I=$(this).attr("type");if(typeof I==="string"&&I!==""){if(C.icon[I]!==undefined){M.icon=C.icon[I]}if(C.iconShadow[I]!==undefined){M.shadow=C.iconShadow[I]}}var L=$(this).find("description").text();if(typeof L==="string"&&L!==""){M.title=L}var K=parseFloat($(this).find("lat").text());var H=parseFloat($(this).find("lng").text());if(!isNaN(K)&&!isNaN(H)){m.getLogger().debug("Position of marker is "+K+" latitude and "+H+" longitude.");M.position=new google.maps.LatLng(K,H)}else{m.getLogger().warn("Position of marker can not be parsed (latitude: "+K+", longitude: "+H+", title: "+M.title+").");return}var G=$(this).find("url[class='"+C.linkTarget+"']").text();if(typeof G==="string"&&G!==""){M.url=G}var F=new google.maps.Marker(M);if(M.url!==undefined){m.getLogger().debug("Setting marker link class: '"+C.linkTarget+"' target: "+M.url+".");google.maps.event.addListener(F,"click",function(){location.href=M.url})}D.push(F)}catch(J){m.getLogger().warn("Exception: "+J)}});return D};var d=function(L,I){var B=[];try{var C=new google.maps.LatLngBounds(new google.maps.LatLng(-180,-90),new google.maps.LatLng(180,90));var D=C.getSouthWest();var E=C.getNorthEast();var N=E.lng()-D.lng();var G=E.lat()-D.lat();var F=g.content.map.marker;if(typeof L!=="number"){throw (new TypeError('Argument "count" isn\'t a number.'))}for(var K=0;K<L;K++){var H={};var P=I;if(typeof P==="string"&&P!==""){if(F.icon[P]!==undefined){H.icon=F.icon[P]}if(F.iconShadow[P]!==undefined){H.shadow=F.iconShadow[P]}}var O=D.lat()+G*Math.random();var Q=D.lng()+N*Math.random();if(!isNaN(O)&&!isNaN(Q)){m.getLogger().debug("Position of random marker is "+O+" latitude and "+Q+" longitude.");H.position=new google.maps.LatLng(O,Q)}else{m.getLogger().warn("Position of random marker can not be parsed.")}var J=new google.maps.Marker(H);B.push(J)}}catch(M){m.getLogger().warn("Exception: "+M)}return B};var f=function(B){var D=[];var C=g.content.map.marker;var E=$(B);if(E.size()>0){E.each(function(){try{if(this.tagName!=="marker"){throw (new TypeError('Object isn\'t an element of tag "marker".'))}if($(g.content.search.resultsSelector).length<=0){m.getLogger().warn("No content element(s) for search results selectable.")}var J={title:"",commonLink:{},travelinfoLink:{}};var I=$(this).find("name").text();if(typeof I==="string"&&I!==""){J.title=I}var F=$(this).find("url[class='common']").text();if(typeof F==="string"&&F!==""){J.commonLink={url:F,title:$(this).find("url[class='common']").attr("title")}}var F=$(this).find("url[class='travelinfo']").text();if(typeof F==="string"&&F!==""){J.travelinfoLink={url:F,title:$(this).find("url[class='travelinfo']").attr("title")}}var G=c(J);D.push(G)}catch(H){m.getLogger().warn("Exception: "+H)}})}else{m.getLogger().debug("No search results, creating empty li element");D.push(h())}return D};var h=function(){var C=document.createElement("li");var B=document.createAttribute("class");B.nodeValue="hidden";C.setAttributeNode(B);return C};var c=function(E){var L=document.createElement("li");var K=document.createElement("div");K.className="content";var D=document.createElement("h3");node_2_0_text=document.createTextNode(E.title);var C=document.createElement("ul");C.className="infoLinks";var G=document.createElement("li");var F=document.createElement("li");if(E.commonLink.url!==undefined){var I=document.createElement("a");I.href=E.commonLink.url;I.title=E.commonLink.title;var J=document.createTextNode(E.commonLink.title);$(I).append(J);$(G).append(I)}if(E.travelinfoLink.url!==undefined){var H=document.createElement("a");H.href=E.travelinfoLink.url;H.title=E.travelinfoLink.title;var B=document.createTextNode(E.travelinfoLink.title);$(H).append(B);$(F).append(H)}$(L).append(K);$(K).append(D).append(C);$(D).append(node_2_0_text);$(C).append(G).append(F);return L};var w=function(B,D,C){if(A===true){return}if(typeof B!=="string"){throw (new TypeError('Argument "url" isn\'t a string.'))}if(typeof D!=="object"){throw (new TypeError('Argument "params" isn\'t an object.'))}if(typeof C!=="function"){throw (new TypeError('Argument "clbk" isn\'t a function.'))}m.getLogger().debug("Determined parameters for request: "+jQuery.toJSON(D));D=jQuery.param(D,true);A=true;return jQuery.ajax({url:B,cache:false,contentType:"application/x-www-form-urlencoded",data:D,dataType:"xml",success:C,complete:function(){m.getLogger().debug("Request complete.");A=false}})};var u=function(J,G){if(J===undefined){throw (new TypeError('Argument "mainSelector" is undefined.'))}if($(J).length<=0){throw (new com.babiel.application.jsctrl.InvalidParameterException('Can not find an element with selector "'+selector+'".'))}var F=$(J).find("input:checkbox");m.getLogger().debug('Checkboxenlaenge: "'+F.length+'".');var D={};if(F.length>0){for(var E=0;E<F.length;E++){var H=F[E];var C;if(H.name!==""&&typeof H.value!=="undefined"){if(H.checked===true){if(typeof D[H.name]!=="undefined"){if(!(D[H.name] instanceof Array)){C=D[H.name];D[H.name]=[];D[H.name].push(C)}D[H.name].push(H.value);D[H.name]=uniqueEntriesInArray(D[H.name])}else{D[H.name]=H.value}m.getLogger().debug(E+': Add "'+H.name+'": "'+H.value+'".')}else{if(D[H.name] instanceof Array){D[H.name]=removeEntryInArray(D[H.name],H.value)}else{if(H.value===D[H.name]){m.getLogger().debug(E+': Deleting "'+D[H.name]+'" '+(delete D[H.name])+".")}}}}delete H;delete C}}var I=function(){if(typeof this.name==="string"&&typeof this.value==="string"){D[this.name]=this.value}};var B=$(J).find("form");B.find("input[type='hidden']").each(I);B.find("input[type='password']").each(I);B.find("input[type='radio'][checked]").each(I);B.find("input[type='text']").each(I);$(G).each(I);return D};this.getOptions=function(){return g};var n=function(C,B){if(C instanceof Array&&C instanceof Array){for(var D=0;D<B.length;D++){C.push(B[D])}}return C};this.onEventInit=function(C,D){m.getLogger().debug("Initializing maps component...");var B=g.content.map;if(jQuery(B.selector).get(0)!==undefined){var E={};jQuery.extend(true,E,B.parameter);z=new google.maps.Map(jQuery(B.selector).get(0),E);if(typeof B.zoom==="object"){google.maps.event.addListener(z,"zoom_changed",function(){var G=parseInt(B.zoom.min);var F=parseInt(B.zoom.max);if(!isNaN(G)&&z.getZoom()<G){z.setZoom(G)}if(!isNaN(F)&&z.getZoom()>F){z.setZoom(F)}})}l()}else{m.getLogger().warn("Content selector for map can not be resolved.")}return false};this.onEventSearchTerm=function(C){var B=g.content.search;m.getLogger().debug("Searching term... "+$(B.inputSelector).val());a(k);try{var G={};var E=new RegExp("^input$","i");if(typeof this!=="undefined"&&E.test(this.tagName)){m.getLogger().debug("Button is an Input-Tag.");G=u($(this).parents("form"),this);G=jQuery.extend(G,B.requestParameters)}E=new RegExp("^a$","i");if(typeof this!=="undefined"&&E.test(this.tagName)){m.getLogger().debug("Button is an A-Tag.");G=jQuery.url.setUrl($(this).attr("href")).params();G=jQuery.extend(G,B.requestParameters)}var D=$(B.inputSelector).val();if(typeof B.requestUrl==="string"&&typeof D==="string"&&D!==""){k=w(B.requestUrl,G,q)}else{B.elements=v(B.elements);$(B.resultsSelector).contents().remove()}}catch(F){m.getLogger().error("Exception: "+F)}};var t=function(F){m.getLogger().debug("Parse response data as xml.");try{var E=g.content.map.marker;if(typeof F==="object"){var D=e($(F).find("icons icon[type='flat']"));jQuery.extend(E.icon,D);var I=e($(F).find("icons icon[type='shadow']"));jQuery.extend(E.iconShadow,I);var H=b($(F).find("markers marker[type='country']"));E.elements=n(E.elements,H);var C=b($(F).find("markers marker[type='info']"));E.elements=n(E.elements,C);m.getLogger().debug("Choosing MarkerManager/MarkerClusterer...");if(typeof E.clusterer==="object"){m.getLogger().debug("Creating MarkerClusterer...");r=new MarkerClusterer(z,E.elements,E.clusterer)}else{if(typeof E.manager==="object"){m.getLogger().debug("Creating MarkerManager...");y=new MarkerManager(z,E.manager);google.maps.event.addListener(y,"loaded",function(){y.addMarkers(H,4,17);y.addMarkers(C,1,17);y.refresh()})}else{for(var B=0;B<E.elements.length;B++){E.elements[B].setMap(z);if(typeof E.callback==="function"){E.callback(z,E.elements[B])}}}}}}catch(G){m.getLogger().warn("Parsing response data as xml failed. "+G)}};var q=function(E){m.getLogger().debug("Parse response data as xml.");var D=g.content.search;D.elements=v(D.elements);$(D.resultsSelector).contents().remove();var C=$(E).find("markers marker[type='searchResult']");var F=b(C);D.elements=n(D.elements,F);o(D.elements);var B=f(C);$(D.resultsSelector).append(B)};var l=function(){m.getLogger().info("Requesting marker data...");try{var B=g.content.map.marker;if(typeof B.requestUrl==="string"&&typeof B.requestParameters==="object"){w(B.requestUrl,B.requestParameters,t)}}catch(C){m.getLogger().error("Exception: "+C)}return false};this.setOptions=function(B){if(typeof B!=="object"){throw (new TypeError('Argument "settings" isn\'t an object.'))}jQuery.extend(true,g,B)};var p=function(){j(g.event)};var j=function(F){if(typeof F!=="object"){throw (new TypeError('Argument "settings" isn\'t an object.'))}m.getLogger().debug("Setup definied events automatically.");var B;var E=[];for(key in F){B=F[key];try{if(typeof B!=="object"){throw (new TypeError("Event configuration isn't an object."))}if(typeof B.handler!=="function"){throw (new TypeError("Event handler isn't a function."))}if(typeof B.eventType!=="string"){throw (new TypeError("Event type isn't a string."))}if(B.selector===undefined){throw (new TypeError("Event selector is undefined."))}m.getLogger().debug('Setup event handler for event "'+key+'" with selector "'+B.selector+'"');if(B.eventType==="ready"&&B.selector===document){m.getLogger().debug('Setup special case "ready".');if(jQuery.isReady){B.handler()}else{$(B.selector).ready(B.handler)}}else{m.getLogger().debug('Setup event handler for event "'+key+'" with selector "'+B.selector+'"');var H=(B.data!==undefined)?B.data:{self:m};$(B.selector).unbind(B.eventType,B.handler).bind(B.eventType,H,B.handler)}}catch(G){E.push('Setup event handler for event "'+key+'" failed: '+G)}}if(E.length>0){var D="";for(var C=0;E.length>C;C++){D+=E[C].toString()+"\n"}throw (new com.babiel.application.jsctrl.WrongConfigurationException(D))}};var v=function(C){if(C instanceof Array){for(var B=0;B<C.length;B++){if(C[B] instanceof google.maps.Marker){C[B].setMap(null)}}}return[]};this.__construct(s);this.constructor()};com.babiel.aa.js.MapsComponent.prototype=new com.babiel.application.jsctrl.Component();com.babiel.aa.js.MediathekComponent=function(g,h){var e;var f;var l;var j;this.__construct=function(m,n){e=this;l={event:{init:{data:{self:e},handler:e.onEventInit,eventType:"ready",selector:document},requestContent:{data:{self:e},handler:e.onEventRequestContent,eventType:"click",selector:undefined},scrollToViewPort:{data:{self:e},handler:e.onEventScrollToViewPort,eventType:"click",selector:undefined}},content:{requestParameters:{},requestUrl:"__unknown__",viewPortSelector:false},cookie:{componentId:"default",name:"Mediathek",option:{secure:false}},memorize:{videoCountSelector:false,videoListCookieKey:"userVideoList",videoSelector:false}};j=false;try{this.setMainSelector(m);this.setOptions(n);e.setup()}catch(o){throw (new com.babiel.application.jsctrl.InvalidParameterException(o))}};var b=function(n,m){e.getLogger().debug("Determined parameters for request: "+jQuery.toJSON(n));n=jQuery.extend(n,l.content.requestParameters);n=jQuery.param(n,true);jQuery.ajax({url:l.content.requestUrl,cache:false,contentType:"application/x-www-form-urlencoded; charset=UTF-8",data:n,dataType:"html",success:m,complete:k})};this.getMainSelector=function(){return f};this.getOptions=function(){return l};this.onEventInit=function(m,n){e.getLogger().debug("Initializing mediathek component...");return false};this.onEventMemorizeVideoId=function(m,o){e.getLogger().debug("Memorize video id.");var n=new RegExp("^a$","i");if(typeof this!=="undefined"&&n.test(this.tagName)){e.getLogger().debug("Button is an A-Tag.");var p=jQuery.url.setUrl($(this).attr("href")).param("id");d(p)}return false};this.onEventRequestContent=function(m){e.getLogger().debug("Requesting new content...");var o={};var n=new RegExp("^input$","i");if(typeof this!=="undefined"&&n.test(this.tagName)){e.getLogger().debug("Button is an Input-Tag.");o=getFormData(this)}n=new RegExp("^a$","i");if(typeof this!=="undefined"&&n.test(this.tagName)){e.getLogger().debug("Button is an A-Tag.");o=jQuery.url.setUrl($(this).attr("href")).params()}if(j===true){return false}j=true;b(o,a);return false};this.onEventScrollToViewPort=function(n,o){e.getLogger().debug("Scrolling to view port.");if(l.content.viewPortSelector!==undefined){var m={eventTypes:"view"};$(this).view(l.content.viewPortSelector,m).trigger("view")}else{e.getLogger().warn("No view port selector defined.")}return false};var a=function(m){e.getLogger().debug("Changing html content.");$("<div>"+m+"</div>").children().each(function(){e.getLogger().debug('Replacing element "'+this.tagName+'" with id "'+this.id+'" and class "'+this.className+'".');var q=$(this).attr("id");var o=$(f).find("#"+q);if(o.length>0){e.getLogger().debug('Element id is "'+q+'".');o.replaceWith($(this));e.setup();return}var p=$(this).attr("class").split(" ");o=$(f).find(p.join(" ."));if(o.length>0){e.getLogger().debug('Element classes are "'+p.join(" .")+'".');o.replaceWith($(this));e.setup();return}});var n=document.createElement("div");$(n).append(m);$(n).remove()};var k=function(){e.getLogger().debug("Sperrung weiterer HTTP-Requests aufheben.");j=false};this.setMainSelector=function(m){if(!($(m))){throw (new com.babiel.application.jsctrl.InvalidParameterException("Can't get an HTML ELement with Selector \""+m+'".'))}f=m};this.setOptions=function(m){if(typeof m!=="object"){throw (new TypeError('Argument "settings" isn\'t an object.'))}jQuery.extend(true,l,m)};this.setup=function(){c(l.event)};var c=function(q){if(typeof q!=="object"){throw (new TypeError('Argument "settings" isn\'t an object.'))}e.getLogger().debug("Setup definied events automatically.");var m;var p=[];for(key in q){m=q[key];try{if(typeof m!=="object"){throw (new TypeError("Event configuration isn't an object."))}if(typeof m.handler!=="function"){throw (new TypeError("Event handler isn't a function."))}if(typeof m.eventType!=="string"){throw (new TypeError("Event type isn't a string."))}if(m.selector===undefined){throw (new TypeError("Event selector is undefined."))}e.getLogger().debug('Setup event handler for event "'+key+'" with selector "'+m.selector+'"');if(m.eventType==="ready"&&m.selector===document){e.getLogger().debug('Setup special case "ready".');if(jQuery.isReady){m.handler()}else{$(m.selector).ready(m.handler)}}else{e.getLogger().debug('Setup event handler for event "'+key+'" with selector "'+m.selector+'"');var s=(m.data!==undefined)?m.data:{self:e};$(m.selector).unbind(m.eventType,m.handler).bind(m.eventType,s,m.handler)}}catch(r){p.push('Setup event handler for event "'+key+'" failed: '+r)}}if(p.length>0){var o="";for(var n=0;p.length>n;n++){o+=p[n].toString()+"\n"}throw (new com.babiel.application.jsctrl.WrongConfigurationException(o))}};var d=function(p){if(typeof l.cookie==="object"){var m=l.cookie.componentId;var o=l.memorize.videoListCookieKey;var n=new jQuery.JSONCookie(l.cookie.name,l.cookie.option);var r=n.getVariable("components");r=(typeof r!=="undefined"&&typeof r[m]!=="undefined")?r[m]:{};if(o!==undefined&&r[o] instanceof Array){if(jQuery.inArray(p,r[o])==-1){e.getLogger().debug('Adding video id "'+p+'" to param array.');r[o].push(p)}else{e.getLogger().debug('Video-ID "'+p+'" exists in param array.')}}else{e.getLogger().debug('Creating video array and add video id "'+p+'".');r[o]=new Array(p)}if(typeof r!=="undefined"){e.getLogger().debug("Updating cookie value.");var q={};q[m]=r;e.getLogger().debug("Set cookie value to: "+jQuery.toJSON({components:q}));n.setVariable("components",q);e.getLogger().debug("Updating memorize counter.");$(l.memorize.videoCountSelector).text(r[o].length)}}else{e.getLogger().warn("Cookie function deaktivated.")}};this.__construct(g,h);this.constructor()};com.babiel.aa.js.MediathekComponent.prototype=new com.babiel.application.jsctrl.Component();com.babiel.aa.js.PictureGalleryComponent=function(v,o){var g;var d;var q;var r;var k;var a;this.__construct=function(z,A){g=this;r=false;d=0;q=0;a={button:{lazyload:false,next:{selector:false,image:{active:undefined,hover:undefined,inactive:undefined}},prev:{selector:false,image:{active:undefined,hover:undefined,inactive:undefined}}},duration:2000,easingType:"linear",elements:{blurCallback:false,data:[],focusCallback:false,indexCounterSelector:false,lazyload:false,maxCounterSelector:false,selector:false,slidingCount:6,visibleCount:6},event:{init:{data:{self:g},handler:g.onEventInit,eventType:"ready",selector:document},adjustPosition:{data:{self:g},handler:g.onEventAdjustPosition,eventType:"focus",selector:undefined},selectThumbnail:{data:{self:g},handler:g.onEventSelectThumbnail,eventType:"click",selector:undefined},slideLeft:{data:{self:g},handler:w,eventType:"click",selector:undefined},slideRight:{data:{self:g},handler:h,eventType:"click",selector:undefined}},requestParameters:{},requestUrl:"__unknown__",selectedElement:{selector:false,descriptionSelector:false,downloadLinkSelector:false,lazyload:{event:false},sourceSelector:false,titleSelector:false},slidingArea:{selector:false,overflowHidden:false}};try{this.setMainSelector(z);this.setOptions(A);n()}catch(B){}};var l=function(z,D,A,B){g.getLogger().debug("Binding hover functions.");if(B===true){var C=[];$(z).each(function(){if(b(this).attr("src")===A){C.push(this)}});z=$(C)}$(z).trigger("mouseleave");$(z).unbind("mouseenter").unbind("mouseleave");$(z).hover(function(){var F=b(this);if(typeof D==="string"){if(typeof a.button.lazyload==="object"){var E={original:D,placeholder:F.attr("src")};jQuery.extend(E,a.button.lazyload);$(F).lazyload(E)}else{$(F).attr("src",D)}}},function(){var F=b(this);if(typeof A==="string"){if(typeof a.button.lazyload==="object"){var E={original:A,placeholder:F.attr("src")};jQuery.extend(E,a.button.lazyload);$(F).lazyload(E)}else{$(F).attr("src",A)}}})};var c=function(){if($(k).find(a.elements.selector).length>(q+a.elements.visibleCount)){j()}else{e()}if(q>0){y()}else{t()}};var j=function(){g.getLogger().debug("Creating next button...");var B=a.button.next;var A=p($(k).find(B.selector));if(A.length===0){var z=document.createElement("a");z.href="javascript:void(0);";var D=$(k).find(B.selector).find("img").clone();$(k).find(B.selector).append(z);$(k).find(B.selector).find("img").remove();$(k).find(B.selector).find("a").append(D);if(typeof B.image.active==="string"){if(typeof a.button.lazyload==="object"){var C={original:B.image.active,placeholder:D.attr("src"),success:function(E){l($(k).find(B.selector),B.image.hover,B.image.active)}};jQuery.extend(true,C,a.button.lazyload);$(D).lazyload(C)}else{$(D).attr("src",B.image.active);l($(k).find(B.selector),B.image.hover,B.image.active)}}}};var y=function(){g.getLogger().debug("Creating previous button...");var B=a.button.prev;var A=p($(k).find(B.selector));if(A.length===0){var z=document.createElement("a");z.href="javascript:void(0);";var D=$(k).find(B.selector).find("img").clone();$(k).find(B.selector).append(z);$(k).find(B.selector).find("img").remove();$(k).find(B.selector).find("a").append(D);if(typeof B.image.active==="string"){if(typeof a.button.lazyload==="object"){var C={original:B.image.active,placeholder:D.attr("src"),success:function(E){l($(k).find(B.selector),B.image.hover,B.image.active)}};jQuery.extend(true,C,a.button.lazyload);$(D).lazyload(C)}else{$(D).attr("src",B.image.active);l($(k).find(B.selector),B.image.hover,B.image.active)}}}};var s=function(z){$.get(a.requestUrl,z,function(B){$(k).find(a.slidingArea.selector).replaceWith(B);if(typeof a.elements.lazyload==="object"){var A=b($(k).find(a.slidingArea.selector));g.getLogger().debug("Lazy loading of "+A.length+" images...");A.each(function(){$(this).lazyload(a.elements.lazyload)})}var C=$(k).find(a.elements.selector);if(C.length>0){$(k).find(a.elements.maxCounterSelector).text(C.length);if(a.slidingArea.overflowHidden===false){$(k).find(a.slidingArea.selector).css("width",(C.length*$(C.get(0)).outerWidth())+"px")}$(k).find(a.slidingArea.selector).parent().scrollLeft(0)}n()},"html")};this.getFocusedThumbnail=function(){return d};var b=function(z){var B=[];var A=new RegExp("^img$","i");$(z).each(function(C,D){if(typeof D==="object"&&A.test(D.tagName)){B.push(D)}});if(B.length>0){return $(B)}return $(z).find("img")};var p=function(z){var B=[];var A=new RegExp("^a$","i");$(z).each(function(C,D){if(typeof D==="object"&&A.test(D.tagName)){B.push(D)}});if(B.length>0){return $(B)}return $(z).find("a")};this.getMainSelector=function(){return k};this.getOptions=function(){return a};this.onEventAdjustPosition=function(A,B){g.getLogger().debug('Event "'+A.type+'" triggered, adjusting position of thumbnails.');var C=$(k).find(a.elements.selector).find("a").index(this);g.getLogger().debug('Thumbnail "'+C+'" is selected.');if(d!=C){var E=d;if(C-d>=a.elements.visibleCount||E>C){d=C;E=C;g.getLogger().debug('Setting index number to "'+C+'".');u(C)}var D=$(k).find(a.elements.selector);E=(E>D.length-a.elements.visibleCount)?D.length-a.elements.visibleCount:E;var z=(E*$(D.get(0)).outerWidth());g.getLogger().debug('Thumbnail position "'+E+'" multiply with "'+$(D.get(0)).outerWidth()+'".');$(k).find(a.slidingArea.selector).parent().scrollLeft(z)}return false};this.onEventInit=function(z,A){g.getLogger().debug("Initializing picture gallery component...");s(a.requestParameters);l($(k).find(a.button.next.selector),a.button.next.image.hover,a.button.next.image.active,true);l($(k).find(a.button.prev.selector),a.button.prev.image.hover,a.button.prev.image.active,true);return false};this.onEventSelectThumbnail=function(A){var z=$(k).find(a.elements.selector).index(this);g.getLogger().debug('Event "'+A.type+'" triggered, selecting thumbnail with index "'+z+'".');m(z);return false};var e=function(){g.getLogger().debug("Removing next button...");var A=a.button.next;var C=b($(k).find(A.selector));var z=p($(k).find(A.selector));if(z.length>0){z.remove();$(k).find(A.selector).append(C);if(typeof A.image.inactive==="string"){if(typeof a.button.lazyload==="object"){var B={beforeLoad:function(D){$(k).find(A.selector).trigger("mouseleave");$(k).find(A.selector).unbind("mouseenter").unbind("mouseleave")},original:A.image.inactive,placeholder:C.attr("src")};jQuery.extend(B,a.button.lazyload);$(C).lazyload(B)}else{$(k).find(A.selector).trigger("mouseleave");$(k).find(A.selector).unbind("mouseenter").unbind("mouseleave");$(C).attr("src",A.image.inactive)}}}};var t=function(){g.getLogger().debug("Removing previous button...");var A=a.button.prev;var C=b($(k).find(A.selector));var z=p($(k).find(A.selector));if(z.length>0){z.remove();$(k).find(A.selector).append(C);if(typeof A.image.inactive==="string"){if(typeof a.button.lazyload==="object"){var B={beforeLoad:function(D){$(k).find(A.selector).trigger("mouseleave");$(k).find(A.selector).unbind("mouseenter").unbind("mouseleave")},original:A.image.inactive,placeholder:C.attr("src")};jQuery.extend(B,a.button.lazyload);$(C).lazyload(B)}else{$(k).find(A.selector).trigger("mouseleave");$(k).find(A.selector).unbind("mouseenter").unbind("mouseleave");$(C).attr("src",A.image.inactive)}}}};var m=function(E){if(typeof E!=="number"||E<0){g.getLogger().warn("Index to small.");return false}if(typeof a.elements.data==="undefined"||a.elements.data.length<=0){g.getLogger().warn("No pictures defined.");return false}if(typeof a.elements.data[E]!=="undefined"){var D=a.elements.data[E];var C=(typeof D.downloadUrl==="string")?D.downloadUrl:"javascript:void(0)";var H=(typeof D.description==="string")?D.description:"";var F=(typeof D.image==="string")?D.image:"";var z=(typeof D.source==="string")?D.source:"";var G=(typeof D.title==="string")?D.title:"";var B=$(k).find(a.selectedElement.selector);if(typeof a.selectedElement.lazyload==="object"){if(B.attr("src")==a.selectedElement.lazyload.placeholder){g.getLogger().info("Last image could not be load.");B.attr("original","false");B.attr("src","false")}var A={beforeLoad:function(I){$(I).center()},original:F,placeholder:B.attr("src"),success:function(I){$(I).center()}};jQuery.extend(A,a.selectedElement.lazyload);$(B).lazyload(A);B.attr("alt",G)}else{B.attr("alt",G);B.attr("src",F)}$(k).find(a.selectedElement.descriptionSelector).contents().remove();$(k).find(a.selectedElement.descriptionSelector).append(H);$(k).find(a.selectedElement.downloadLinkSelector).attr("href",C);$(k).find(a.selectedElement.sourceSelector).html(z);$(k).find(a.selectedElement.titleSelector).contents().remove();$(k).find(a.selectedElement.titleSelector).append(G);$(k).find(a.elements.indexCounterSelector).text(E+1)}};var u=function(z){if(typeof z!=="number"){throw (new TypeError('Argument "count" isn\'t a number.'))}q=z;c()};this.setMainSelector=function(z){if(typeof z!=="string"){throw (new TypeError('Argument "selector" isn\'t a string.'))}k=z};this.setOptions=function(z){if(typeof z!=="object"){throw (new TypeError('Argument "settings" isn\'t an object.'))}jQuery.extend(true,a,z)};var n=function(){f(a.event)};var f=function(D){if(typeof D!=="object"){throw (new TypeError('Argument "settings" isn\'t an object.'))}g.getLogger().debug("Setup definied events automatically.");var z;var C=[];for(key in D){z=D[key];try{if(typeof z!=="object"){throw (new TypeError("Event configuration isn't an object."))}if(typeof z.handler!=="function"){throw (new TypeError("Event handler isn't a function."))}if(typeof z.eventType!=="string"){throw (new TypeError("Event type isn't a string."))}if(z.selector===undefined){throw (new TypeError("Event selector is undefined."))}g.getLogger().debug('Setup event handler for event "'+key+'" with selector "'+z.selector+'"');if(z.eventType==="ready"&&z.selector===document){g.getLogger().debug('Setup special case "ready".');if(r===false){$(z.selector).ready(z.handler)}r=true}else{g.getLogger().debug('Setup event handler for event "'+key+'" with selector "'+z.selector+'"');var F=(z.data!==undefined)?z.data:{self:g};$(z.selector).unbind(z.eventType,z.handler).bind(z.eventType,F,z.handler)}}catch(E){C.push('Setup event handler for event "'+key+'" failed: '+E)}}if(C.length>0){var B="";for(var A=0;C.length>A;A++){B+=C[A].toString()+"\n"}throw (new com.babiel.application.jsctrl.WrongConfigurationException(B))}};var w=function(C,B){if(typeof B!=="number"){B=a.elements.slidingCount}g.getLogger().debug("Sliding "+B+" thumbnails left... ("+d+")");d=(d-B>0)?d-B:0;g.getLogger().debug("Focused thumbnail: "+d);if(q===0){return false}var D=$(k).find(a.elements.selector);var z=(q>B)?B:q;var A=(z*$(D.get(0)).outerWidth());$(k).find(a.slidingArea.selector).parent().animate({scrollLeft:"-="+A},a.duration,a.easingType);u(q-z);return false};var h=function(D,C){if(typeof C!=="number"){C=a.elements.slidingCount}g.getLogger().debug("Sliding "+C+" thumbnails right...");g.getLogger().debug("Focused thumbnail(begin): "+d);g.getLogger().debug("Hidden thumbnails left: "+q);var E=$(k).find(a.elements.selector);g.getLogger().debug("Sliding... (focusedThumbnail["+d+"] + count["+C+"] > thumbnails.length["+E.length+"] - elements.visibleCount["+a.elements.visibleCount+"]) : "+(d+C>E.length-a.elements.visibleCount));if(d+C>E.length-a.elements.visibleCount){d=E.length-a.elements.visibleCount;g.getLogger().debug("Focused thumbnail(1): "+d);var z=E.length-(q+a.elements.visibleCount);var A=(z>C)?C:z;var B=(A*$(E.get(0)).outerWidth());$(k).find(a.slidingArea.selector).parent().animate({scrollLeft:"+="+B},a.duration,a.easingType);u(d)}else{d=d+C;g.getLogger().debug("Focused thumbnail(2): "+d);if(q+C===E.length){return false}g.getLogger().debug("Hidden thumbnails left: "+q);var z=E.length-(q+C);var A=(z>C)?C:z;var B=(A*$(E.get(0)).outerWidth());$(k).find(a.slidingArea.selector).parent().animate({scrollLeft:"+="+B},a.duration,a.easingType);u(q+A)}return false};this.__construct(v,o);this.constructor()};com.babiel.aa.js.PictureGalleryComponent.prototype=new com.babiel.application.jsctrl.Component();com.babiel.aa.js.PrintComponent=function(e){var d;var b;this.__construct=function(f){d=this;this.setPrintButton(f)};this.getPrintButton=function(){return b};this.setPrintButton=function(f){if(typeof f!=="string"){throw (new TypeError('Argument "selector" isn\'t a string.'))}if(!$(f)){throw (new com.babiel.application.jsctrl.InvalidParameterException('Can not find an HTML element with selector "'+f+'".'))}b=f;a()};var c=function(){window.print()};var a=function(){$(b).attr("href","javascript:void(0)");$(b).click(c)};this.__construct(e);this.constructor()};com.babiel.aa.js.PrintComponent.prototype=new com.babiel.application.jsctrl.Component();com.babiel.aa.js.StartPageTeaserNavigationComponent=function(l){var j;var m;var f;this.__construct=function(n){j=this;window.componentInstance=this;try{m={config:{buttonSelector:".topTeaser li",contentSelector:"div#topThema div.topPic",invisibleClassName:"hidden",activeContentElementSelector:"div#topThema div.topPic:not(.hidden)",fadeOptions:{animationInterval:800},activeFlashPlayerSelector:"#player_TopTeaserVideoBox"}};a(m,n);c()}catch(o){throw (new com.babiel.application.jsctrl.InvalidParameterException(o))}};this.getOptions=function(){return m};var a=function(n,o){if(typeof n!=="object"){throw (new TypeError('Argument "oldOptions" isn\'t an object: '+typeof n))}if(typeof o!=="object"){throw (new TypeError('Argument "newOptions" isn\'t an object: '+typeof o))}jQuery.extend(true,n,o)};var d=function(){var n=$(m.config.activeFlashPlayerSelector);var p=$(n).get(0);if(n==undefined||p==undefined){j.getLogger().debug("couldn't find flash player with selector: "+m.config.activeFlashPlayerSelector);return}var o=$($(n).parents("."+m.config.invisibleClassName)).size();if(o==0){try{p.sendEvent("STOP");j.getLogger().debug("flash player stopped: "+p)}catch(q){j.getLogger().debug("error stopping flash player: "+q)}}else{j.getLogger().debug("flash player is hidden already, stopping unnecessary")}};var c=function(){j.getLogger().debug("setup called");$(m.config.buttonSelector).click(b);var o=$(m.config.buttonSelector);f=new Array($(o).size());var n=0;var p;$(o).each(function(){$(this).find("div a").each(function(){j.getLogger().debug("found a");$(this).attr("href","javascript:void(0)")});if(n==0){p=false}else{p=true}f[n]=new h(n,$(this).html(),p);n++})};function e(n){var o="";for(i=0;i<n.length;i++){if(i!=0){o=o+"\n"}o=o+n[parseInt(i)]}return o}function g(o,n){if(o.getCurIndex()>n.getCurIndex()){return 1}else{if(o.getCurIndex()<n.getCurIndex()){return -1}else{return 0}}}function k(n){for(x in f){if(f[x].getOrigIndex()==n){return f[x]}}}function h(q,t,r){var s=q;var p=q;var o=t;var n=r;this.getOrigIndex=function(){return s};this.setOrigIndex=function(u){s=u};this.getHtml=function(){return o};this.setHtml=function(u){o=u};this.getCurIndex=function(){return p};this.setCurIndex=function(u){p=u};this.isVisible=function(){return n};this.setVisible=function(u){n=u};this.toString=function(){return"[MenuItem - origIndex="+this.getOrigIndex()+", curIndex="+this.getCurIndex()+", isVisible="+this.isVisible()+", html="+this.getHtml()+"]"}}var b=function(){var n=$(this).parent().children();var o=$(n).index($(this));var p=j.switchButton(n,o);d();j.switchContent(p);return false};this.switchButton=function(p,r){var t=$(p).get(r);j.getLogger().debug('Switch button to index "'+r+'".');if(typeof r!=="number"){throw (new TypeError('Argument "index" isn\'t a number'))}var n=$(m.config.contentSelector).index($(m.config.activeContentElementSelector));var s=f[r];var v=k(n);var q=0;var r=parseInt(r);var u=$(m.config.buttonSelector).parent();$(m.config.buttonSelector).remove();j.getLogger().debug("Removed old buttons");var o=s.getCurIndex();s.setCurIndex(v.getCurIndex());v.setCurIndex(o);f.sort(g);j.getLogger().debug("Re-sorted new buttons");$(f).each(function(){if(this.getCurIndex()==s.getCurIndex()){this.setVisible(false)}else{this.setVisible(true)}var w="";if(this.isVisible()==false){w=m.config.invisibleClassName}$("<li>"+this.getHtml()+"</li>").appendTo($(u)).addClass(w)});$(m.config.buttonSelector).click(b);j.getLogger().debug("Re-appended new buttons");return s.getOrigIndex()};this.switchContent=function(o){j.getLogger().debug('Switch content to index "'+o+'".');if(typeof o!=="number"){throw (new TypeError('Argument "index" isn\'t a number'))}var n=0;var p=$(m.config.activeLayerBoxSelector);$(m.config.contentSelector).each(function(){if(n!=o){$(this).addClass(m.config.invisibleClassName)}else{$(this).stop().fadeTo(0,1);$(this).css("display","none");var q=new RegExp("MSIE","i");if(navigator.userAgent.search(q)>-1){$(m.config.inactiveLayerBoxSelector).show()}$(p).hide();$(this).removeClass(m.config.invisibleClassName);$(this).fadeIn(m.config.fadeOptions.animationInterval)}n++})};this.__construct(l);this.constructor()};com.babiel.aa.js.StartPageTeaserNavigationComponent.prototype=new com.babiel.application.jsctrl.JQueryComponent();this.componentInstance=undefined;function playEventHandler(){var a=componentInstance.getOptions().config.activeLayerBoxSelector;$(a).hide()}function playerReady(b){var c=document.getElementById(b.id);c.addControllerListener("play","playEventHandler");var a=$(componentInstance.getOptions().config.activeFlashPlayerSelector).attr("id");if(a==b.id){var d=componentInstance.getOptions().config.activeLayerBoxSelector;$(d).show()}}com.babiel.aa.js.SWFObjectComponent=function(a){var e;var d;var c;this.__construct=function(f){e=this;d=false;c={event:{init:{data:{},handler:e.onEventInit,eventType:"ready",selector:document}},content:{flash:{flashvars:{},height:360,params:{},swf:"test_flashvars.swf",id:"player_TopTeaserVideoBox",title:"",width:480},selector:false,noFlashMsg:"no Flashplayer found"}};try{this.setOptions(f);e.setup()}catch(g){throw (new com.babiel.application.jsctrl.InvalidParameterException(g))}};this.getOptions=function(){return c};this.onEventInit=function(g){var f=jQuery.fn.flash().getVersion();if(f.major>0){e.getLogger().debug("Initializing SWFObject...");$(c.content.selector).contents().remove();$(c.content.selector).flash(c.content.flash);$(c.content.objectTagSelector).attr("title",c.content.flash.title)}else{$(c.content.selector).html(c.content.noFlashMsg);e.getLogger().warn("Can not find flash player.")}return false};this.setOptions=function(f){if(typeof f!=="object"){throw (new TypeError('Argument "settings" isn\'t an object.'))}jQuery.extend(true,c,f)};this.setup=function(){b(c.event)};var b=function(l){if(typeof l!=="object"){throw (new TypeError('Argument "settings" isn\'t an object.'))}e.getLogger().debug("Setup definied events automatically.");var f;var k=[];for(key in l){f=l[key];try{if(typeof f!=="object"){throw (new TypeError("Event configuration isn't an object."))}if(typeof f.handler!=="function"){throw (new TypeError("Event handler isn't a function."))}if(typeof f.eventType!=="string"){throw (new TypeError("Event type isn't a string."))}if(f.selector===undefined){throw (new TypeError("Event selector is undefined."))}e.getLogger().debug('Setup event handler for event "'+key+'" with selector "'+f.selector+'"');if(f.eventType==="ready"&&f.selector===document){e.getLogger().debug('Setup special case "ready".');if(d===false){$(f.selector).ready(f.handler)}d=true}else{e.getLogger().debug('Setup event handler for event "'+key+'" with selector "'+f.selector+'"');var n=(f.data!==undefined)?f.data:{self:e};$(f.selector).unbind(f.eventType,f.handler).bind(f.eventType,n,f.handler)}}catch(m){k.push('Setup event handler for event "'+key+'" failed: '+m)}}if(k.length>0){var h="";for(var g=0;k.length>g;g++){h+=k[g].toString()+"\n"}throw (new com.babiel.application.jsctrl.WrongConfigurationException(h))}};this.__construct(a);this.constructor()};com.babiel.aa.js.SWFObjectComponent.prototype=new com.babiel.application.jsctrl.Component();com.babiel.aa.js.BoxResizerComponent=function(h){var e;var f;var j;var g=false;this.__construct=function(k){e=this;j={event:{init:{data:{self:e},handler:e.onEventInit,eventType:"ready",selector:document}},content:{tempBoxId:"tempDiv",boxTextSelector:".layerBox .layerText",layerSelector:".layerBox .layer",classesToRemove:[],tempBoxAppendTo:"body",extraSpace:"1",extraBottomMargin:"0"}};requestLocked=false;try{this.setOptions(k);e.setup()}catch(l){throw (new com.babiel.application.jsctrl.InvalidParameterException(l))}};this.getOptions=function(){return j};this.getEmHeight=function(){var l=$("<div style='height: 1em'>&nbsp;</div>").appendTo("body");var k=l.height();l.remove();return k};var b=function(){e.getLogger().debug("getBoxesHeight");var k=[];$(j.content.boxTextSelector).each(function(m){var l=$(this).clone();l.css({height:"inherit"});for(var n=0;n<j.content.classesToRemove.length;n++){l.removeClass(j.content.classesToRemove[n])}$(l).appendTo(g);e.getLogger().debug("Index "+m+" hat Groesse: "+l.height());k.push(l.height())});g.remove();return k};var a=function(n){var l=e.getEmHeight();for(var k=0;k<n.length;k++){n[k]=parseInt(n[k])/l}var m=j.content.extraSpace;$(j.content.layerSelector).each(function(o){for(var p=0;p<j.content.classesToRemove.length;p++){$(this).removeClass(j.content.classesToRemove[p])}$(this).css({height:parseFloat(n[o]+parseFloat(m))+"em","margin-top":"-"+(parseFloat(n[o]+parseFloat(m))+parseFloat(j.content.extraBottomMargin))+"em"})});$(j.content.boxTextSelector).each(function(o){for(var p=0;p<j.content.classesToRemove.length;p++){$(this).removeClass(j.content.classesToRemove[p])}$(this).css({height:parseFloat(n[o]+parseFloat(m))+"em","margin-top":"-"+(parseFloat(n[o]+parseFloat(m))+parseFloat(j.content.extraBottomMargin))+"em"})})};var c=function(){e.getLogger().debug("appendTempBox");var k=$("<div id='"+j.content.tempBoxId+"' style='position: absolute; left: -2000px;'></div>");k.appendTo(j.content.tempBoxAppendTo);return k};this.onEventInit=function(){e.getLogger().debug("onEventInit");g=c();var k=b();a(k)};this.setOptions=function(k){if(typeof k!=="object"){throw (new TypeError('Argument "settings" isn\'t an object.'))}jQuery.extend(true,j,k)};this.setup=function(){d(j.event)};var d=function(o){if(typeof o!=="object"){throw (new TypeError('Argument "settings" isn\'t an object.'))}e.getLogger().debug("Setup definied events automatically.");var k;var n=[];for(key in o){k=o[key];try{if(typeof k!=="object"){throw (new TypeError("Event configuration isn't an object."))}if(typeof k.handler!=="function"){throw (new TypeError("Event handler isn't a function."))}if(typeof k.eventType!=="string"){throw (new TypeError("Event type isn't a string."))}if(k.selector===undefined){throw (new TypeError("Event selector is undefined."))}e.getLogger().debug('Setup event handler for event "'+key+'" with selector "'+k.selector+'"');if(k.eventType==="ready"&&k.selector===document){e.getLogger().debug('Setup special case "ready".');if(jQuery.isReady){k.handler()}else{$(k.selector).ready(k.handler)}}else{e.getLogger().debug('Setup event handler for event "'+key+'" with selector "'+k.selector+'"');var q=(k.data!==undefined)?k.data:{self:e};$(k.selector).unbind(k.eventType,k.handler).bind(k.eventType,q,k.handler)}}catch(p){n.push('Setup event handler for event "'+key+'" failed: '+p)}}if(n.length>0){var m="";for(var l=0;n.length>l;l++){m+=n[l].toString()+"\n"}throw (new com.babiel.application.jsctrl.WrongConfigurationException(m))}};this.__construct(h);this.constructor()};com.babiel.aa.js.BoxResizerComponent.prototype=new com.babiel.application.jsctrl.Component();
