
jQuery('html').addClass('js');FRANKE={};FRANKE.Globals={};FRANKE.Globals.HeaderHeight=function(){if(jQuery('#header').length===1){return jQuery("#header").height();}else{return 0;}};FRANKE.Factory=function(){var _createActivitySelector=function(id,height){var o=new FRANKE.Navigation.ActivitySelector(id,height);return o;},_createContinent=function(id,height){var o=new FRANKE.Navigation.Continent(id,height);return o;},_createCountry=function(id,height){var o=new FRANKE.Navigation.Country(id,height);return o;};return{createActivitySelector:_createActivitySelector,createContinent:_createContinent,createCountry:_createCountry};}();FRANKE.Navigation={};FRANKE.Navigation.ActivitySelector=function(id,height){this.id=id;this.height=height;this.continents={};this.continentsContainerHeight=0;this.top=0;};FRANKE.Navigation.ActivitySelector.prototype={constructor:FRANKE.Navigation.ActivitySelector,addContinent:function(continent,key){this.continents[key]=continent;},calculateContinentsContainerHeight:function(){for(var i in this.continents){this.continentsContainerHeight+=this.continents[i].height;}}};FRANKE.Navigation.Continent=function(id,height){this.id=id;this.height=height;this.countries={};this.countryId=[];this.countriesLength=0;this.countriesContainerHeight=0;this.yDistanceToFirstContinent=0;};FRANKE.Navigation.Continent.prototype={constructor:FRANKE.Navigation.Continent,addCountry:function(country,key){this.countries[key]=country;},calculateCountryContainerHeight:function(){var k=0,i='';for(i in this.countries){this.countryId.push(i);this.countriesContainerHeight+=this.countries[i].height;++k;}
this.countriesLength=k;},getCountryById:function(id){return this.countries[this.countryId[id]];},getCountryNameById:function(id){return this.countryId[id];}};FRANKE.Navigation.Country=function(id,height){this.id=id;this.height=height;};FRANKE.Navigation.Country.prototype={constructor:FRANKE.Navigation.Country};function changeImage(element2open){if(typeof image_paths!="undefined"){jQuery("div#eyeCatcher img").attr({src:image_paths[0][jQuery(element2open).attr("id")],alt:"",width:"980",height:"480"});}}
FRANKE.Navigation.centerCountryList=function(continentLink){jQuery('ul.country li').hide();var continentList=null,countryList=null,countries=null,activityId=null,continentId=null,continentListPaddingTop=0,yDistanceToFirstContinent=0,selectedContinentYOffset=0,centeredCountryList=0,countryIdToAlignBy=0;continentList=continentLink.parent('li').parent('ul');activityId=continentList.parent('li').attr('id');continentId=continentLink.text();countryList=continentLink.siblings("ul");countries=countryList.children('li');continentListPaddingTop=parseInt(continentList.css('paddingTop'),10);yDistanceToFirstContinent=FRANKE.Navigation.instance[activityId].continents[continentId].yDistanceToFirstContinent;selectedContinentYOffset=yDistanceToFirstContinent+continentListPaddingTop;countryIdToAlignBy=Math.ceil(FRANKE.Navigation.instance[activityId].continents[continentId].countriesLength/2)-1;centeredCountryList=FRANKE.Navigation.instance[activityId].continents[continentId].getCountryById(countryIdToAlignBy).yDistanceToFirstCountry;if(selectedContinentYOffset<=centeredCountryList){countryList.show();countries.fadeIn("slow");return true;}
new_padding_top=selectedContinentYOffset-centeredCountryList;min_height=parseInt(countryList.css("min-height"),10);padding_top=parseInt(countryList.css("padding-top"),10);totalHeight=min_height+padding_top;new_min_height=totalHeight-new_padding_top;countryList.css({'padding-top':new_padding_top+'px','min-height':new_min_height+'px'});countryList.show();countries.fadeIn("slow");}
FRANKE.Navigation.centerContinentList=function(element2open,selected_activity){var defaultContinentOffsetTop=0,openActivityOffsetTop=selected_activity,continent_list=element2open.children("ul"),activityId=element2open.attr('id'),min_height=0,padding_top=0,new_min_height=0,new_padding_top=0,totalHeight=0,defaultLi=null,defaultLiText='',yDistanceToFirstContinent=0,centeredContinent=0;defaultLi=continent_list.children('li.default');defaultLiText=defaultLi.children('a').text();if(defaultLi.length>0){defaultContinentOffsetTop=defaultLi.position().top;}
if(typeof FRANKE.Navigation.instance[activityId].continents[defaultLiText]==='undefined'){return false;}
yDistanceToFirstContinent=FRANKE.Navigation.instance[activityId].continents[defaultLiText].yDistanceToFirstContinent;centeredContinent=Math.ceil((FRANKE.Navigation.instance[activityId].height-FRANKE.Navigation.instance[activityId].continents[defaultLiText].height)/2);new_padding_top=openActivityOffsetTop-yDistanceToFirstContinent+centeredContinent;min_height=parseInt(continent_list.css("min-height"),10);padding_top=parseInt(continent_list.css("padding-top"),10);totalHeight=min_height+padding_top;new_min_height=totalHeight-new_padding_top;continent_list.css({'padding-top':new_padding_top+'px',"min-height":new_min_height+'px'});continent_list.children("li").hide().fadeIn("slow");FRANKE.Navigation.centerCountryList(defaultLi.children("a"));}
FRANKE.Navigation.Cache={};FRANKE.Navigation.open=function(selectedElement){selectedElement.removeClass("closed").addClass("open").show().children('a').addClass("highlight");selectedElement.children("div.activityDescription").show();}
FRANKE.Navigation.close=function(){FRANKE.Navigation.Cache.Links.removeClass("highlight");FRANKE.Navigation.Cache.activitiesSelectorItems.removeClass("open").addClass("closed");FRANKE.Navigation.Cache.activitiesSelectorDefaulElement.addClass("open").removeClass("closed").children('a').addClass("highlight");FRANKE.Navigation.Cache.activitiesDescription.hide();}
FRANKE.Navigation.instance={};FRANKE.Navigation.timer=0;FRANKE.ActivitiesDropdown=function(){var dom=null,init=null,createBindings=null,getState=null,hideDropdown=null,isOpen=null,toggleDropdown=null;isOpen=function(){return dom.children('ul').hasClass('show');};toggleDropdown=function(){if(isOpen()){hideDropdown();}else{showDropdown();}};hideDropdown=function(){dom.children('ul').removeClass('show');};showDropdown=function(){dom.children('ul').addClass('show');};createBindings=function(){dom.children('span').children('a').click(function(){toggleDropdown();});jQuery().click(function(e){if(jQuery(e.target).parents('div#activitiesDropDown').length===0){hideDropdown();}});dom.mouseover(function(e){e.stopPropagation();});};init=function(){jQuery("div#activitiesDropDown span").show();dom=jQuery('div#activitiesDropDown');createBindings();};return{init:init};}();FRANKE.Navigation.init=function(){if(jQuery("ul#activitiesSelector").length>0){var liHeight=0,continentObj=null,yDistanceToFirstContinent=0,yDistanceToFirstCountry=0,activitySelectorObj=null,countryObj=null,openLiIndex=-1;jQuery('ul#activitiesSelector > li').each(function(i){if(jQuery(this).hasClass('open')){openLiIndex=i;}
jQuery(this).removeClass('closed').addClass('open');activitySelectorObj=FRANKE.Factory.createActivitySelector(jQuery(this).attr('id'),jQuery(this).height());jQuery(this).children('ul.continent').addClass('heightMeasure').children('li').each(function(i){liHeight=jQuery(this).removeClass('open').height();continentObj=FRANKE.Factory.createContinent(i,liHeight);continentObj.yDistanceToFirstContinent=yDistanceToFirstContinent;activitySelectorObj.addContinent(continentObj,jQuery(this).children('a').text());yDistanceToFirstContinent+=liHeight;jQuery(this).children('ul.country').show().children('li').each(function(i){liHeight=jQuery(this).removeClass('open').height();countryObj=FRANKE.Factory.createCountry(i,liHeight);countryObj.yDistanceToFirstCountry=yDistanceToFirstCountry;continentObj.addCountry(countryObj,jQuery(this).children('a').text());yDistanceToFirstCountry+=liHeight;});continentObj.calculateCountryContainerHeight();jQuery(this).children('ul.country').hide();yDistanceToFirstCountry=0;});activitySelectorObj.calculateContinentsContainerHeight();activitySelectorObj.top=jQuery(this).offset().top-FRANKE.Globals.HeaderHeight();jQuery(this).children('ul.continent').removeClass('heightMeasure');if(jQuery('ul#activitiesSelector > li').index(jQuery(this))!==openLiIndex){jQuery(this).removeClass('open').addClass('closed');}
yDistanceToFirstContinent=0;FRANKE.Navigation.instance[activitySelectorObj.id]=activitySelectorObj;});}};jQuery(document).ready(function(){FRANKE.Navigation.Cache.activitiesSelector=jQuery('ul#activitiesSelector');FRANKE.Navigation.Cache.Links=jQuery("ul#activitiesSelector li a");FRANKE.Navigation.Cache.activitiesSelectorItems=jQuery("ul#activitiesSelector li");FRANKE.Navigation.Cache.activitiesSelectorDefaulElement=jQuery("ul#activitiesSelector li.default");FRANKE.Navigation.Cache.activitiesDescription=jQuery("div.activityDescription");var firstcall=1,element2open=null,selected_activity=0,is_division_page=false;if(jQuery("body").hasClass("division")){is_division_page=true;}
if(jQuery('.centerColumn.sortable').length>0){jQuery(".centerColumn.sortable").tablesorter();}
FRANKE.Navigation.init();if(is_division_page&&jQuery("ul#activitiesSelector").children("li.open").length===1){element2open=jQuery("ul#activitiesSelector").children("li.open");selected_activity=FRANKE.Navigation.instance[element2open.attr('id')].top;FRANKE.Navigation.centerContinentList(element2open,selected_activity);}
FRANKE.Navigation.mOver=function(element2open){changeImage(element2open);jQuery("div#activitiesSelectorWrapper").removeClass("noSelect");jQuery("div#activitiesSelectorWrapper > div.activityDescription").hide();if(!jQuery(element2open).hasClass("open")){if(firstcall===0){FRANKE.Navigation.close();}
else{firstcall=0;}
FRANKE.Navigation.open(element2open);FRANKE.Navigation.centerContinentList(element2open,selected_activity);}}
jQuery("ul#activitiesSelector li a").focus(function(){if(!is_division_page){if(jQuery(this).siblings("ul.continent").length==1){var element2open=jQuery(this).parent("li");if(typeof image_paths!="undefined"){jQuery("div#eyeCatcher img").attr({src:image_paths[0][jQuery(element2open).attr("id")],alt:"",width:"980",height:"480"});}
jQuery("div#activitiesSelectorWrapper").removeClass("noSelect");jQuery("div#activitiesSelectorWrapper > div.activityDescription").hide();if(!jQuery(element2open).hasClass("open")){if(firstcall===0){FRANKE.Navigation.close();}
else{firstcall=0;}
FRANKE.Navigation.open(element2open);}}}});jQuery("ul.continent a").mouseover(function(){if(jQuery(this).siblings("ul").length===1){jQuery("ul#activitiesSelector ul a.highlight").removeClass("highlight").parent("li").addClass("closed").removeClass("open");jQuery(this).addClass("highlight").parent("li").addClass("open").removeClass("closed");jQuery('ul.country').hide();FRANKE.Navigation.centerCountryList(jQuery(this));}
return false;});jQuery('ul#activitiesSelector').children('li').children('a').hover(function(){if(!is_division_page){var element2open=jQuery(this).parent('li');selected_activity=FRANKE.Navigation.instance[element2open.attr('id')].top;FRANKE.Navigation.timer=setTimeout(function(){FRANKE.Navigation.mOver(element2open);},150);}},function(){clearTimeout(FRANKE.Navigation.timer);});FRANKE.ActivitiesDropdown.init();if(typeof(CQ)!="undefined"){CQ.Ext.onLoad(function(){addOverlayToComponents();});}});var addOverlayToComponents=function(){var overlay=$('<div class="overlay-x">&nbsp;</div>'),oWidth='',oHeight='',titleSelector='.contentElement .download';oWidth=parseInt($(titleSelector).width(),10)+'px';oHeight=parseInt($(titleSelector).height(),10)+'px';$(titleSelector).append(overlay);$(titleSelector).css({'position':'relative'});$(titleSelector+' .overlay-x').css({'position':'absolute','z-index':'14999','top':0,'left':0,'width':oWidth,'height':oHeight,'background':'url(/img/blank.gif)'});};