/*
 * WebUI Core (C) digitop.de
 * $LastChangedRevision: 1969 $
 * $LastChangedDate: 2011-08-15 15:11:53 +0200 (Mon, 15 Aug 2011) $
 */
DT=window.DT||{};DT.scriptPath=DT.scriptPath||"templates/DT_Scripts/Library/";DT.cssPath=DT.cssPath||"templates/CSS/";DT.CONSTANTS={LOGGING_LEVEL_OFF:0,LOGGING_LEVEL_DEBUG:1,LOGGING_LEVEL_WARN:2,LOGGING_LEVEL_ERROR:3,LOGGING_LEVEL_LABELS:["OFF","DEBUG","WARN","ERROR"],EVENT_LAYOUT_CHANGED:"layout changed",EVENT_WINDOW_RESIZED:"window resized",EVENT_WINDOW_SCROLLED:"window scrolled",EVENT_INIT_COMPLETE:"initialization complete",EVENT_SETUP_TEARDOWN:"setup complete",EVENT_PARTIAL_REFRESH:"partial refresh"};DT.CORE=(function(d){var c,b,j,g,i,e,f,h=(DT.OPTIONS&&DT.OPTIONS.CORE&&DT.OPTIONS.CORE.LOGGING_LEVEL)||DT.CONSTANTS.LOGGING_LEVEL_OFF,a;f="1.0 $LastChangedDate: 2011-08-15 15:11:53 +0200 (Mon, 15 Aug 2011) $ $LastChangedRevision: 1969 $";h=DT.CONSTANTS.LOGGING_LEVEL_DEBUG;j={};c={};e=[];a=function(){var l,k,m,o,n;if(DT.OPTIONS){for(l in DT.OPTIONS){if(DT.OPTIONS.hasOwnProperty(l)){for(k=DT.OPTIONS[l].length;k--;){m=DT.OPTIONS[l][k];if(m.dataSelector){o=d.parseJSON(d(m.dataSelector).attr("value"));n={};d.extend(true,n,m,o);DT.OPTIONS[l][k]=n}}}}}};b=function(k){var n,m,l;m=["Debug","Warn","Error"];n={notify:function(q,s){var r,o,p;p={type:q,data:s,triggeredBy:k};this.logDebug('Notification "'+p.type+'" from "'+k+'"',p);r=j[p.type];if(r){for(o=r.length;o--;){r[o].handler.call(r[o].context,p)}}},listen:function(s,q,p){var o,r;if(typeof s==="string"){s=[s]}for(o=s.length;o--;){r=s[o];this.logDebug(k+' listens to "'+r+'"');if(!j[r]){j[r]=[]}j[r].push({handler:q,context:p})}},log:function(s,r){if(!window.console){return}var p,o;switch(s){case DT.CONSTANTS.LOGGING_LEVEL_DEBUG:p=window.console.log;break;case DT.CONSTANTS.LOGGING_LEVEL_WARN:p=window.console.warn;break;case DT.CONSTANTS.LOGGING_LEVEL_ERROR:p=window.console.error;break}if(!p){p=window.console.log}o=Array.prototype.slice.call(arguments);o.shift();o.unshift("["+k+"]: ");if(h&&s>=h){o.unshift("["+DT.CONSTANTS.LOGGING_LEVEL_LABELS[s]+"]");try{p.apply(this,o)}catch(q){window.console.log(o.join(""))}}},whoAmI:function(){return k},saveOption:function(o){var p=function(){d(o.dataSelector).attr("value",JSON.stringify(o))};if(!o.dataSelector){this.logError("tried to save without having a data selector")}else{if(window.JSON){p()}else{d.getScript(DT.scriptPath+"/json2.min.js",p)}}}};for(l=m.length;l--;){n["log"+m[l]]=(function(){var o=l+1;return function(){var p=Array.prototype.slice.call(arguments);p.unshift(o);this.log.apply(this,p)}}())}return n};g=b("DT.CORE");i=b("DT.CORE (external)");return{register:function(l,k){g.logDebug('register: "'+l+'"');if(c[l]!==undefined){g.logWarn('WARNING: redeclaration of "'+l+'"')}c[l]={maker:k,instance:null}},start:function(n){var o,m,l,k;m=c[n];m.instance=m.maker(b(n),d);o=(new Date()).getTime();if(m.instance.init){m.instance.init((DT.OPTIONS&&DT.OPTIONS[n])||[])}if(m.instance.initEach&&DT.OPTIONS&&DT.OPTIONS[n]){k=DT.OPTIONS[n];for(l=k.length;l--;){m.instance.initEach(k[l])}}e.push({name:n,time:(new Date()).getTime()-o})},stop:function(l){var k=c[l];if(k.instance){if(k.instance.destroy){k.instance.destroy()}k.instance=null}},startAll:function(){var k,m,l;a();l=m=(new Date()).getTime();for(k in c){if(c.hasOwnProperty(k)){this.start(k)}}e.push({name:"DT.CORE.startAll",time:(new Date()).getTime()-m});m=(new Date()).getTime();g.notify(DT.CONSTANTS.EVENT_INIT_COMPLETE);e.push({name:"INIT_COMPLETE event handling",time:(new Date()).getTime()-m});e.push({name:"SETUP",time:(new Date()).getTime()-l});g.notify(DT.CONSTANTS.EVENT_SETUP_TEARDOWN);DT.init=function(p,o){g.logDebug("re-attached init() for partial refreshs was called with:",p,o);var n,r,q={};n=c[p];n.instance=n.maker(b(p),d);r=d.parseJSON(d(o.dataSelector).attr("value"));d.extend(true,q,o,r);if(n.instance.init){n.instance.init([q])}if(n.instance.initEach){n.instance.initEach(q)}}},stopAll:function(){var k;for(k in c){if(c.hasOwnProperty(k)){this.stop(k)}}},fire:function(o,p){if(o===DT.CONSTANTS.EVENT_PARTIAL_REFRESH){if(p&&p.selector&&p.moduleId&&DT.OPTIONS&&DT.OPTIONS[p.moduleId]){var m,k,n,l;k=DT.OPTIONS[p.moduleId];for(l=k.length;l--;){if(k[l].selector===p.selector){n=k[l];m=c[p.moduleId];m.instance=m.maker(b(p.moduleId),d);if(m.instance.init){m.instance.init([n])}if(m.instance.initEach){m.instance.initEach(n)}break}}}}i.notify(o,p)},stats:e,version:f}}(jQuery));DT.TOOLKIT=(function(a){return{removeQueryString:function(b){return b.split("?")[0]},anyOfThesePages:function(b){var c,d;if(!(b instanceof Array)){b=[b]}d=document.location.href;d=d.slice(d.lastIndexOf("/")+1,d.lastIndexOf(".")).toLowerCase();for(c=b.length;c--;){if(b[c].toLowerCase()===d){return true}}return false},isBE:document.location.href.indexOf("://axcms.")!==-1,isFE:document.location.href.indexOf("://axcms.")===-1,isIE6:!!(a.browser.msie&&a.browser.version.substr(0,1)==="6"),isIE7:!!(a.browser.msie&&a.browser.version.substr(0,1)==="7"),IE:a.browser.msie?(+a.browser.version.substr(0,1)):undefined,createCookie:function(d,e,f){var c,b;if(f){c=new Date();c.setTime(c.getTime()+(f*24*60*60*1000));b="; expires="+c.toGMTString()}else{b=""}document.cookie=d+"="+encodeURIComponent(e)+b+"; path=/"},readCookie:function(d){var f=d+"=",b=document.cookie.split(";"),g,e;for(e=0;e<b.length;e++){g=b[e];while(g.charAt(0)===" "){g=g.substring(1,g.length)}if(g.indexOf(f)===0){return decodeURIComponent(g.substring(f.length,g.length))}}return null},deleteCookie:function(b){DT.TOOLKIT.createCookie(b,"",-1)},generateId:(function(){var b=0;return function(){b++;return"dt-auto-id-"+b}}()),throttleExecution:function(c,d,e){var b;if(a.isArray(c)){b=c.concat()}else{b=a.makeArray(c)}setTimeout(function(){var f=+new Date();do{d(b.shift())}while(b.length&&+new Date()-f<50);if(b.length){setTimeout(arguments.callee,25)}else{if(e){e()}}},25)}}}(jQuery));jQuery.noConflict();jQuery(document).ready(function(){DT.CORE.startAll()});jQuery(window).unload(function(){DT.CORE.stopAll()});
