//Devloader

(function(){
	window.apertoDevmode = false;
	window.devModuleList = {
		"__basic-behaviour": ["ui.core", "swfobject", "locations", "moduleloader", "setUnset", "lang", "imgpreload", "photo-gallery", "starter"], "_lightbox-behaviour": ["shadowbox-jquery", "shadowbox", "shadowbox-starter"], "_map-behaviour": ["mousewheel", "jScrollPane", "map"], "_coffeeconfig-behaviour": ["ui.draggable", "ui.droppable", "effects.core", "jquery.usermode", "coffe-config"]
	};
	
	var basicScript = ["__basic-behaviour"], srcMatch = /(.*)__basic-behaviour\.js$/;

	function loadModul(path){
		for(var j = 0, leng = basicScript.length; j < leng; j++){
			document.write('<script type="text/javascript" src="'+path+basicScript[j]+'.js"><\/script>');
		}
	}
	
	var querys = location.search, 
		hash = location.hash;
	if(hash === '#dev'){
		basicScript = devModuleList[basicScript];
		window.apertoDevmode = true;
	} else {
		querys = querys.replace(/^\?/,'').split(/&|=/);
		for(var i = 0, len = querys.length; i < len; i++){
			if(querys[i] == 'dev'){
				basicScript = devModuleList[basicScript];
				window.apertoDevmode = true;
				break;
			}
		}
	}
	if(apertoDevmode){
		var scripts = document.getElementsByTagName('script'),
			src,
			path;
		for(var i = 0, len = scripts.length; i < len; i++){
			src = scripts[i].getAttribute('src');
			if(src){
				path = srcMatch.exec(src);
				if(path && path[0] && path[1]){
					loadModul(path[1]);
				}
			}
			
		}
	}
})();

if(!apertoDevmode){
	



//ui.core
;;(function($){$.ui={plugin:{add:function(module,option,set){var proto=$.ui[module].prototype;for(var i in set){proto.plugins[i]=proto.plugins[i]||[];proto.plugins[i].push([option,set[i]])}},call:function(instance,name,args){var set=instance.plugins[name];if(!set){return}for(var i=0;i<set.length;i++){if(instance.options[set[i][0]]){set[i][1].apply(instance.element,args)}}}},cssCache:{},css:function(name){if($.ui.cssCache[name]){return $.ui.cssCache[name]}var tmp=$('<div class="ui-gen">').addClass(name).css({position:'absolute',top:'-5000px',left:'-5000px',display:'block'}).appendTo('body');$.ui.cssCache[name]=!!((!(/auto|default/).test(tmp.css('cursor'))||(/^[1-9]/).test(tmp.css('height'))||(/^[1-9]/).test(tmp.css('width'))||!(/none/).test(tmp.css('backgroundImage'))||!(/transparent|rgba\(0, 0, 0, 0\)/).test(tmp.css('backgroundColor'))));try{$('body').get(0).removeChild(tmp.get(0))}catch(e){}return $.ui.cssCache[name]},disableSelection:function(el){$(el).attr('unselectable','on').css('MozUserSelect','none')},enableSelection:function(el){$(el).attr('unselectable','off').css('MozUserSelect','')},hasScroll:function(e,a){var scroll=/top/.test(a||"top")?'scrollTop':'scrollLeft',has=false;if(e[scroll]>0)return true;e[scroll]=1;has=e[scroll]>0?true:false;e[scroll]=0;return has}};var _remove=$.fn.remove;$.fn.remove=function(){$("*",this).add(this).triggerHandler("remove");return _remove.apply(this,arguments)};function getter(namespace,plugin,method){var methods=$[namespace][plugin].getter||[];methods=(typeof methods=="string"?methods.split(/,?\s+/):methods);return($.inArray(method,methods)!=-1)}$.widget=function(name,prototype){var namespace=name.split(".")[0];name=name.split(".")[1];$.fn[name]=function(options){var isMethodCall=(typeof options=='string'),args=Array.prototype.slice.call(arguments,1);if(isMethodCall&&getter(namespace,name,options)){var instance=$.data(this[0],name);return(instance?instance[options].apply(instance,args):undefined)}return this.each(function(){var instance=$.data(this,name);if(isMethodCall&&instance&&$.isFunction(instance[options])){instance[options].apply(instance,args)}else if(!isMethodCall){$.data(this,name,new $[namespace][name](this,options))}})};$[namespace][name]=function(element,options){var self=this;this.widgetName=name;this.widgetBaseClass=namespace+'-'+name;this.options=$.extend({},$.widget.defaults,$[namespace][name].defaults,options);this.element=$(element).bind('setData.'+name,function(e,key,value){return self.setData(key,value)}).bind('getData.'+name,function(e,key){return self.getData(key)}).bind('remove',function(){return self.destroy()});this.init()};$[namespace][name].prototype=$.extend({},$.widget.prototype,prototype)};$.widget.prototype={init:function(){},destroy:function(){this.element.removeData(this.widgetName)},getData:function(key){return this.options[key]},setData:function(key,value){this.options[key]=value;if(key=='disabled'){this.element[value?'addClass':'removeClass'](this.widgetBaseClass+'-disabled')}},enable:function(){this.setData('disabled',false)},disable:function(){this.setData('disabled',true)}};$.widget.defaults={disabled:false};$.ui.mouse={mouseInit:function(){var self=this;this.element.bind('mousedown.'+this.widgetName,function(e){return self.mouseDown(e)});if($.browser.msie){this._mouseUnselectable=this.element.attr('unselectable');this.element.attr('unselectable','on')}this.started=false},mouseDestroy:function(){this.element.unbind('.'+this.widgetName);($.browser.msie&&this.element.attr('unselectable',this._mouseUnselectable))},mouseDown:function(e){(this._mouseStarted&&this.mouseUp(e));this._mouseDownEvent=e;var self=this,btnIsLeft=(e.which==1),elIsCancel=(typeof this.options.cancel=="string"?$(e.target).parents().add(e.target).filter(this.options.cancel).length:false);if(!btnIsLeft||elIsCancel||!this.mouseCapture(e)){return true}this._mouseDelayMet=!this.options.delay;if(!this._mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){self._mouseDelayMet=true},this.options.delay)}if(this.mouseDistanceMet(e)&&this.mouseDelayMet(e)){this._mouseStarted=(this.mouseStart(e)!==false);if(!this._mouseStarted){e.preventDefault();return true}}this._mouseMoveDelegate=function(e){return self.mouseMove(e)};this._mouseUpDelegate=function(e){return self.mouseUp(e)};$(document).bind('mousemove.'+this.widgetName,this._mouseMoveDelegate).bind('mouseup.'+this.widgetName,this._mouseUpDelegate);return false},mouseMove:function(e){if($.browser.msie&&!e.button){return this.mouseUp(e)}if(this._mouseStarted){this.mouseDrag(e);return false}if(this.mouseDistanceMet(e)&&this.mouseDelayMet(e)){this._mouseStarted=(this.mouseStart(this._mouseDownEvent,e)!==false);(this._mouseStarted?this.mouseDrag(e):this.mouseUp(e))}return!this._mouseStarted},mouseUp:function(e){$(document).unbind('mousemove.'+this.widgetName,this._mouseMoveDelegate).unbind('mouseup.'+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this.mouseStop(e)}return false},mouseDistanceMet:function(e){return(Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance)},mouseDelayMet:function(e){return this._mouseDelayMet},mouseStart:function(e){},mouseDrag:function(e){},mouseStop:function(e){},mouseCapture:function(e){return true}};$.ui.mouse.defaults={cancel:null,distance:1,delay:0}})(jQuery);;

//swfobject
;if(typeof deconcept=="undefined")var deconcept={};if(typeof deconcept.util=="undefined")deconcept.util={};if(typeof deconcept.SWFObjectUtil=="undefined")deconcept.SWFObjectUtil={};deconcept.SWFObject=function(swf,id,w,h,ver,c,quality,xiRedirectUrl,redirectUrl,detectKey){if(!document.getElementById){return}this.DETECT_KEY=detectKey?detectKey:'detectflash';this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params={};this.variables={};this.attributes=[];if(swf){this.setAttribute('swf',swf)}if(id){this.setAttribute('id',id)}if(w){this.setAttribute('width',w)}if(h){this.setAttribute('height',h)}if(ver){this.setAttribute('version',new deconcept.PlayerVersion(ver.toString().split(".")))}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs)};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true}}if(c){this.addParam('bgcolor',c)}var q=quality?quality:'high';this.addParam('quality',q);this.setAttribute('useExpressInstall',false);this.setAttribute('doExpressInstall',false);var xir=(xiRedirectUrl)?xiRedirectUrl:window.location;this.setAttribute('xiRedirectUrl',xir);this.setAttribute('redirectUrl','');if(redirectUrl){this.setAttribute('redirectUrl',redirectUrl)}};deconcept.SWFObject.prototype={useExpressInstall:function(path){this.xiSWFPath=!path?"expressinstall.swf":path;this.setAttribute('useExpressInstall',true)},setAttribute:function(name,value){this.attributes[name]=value},getAttribute:function(name){return this.attributes[name]||""},addParam:function(name,value){this.params[name]=value},getParams:function(){return this.params},addVariable:function(name,value){this.variables[name]=value},getVariable:function(name){return this.variables[name]||""},getVariables:function(){return this.variables},getVariablePairs:function(){var variablePairs=[];var key;var variables=this.getVariables();for(key in variables){variablePairs[variablePairs.length]=key+"="+variables[key]}return variablePairs},getSWFHTML:function(){var swfNode="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute('swf',this.xiSWFPath)}swfNode='<embed type="application/x-shockwave-flash" src="'+this.getAttribute('swf')+'" width="'+this.getAttribute('width')+'" height="'+this.getAttribute('height')+'" style="'+(this.getAttribute('style')||"")+'"';swfNode+=' id="'+this.getAttribute('id')+'" name="'+this.getAttribute('id')+'" ';var params=this.getParams();for(var key in params){swfNode+=[key]+'="'+params[key]+'" '}var pairs=this.getVariablePairs().join("&");if(pairs.length>0){swfNode+='flashvars="'+pairs+'"'}swfNode+='/>'}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute('swf',this.xiSWFPath)}swfNode='<object id="'+this.getAttribute('id')+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+this.getAttribute('width')+'" height="'+this.getAttribute('height')+'" style="'+(this.getAttribute('style')||"")+'">';swfNode+='<param name="movie" value="'+this.getAttribute('swf')+'" />';var params=this.getParams();for(var key in params){swfNode+='<param name="'+key+'" value="'+params[key]+'" />'}var pairs=this.getVariablePairs().join("&");if(pairs.length>0){swfNode+='<param name="flashvars" value="'+pairs+'" />'}swfNode+="</object>"}return swfNode},write:function(elementId){if(this.getAttribute('useExpressInstall')){var expressInstallReqVer=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(expressInstallReqVer)&&!this.installedVer.versionIsValid(this.getAttribute('version'))){this.setAttribute('doExpressInstall',true);this.addVariable("MMredirectURL",escape(this.getAttribute('xiRedirectUrl')));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title)}}if(this.skipDetect||this.getAttribute('doExpressInstall')||this.installedVer.versionIsValid(this.getAttribute('version'))){var n=(typeof elementId=='string')?document.getElementById(elementId):elementId;n.innerHTML=this.getSWFHTML();return true}else{if(this.getAttribute('redirectUrl')!=""){document.location.replace(this.getAttribute('redirectUrl'))}}return false}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var PlayerVersion=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){PlayerVersion=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."))}}else if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var counter=3;while(axo){try{counter++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+counter);PlayerVersion=new deconcept.PlayerVersion([counter,0,0])}catch(e){axo=null}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");PlayerVersion=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always"}catch(e){if(PlayerVersion.major==6){return PlayerVersion}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(e){}}if(axo!=null){PlayerVersion=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","))}}return PlayerVersion};deconcept.PlayerVersion=function(arrVersion){this.major=arrVersion[0]!=null?parseInt(arrVersion[0]):0;this.minor=arrVersion[1]!=null?parseInt(arrVersion[1]):0;this.rev=arrVersion[2]!=null?parseInt(arrVersion[2]):0};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major)return false;if(this.major>fv.major)return true;if(this.minor<fv.minor)return false;if(this.minor>fv.minor)return true;if(this.rev<fv.rev)return false;return true};deconcept.util={getRequestParameter:function(param){var q=document.location.search||document.location.hash;if(param==null){return q}if(q){var pairs=q.substring(1).split("&");for(var i=0;i<pairs.length;i++){if(pairs[i].substring(0,pairs[i].indexOf("="))==param){return pairs[i].substring((pairs[i].indexOf("=")+1))}}}return""}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var objects=document.getElementsByTagName("OBJECT");for(var i=objects.length-1;i>=0;i--){objects[i].style.display='none';for(var x in objects[i]){if(typeof objects[i][x]=='function'){objects[i][x]=function(){}}}}};if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id]}}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;;

//locations
;(function($){$.location=(function(){var querys={},paths={},triedXtimes=0,tryXtimes=10;function createPathRelativeTo(relPath,basePath,pathName){var relParts=relPath.split('../'),baseParts=basePath.split('/'),path;if(relPath.match(/\.\.\/$/)){relParts.pop()}else if(relPath.match(/\/$/)){relParts[relParts.length-1]=relParts[relParts.length-1].replace(/\/$/,'')}if(relParts[relParts.length-1].match(/\.\.\/$/)){relParts.pop()}if(!baseParts[baseParts.length-1]){baseParts.pop()}$.each(relParts,function(i,part){if(!part){baseParts.pop()}else{baseParts.push(part)}});path=baseParts.join('/');if(path){path+='/'}if(pathName&&!paths[pathName]){paths[pathName]=path}else if(pathName&&paths[pathName]){throw'Pathname "'+pathName+'" already exists. Try another name for your path!';}return path}function createPaths(jsName,opts){var src=$('script[src*='+jsName+']').attr('src'),pathMatch;opts=$.extend({relativeCSS:'../css/',relativeImg:'../img/',relativeBase:'../'},opts);if(src){pathMatch=new RegExp('(\.*)'+jsName);paths.js=pathMatch.exec(src);paths.js=(paths.js&&paths.js[0]&&(paths.js[1]||paths.js[1]===''))?paths.js[1]:null}if(triedXtimes<tryXtimes&&(!paths.js&&paths.js!=='')){triedXtimes++;if(triedXtimes<tryXtimes-1){setTimeout(function(){createPaths(jsName,opts)},2)}else{$(function(){createPaths(jsName,opts)})}}else if(paths.js||paths.js===''){createPathRelativeTo(opts.relativeBase,paths.js,'base');createPathRelativeTo(opts.relativeCSS,paths.js,'css');createPathRelativeTo(opts.relativeImg,paths.js,'img')}else{throw'Could not determine the paths! Are you sure that you entered the correct name of the JS-file? ("'+jsName+'")';}return paths}function issetQuery(name){return(querys[name]||querys[name]==='')}function strToObj(str,obj){if(!str||!obj){str=location.search;obj=querys}str=str.replace(/^\?/,'').split(/&/);$.each(str,function(i,param){queryPair=param.split(/\=/);obj[queryPair[0]]=(queryPair[1])?queryPair[1]:''});return obj}strToObj();return{querys:querys,issetQuery:issetQuery,createPaths:createPaths,createPathRelativeTo:createPathRelativeTo,paths:paths}})()})(jQuery);;

//moduleloader
;(function($){$.moduleLoader=(function(){var lazyList=[],requireList=[],loadedList=[],head,lazyReady=false,inject=false,scriptPath=null,requireInit=false;function getScript(module,callback){var timer;function onLoad(e){if(!this.readyState||this.readyState=="loaded"||this.readyState=="complete"){script.onload=null;script.onerror=null;script.onreadystatechange=null;callback(e,this)}}var script=document.createElement('script');script.onload=onLoad;script.onerror=onLoad;script.onreadystatechange=onLoad;script.src=module;head.appendChild(script)}function loadModule(module,fn){loadedList.push(module);if(typeof apertoDevmode!='undefined'&&apertoDevmode&&devModuleList[module]&&devModuleList[module].length){var devModeList=[],len=devModuleList[module].length,origFn=fn;fn=function(e,elm){if(devModeList.length){loadList(devModeList)}else{origFn(e,elm)}};$.each(devModuleList[module],function(i,item){if(!i){module=item}else{devModeList.push([item,fn])}})}var modulePath=(module.indexOf(':/')!=-1||module.indexOf('.js')!=-1)?module:scriptPath+module+'.js';getScript(modulePath,fn)}function getLazy(scriptList){$.each(scriptList,function(i,item){lazyList.push([item,function(){}])})}function loadList(list){if(inject&&list.length){var item=list.shift(),oldFn=item[1],newFn=function(){loadList(list);oldFn()};if($.inArray(item[0],loadedList)==-1){loadModule(item[0],newFn)}else{loadList(list)}}else{requireInit=false;if(lazyReady&&lazyList.length){loadList(lazyList)}}}function require(condition,module,fn){if(condition){fn=fn||function(){};requireList.push([module,fn]);if(!requireInit){requireInit=true;try{loadList(requireList)}catch(e){requireInit=false;requireList.push([module,fn])}}}}function getStartInfo(){if(!head){head=$('head');head=(head[0])?head[0]:false}if(!head){inject=false}}function ready(){if(scriptPath===null||!head){getStartInfo()}if(!inject){inject=true;loadList(requireList)}}function config(initPath){scriptPath=initPath;getStartInfo();$(ready)}$(window).load(function(){setTimeout(function(){lazyReady=true;if(!requireList.length){inject=true;loadList(lazyList)}},99)});return{config:config,getLazy:getLazy,require:require}})()})(jQuery);;

//setUnset
;(function($){$.createSetUnsetFunction=function(obj){return function(prop,val){if(typeof obj[prop]=='undefined'){obj[prop]=val}}}})(jQuery);;

//lang
;var aperto=(typeof aperto!='undefined'&&aperto)?aperto:{};aperto.lang=aperto.lang||{};(function(l){var setLang=$.createSetUnsetFunction(l);setLang('shadowBoxClose','schliessen');setLang('shadowBoxNext','Nächstes');setLang('shadowBoxPrev','Vorheriges');setLang('shadowBoxCancel','Abbrechen');setLang('shadowBoxCounter','von');setLang('shadowBoxLoading','Lade')})(aperto.lang);;

//imgpreload
;(function($){$.imgPreLoad=(function(){var srcList=[],ready=false,started=false;function loadImg(){if(srcList.length){started=true;var src=srcList.shift(),img=new Image();img.src=src;if(img.complete){loadImg()}else{$(img).load(loadImg)}}else{started=false}}return{add:function(src){srcList.push(src);if(ready&&!started){loadImg()}},ready:function(){ready=true;loadImg()}}})();$(window).bind('load',$.imgPreLoad.ready)})(jQuery);;

//photo-gallery
;(function($){$.widget('ui.photoEnlarge',{init:function(){var that=this,o=this.options;this.links=$(o.link,this.element[0]);this.enlargeContainer=$(o.enlargeContainer,this.element[0]);if($.imgPreLoad){this.links.each(function(){$.imgPreLoad.add($(this).attr('href'))})}function switchPic(e){that.enlargePictureFormLink.call(that,this,e);return false}this.links.bind('click.photoEnlarge',switchPic)},enlargePictureFormLink:function(elm,e){var jElm=$(elm);this.links.removeClass('active');jElm.addClass('active');if(!this.options.animate){$('img',this.enlargeContainer).attr('src',jElm.attr('href'));$('img',this.enlargeContainer).attr('alt',$('img',elm).attr('alt'));$('h2',this.enlargeContainer).text($('img',elm).attr('title'))}else{$('<img src="'+jElm.attr('href')+'" alt="'+$('img',elm).attr('alt')+'" />').css({display:'none'}).appendTo(this.enlargeContainer[0]);var toHide=$('img:first',this.enlargeContainer[0]);var toShow=$('img:last',this.enlargeContainer[0]);toHide.css({width:toHide.width()}).animate({height:'0px'},{duration:500,complete:function(){$(this).remove()}});toShow.css({width:toShow.width()}).animate({height:'show'},{duration:500,complete:function(){toShow.css({width:''})}})}}});$.ui.photoEnlarge.defaults={link:'a',enlargeContainer:'div.photo',animate:true}})(jQuery);(function($){$(function(){var gallery=$('div.photo-gallery').photoEnlarge({animate:false});if($.browser.msie){$('div.photo div',gallery[0]).css({opacity:0.6})}})})(jQuery);;

//starter
;jQuery.noConflict();(function($){function callOnDomReady(){if($.browser.opera){$('body').addClass('opera')}$.location.createPaths('__basic-behaviour.js',{relativeCSS:'../css/',relativeImg:'../img/'});$.moduleLoader.config($.location.paths.js);$('body').addClass('js-enabled');if($.browser.msie&&$.browser.version<7){$('a.info:not([href])').attr('href','#')}$.moduleLoader.require((typeof GBrowserIsCompatible!='undefined'),'_map-behaviour');$.moduleLoader.require((typeof combinations!='undefined'),'_coffeeconfig-behaviour');$.moduleLoader.require($('#main ul.photo-list')[0],'_lightbox-behaviour');if($.fn.popupwindow){$("a.popupwindow").popupwindow()}$.moduleLoader.getLazy(['_lightbox-behaviour','_map-behaviour','_coffeeconfig-behaviour'])}$(callOnDomReady)})(jQuery);;



} // END of if(!apertoDevmode)


