/* Read file from cache. ../temp/temp.base.js.php was last modified: February 05 2012 10:24:07.*/
var Nx=Nx||{};Nx.$=jQuery.noConflict(true);
Nx.Config={dependencyPath:{library:'/js/libraries/dynamic/',plugin:'/js/plugins/dynamic/',util:'/js/utils/dynamic/'}};
(function($){Nx.Application=function($ctx,config){this.config=$.extend(Nx.Config,config);this.$ctx=$ctx||$('body');this.modCounter=0;this.modules=[];this.connectors={};this.wildcardComponents=[];this.sandbox=new Nx.Sandbox(this,this.config);};Nx.Application.prototype.constructor=Nx.Application;$.extend(Nx.Application.prototype,{registerModules:function(){var that=this;$('.mod',that.$ctx).each(function(){var $this=$(this);var classes=$this.attr('class').split(' ');if(classes.length>1){var modName;var skins=[];var connectors=[];for(var i=0;i<classes.length;i++){if(classes[i].indexOf('mod')===0&&classes[i].length>3){modName=classes[i].substr(3);}
else if(classes[i].indexOf('skin')===0){skins.push(classes[i].substr(4));}
else if(classes[i].indexOf('conn')===0){connectors.push(classes[i].substr(4));}}
if(modName&&Nx.Module[modName]){that.registerModule($this,modName,skins,connectors);}}});},registerModule:function($node,modName,skins,connectors){var that=this;modName=modName||null;skins=skins||[];connectors=connectors||[];if(modName&&Nx.Module[modName]){var modId=that.modCounter++;$node.data('id',modId);$.log.debug('instantiate Nx.Module.'+modName);that.modules[modId]=new Nx.Module[modName]($node,that.sandbox,modId);for(var i=0;i<skins.length;i++){var skinName=skins[i];skinName=skinName.replace(modName,'');if(Nx.Module[modName][skinName]){$.log.debug('decorate it with the skin Nx.Module.'+modName+'.'+skinName);that.modules[modId]=that.modules[modId].getDecoratedModule(modName,skinName);}}
that.applyErrorHandler(modName,that.modules[modId]);for(var i=0;i<connectors.length;i++){that.registerConnection(connectors[i],that.modules[modId]);}
return that.modules[modId];}
else{$.log.info('the module Nx.Module.'+modName+' does not exist');return null;}},registerLayout:function($node,layoutName,skins,connectors){this.registerModule($node,layoutName,skins,connectors);},registerConnection:function(connector,component){var that=this;var connectorType=connector.replace(/[0-9]+[a-zA-Z]*$/,'');var connectorId=connector.replace(/[a-zA-Z]*$/,'').replace(/^[a-zA-Z]*/,'');var connectorRole=connector.replace(/^[a-zA-Z]*[0-9]*/,'');if(connectorId==='*'&&connectorRole==='*'){that.wildcardComponents.push(component);}
else{if(!that.connectors[connectorId]){if(connectorType===''){that.connectors[connectorId]=new Nx.Connector(connectorId);}
else if(Nx.Connector[connectorType]){that.connectors[connectorId]=new Nx.Connector[connectorType](connectorId);}}
if(that.connectors[connectorId]){$.log.debug('attach the connector: '+connectorId);component.attachConnector(that.connectors[connectorId]);that.connectors[connectorId].registerComponent(component,connectorRole);}}},applyErrorHandler:function(componentName,component){for(var methodName in component){var method=component[methodName];if($.isFunction(method)){component[methodName]=function(componentName,methodName,method){return function(){try{return method.apply(this,arguments);}
catch(ex){$.log.error(componentName+'.'+methodName+'(): '+ex.message);}};}(componentName,methodName,method);}}},startAll:function(){var that=this;for(var i=0;i<this.modules.length;i++){this.modules[i].start();}
for(var i=0;i<this.wildcardComponents.length;i++){for(var connectorId in this.connectors){this.wildcardComponents[i].attachConnector(this.connectors[connectorId]);this.connectors[connectorId].registerComponent(this.wildcardComponents[i],'*');}}},stopAll:function(){for(var i=0;i<this.modules.length;i++){this.modules[i].stop();}}});})(Nx.$);
(function($){Nx.Module=function($ctx,sandbox,modId){if(arguments.length>0){this.$ctx=$ctx;this.modId=modId;this.connectors=[];this.dependencyCounter={beforeBinding:0,onBinding:1,afterBinding:0};this.sandbox=sandbox;}};Nx.Module.prototype.constructor=Nx.Module;$.extend(Nx.Module.prototype,{start:function(){var that=this;if(this.dependencies){this.dependencies();}
this.checkDependencies('beforeBinding',function(){that.initBeforeBinding();});},stop:function(){},initBeforeBinding:function(){var that=this;var callback=function(){that.dependencyCounter.onBinding--;that.checkDependencies('onBinding',function(){that.initOnBinding();});};if(this.beforeBinding){this.beforeBinding(callback);}
else{callback();}},initOnBinding:function(){var that=this;if(this.onBinding){this.onBinding();}
this.checkDependencies('afterBinding',function(){that.initAfterBinding();});},initAfterBinding:function(){if(this.afterBinding){this.afterBinding();}},checkDependencies:function(phase,callback){if(this.dependencyCounter[phase]===0){callback();}},require:function(dependency,type,phase){var that=this;phase=phase||'onBinding';type=type||'plugin';this.dependencyCounter[phase]++;var callback=function(){that.dependencyCounter[phase]--;that.checkDependencies(phase,function(){that['init'+Nx.Utils.String.capitalize(phase)]();});};that.sandbox.loadDependency(dependency,type,callback,phase);},fire:function(state,data,defaultAction){var that=this;data=data||{};state=Nx.Utils.String.capitalize(state);$.each(that.connectors,function(){var connector=this;var callback=function(){if(typeof defaultAction=='function'){defaultAction();}
connector.notify(that,'after'+state,data);};if(connector.notify(that,'on'+state,data,callback)){callback();}});if(this.connectors.length<1){if(typeof defaultAction=='function'){defaultAction();}}},attachConnector:function(connector){this.connectors.push(connector);},getDecoratedModule:function(module,skin){if(Nx.Module[module][skin]){var decorator=Nx.Module[module][skin];decorator.prototype=this;decorator.prototype.constructor=Nx.Module[module][skin];return new decorator(this);}
else{$.log.info('the skin '+skin+' does not exists for this module');return null;}}});})(Nx.$);
(function($){Nx.Connector=function(connectorId){if(arguments.length>0){this.connectorId=connectorId;this.components=[];}};Nx.Connector.prototype.constructor=Nx.Connector;$.extend(Nx.Connector.prototype,{registerComponent:function(component,role){role=role||'standard';this.components.push({'component':component,'role':role});},notify:function(component,state,data,callback){var proceed=true;for(var i=0;i<this.components.length;i++){if(this.components[i].component.modId!==component.modId&&this.components[i].component[state]){if(this.components[i].component[state](data,callback)===false){proceed=false;}}}
return proceed;}});})(Nx.$);
(function($){Nx.Sandbox=function(application,config){this.application=application;this.config=config;this.dependencies=[];};Nx.Sandbox.prototype.constructor=Nx.Sandbox;$.extend(Nx.Sandbox.prototype,{loadDependency:function(dependency,type,callback,phase){var that=this;phase=phase||'async';type=type||'plugin';if(that.dependencies[dependency]&&that.dependencies[dependency].state==='requested'){$.log.info('dependency '+dependency+' already requested');that.dependencies[dependency].callbacks.push(function(){callback(phase);});}
else if(that.dependencies[dependency]&&that.dependencies[dependency].state==='loaded'){$.log.info('dependency '+dependency+' already loaded');callback(phase);}
else{$.log.time('load dependency '+dependency);that.dependencies[dependency]={state:'requested',callbacks:[]};var path;switch(type){case'library':case'plugin':case'util':path=this.config.dependencyPath[type];break;case'url':path='';break;case'default':$.log.error('the type '+type+' is not known');break;}
setTimeout(function(){$.ajax({url:''+path+dependency,dataType:'script',cache:true,success:function(){$.log.time('load dependency '+dependency);that.dependencies[dependency].state='loaded';callback(phase);var callbacks=that.dependencies[dependency].callbacks;for(var i=0;i<callbacks.length;i++){callbacks[i]();}},error:function(){$.log.error('an error occured during loading the dependency '+path+dependency);}});},0);}},getConfig:function(){return this.config;},getConfigParam:function(name){if(this.config.name!==undefined){return this.config.name;}
else{throw new Error('the config param '+name+' does not exist');}},getModuleById:function(id){if(this.application.modules[id]!==undefined){return this.application.modules[id];}
else{throw new Error('the module with the id '+id+' does not exist');}}});})(Nx.$);
Nx.Utils={};
(function($){Nx.Connector.MasterSlave=function(connectorId){Nx.Connector.call(this,connectorId);};Nx.Connector.MasterSlave.prototype=new Nx.Connector();Nx.Connector.MasterSlave.prototype.constructor=Nx.Connector.MasterSlave;Nx.$.extend(Nx.Connector.MasterSlave.prototype,{notify:function(component,state,data,callback){var proceed=true;for(var j=0;j<this.components.length;j++){if(this.components[j].component===component&&this.components[j].role==='Master'){for(var i=0;i<this.components.length;i++){if(this.components[i].component!==component&&this.components[i].component[state]){if(this.components[i].component[state](data,callback)===false){proceed=false;}}}}}
return proceed;}});})(Nx.$);
Nx.$.json={encode:function(value,replacer,space){var i;gap='';var indent='';if(typeof space==='number'){for(i=0;i<space;i+=1){indent+=' ';}}else if(typeof space==='string'){indent=space;}
rep=replacer;if(replacer&&typeof replacer!=='function'&&(typeof replacer!=='object'||typeof replacer.length!=='number')){throw new Error('JSON.encode');}
return this.str('',{'':value});},decode:function(text,reviver){var j;var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;function walk(holder,key){var k,v,value=holder[key];if(value&&typeof value==='object'){for(k in value){if(Object.hasOwnProperty.call(value,k)){v=walk(value,k);if(v!==undefined){value[k]=v;}else{delete value[k];}}}}
return reviver.call(holder,key,value);}
cx.lastIndex=0;if(cx.test(text)){text=text.replace(cx,function(a){return'\\u'+('0000'+a.charCodeAt(0).toString(16)).slice(-4);});}
if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,'@').replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,']').replace(/(?:^|:|,)(?:\s*\[)+/g,''))){j=eval('('+text+')');return typeof reviver==='function'?walk({'':j},''):j;}
throw new SyntaxError('JSON.parse');},f:function(n){return n<10?'0'+n:n;},DateToJSON:function(key){return this.getUTCFullYear()+'-'+this.f(this.getUTCMonth()+1)+'-'+this.f(this.getUTCDate())+'T'+this.f(this.getUTCHours())+':'+this.f(this.getUTCMinutes())+':'+this.f(this.getUTCSeconds())+'Z';},StringToJSON:function(key){return this.valueOf();},quote:function(string){var meta={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'};var escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;escapable.lastIndex=0;return escapable.test(string)?'"'+string.replace(escapable,function(a){var c=meta[a];return typeof c==='string'?c:'\\u'+('0000'+a.charCodeAt(0).toString(16)).slice(-4);})+'"':'"'+string+'"';},str:function(key,holder){var indent='',gap='',i,k,v,length,mind=gap,partial,value=holder[key];if(value&&typeof value==='object'){switch((typeof value)){case'date':this.DateToJSON(key);break;default:this.StringToJSON(key);break;}}
if(typeof rep==='function'){value=rep.call(holder,key,value);}
switch(typeof value){case'string':return this.quote(value);case'number':return isFinite(value)?String(value):'null';case'boolean':case'null':return String(value);case'object':if(!value){return'null';}
gap+=indent;partial=[];if(Object.prototype.toString.apply(value)==='[object Array]'){length=value.length;for(i=0;i<length;i+=1){partial[i]=this.str(i,value)||'null';}
v=partial.length===0?'[]':gap?'[\n'+gap+partial.join(',\n'+gap)+'\n'+mind+']':'['+partial.join(',')+']';gap=mind;return v;}
if(rep&&typeof rep==='object'){length=rep.length;for(i=0;i<length;i+=1){k=rep[i];if(typeof k==='string'){v=this.str(k,value);if(v){partial.push(this.quote(k)+(gap?': ':':')+v);}}}}else{for(k in value){if(Object.hasOwnProperty.call(value,k)){v=this.str(k,value);if(v){partial.push(this.quote(k)+(gap?': ':':')+v);}}}}
v=partial.length===0?'{}':gap?'{\n'+gap+partial.join(',\n'+gap)+'\n'+
mind+'}':'{'+partial.join(',')+'}';gap=mind;return v;}}};;(function($){$.log={toggle:function(){},resize:function(){},clear:function(){},move:function(){},debug:function(){},warn:function(){},info:function(){},error:function(){},time:function(){}};})(Nx.$);
(function($){Nx.Utils.String={capitalize:function(str){return str.substr(0,1).toUpperCase().concat(str.substr(1));}};})(Nx.$);
(function($){Nx.Utils.Cookie={internal:{},expires:function(){return Nx.Utils.Cookie.internal.expires;},path:function(){return Nx.Utils.Cookie.internal.path;},require:function(){if(!$.isFunction($.json.decode)){$.log.error('Nx.Utils.Cookie needs the jquery.json.js Plugin! Exit now.');}},read:function(name){var theCookie=""+document.cookie;var ind=theCookie.indexOf(name);if(ind==-1||name==""){$.log.info('No cookie found with the name "'+name+'"');return null;}
var ind1=theCookie.indexOf(';',ind);if(ind1==-1){ind1=theCookie.length;}
var string=unescape(theCookie.substring(ind+name.length+1,ind1));var obj;if(string){try{obj=$.json.decode(string);}catch(e){$.log.error('Could not decode json with cookie "'+name+'"');return false;}}
if(typeof(obj)=="object"){Nx.Utils.Cookie.internal.expires=obj.expires;Nx.Utils.Cookie.internal.path=obj.path;return obj.value;}
return false;},write:function(name,value,expires,path){var obj={expires:expires,path:path,value:value};try{var string=$.json.encode(obj);}catch(e){$.log.error('Could not encode json with cookie "'+name+'"');return false;}
if(!name){$.log.info('[Nx.Utils.cookies.write] No name: '+name+' or no value: '+string);return false;}
var cookie=name+'='+string;if(expires){cookie+='; expires='+expires;}
if(path){cookie+='; path='+path;}else if(path!==''){cookie+='; path=/';}
document.cookie=cookie;return true;}};Nx.Utils.Cookie.require();})(Nx.$);
﻿
(function($){$.fn.xase5ePlaceholder=function(userOptions){var $t=$(this);if($t.length<1){return;}
var userOptions=userOptions||{};var setup=customEvents;if(typeof(userOptions.extend)==='function'){var userCustomEvents=$.extend(true,{},customEvents);setup=userOptions.extend(userCustomEvents)||setup;}
var $inputs=$t.find('input[placeholder]');if($inputs.length<1){return;}
$t.data('$xase5ePlaceholder',$inputs);var options=$.extend({},$.fn.xase5ePlaceholder.defaults,userOptions);for(customEvent in setup){var $self=$t;if(setup[customEvent]instanceof Array){for(var i=0;i<setup[customEvent].length;i++){setup[customEvent][i].call($self,options);}}else{setup[customEvent].call($self,options);}}
for(var browser in options.compatible){if($.browser[browser]&&$.browser.version>=options.compatible[browser]){return;}}
$t.trigger('initialize.'+options.namespace);return this;}
$.fn.xase5ePlaceholder.defaults={namespace:'xase5ePlaceholder',compatible:{safari:4.0,chrome:1.0},className:'placeholder'};var customEvents={initialize:[function(options){this.bind("initialize."+options.namespace,function(e){if(e.isDefaultPrevented()){return;}
var $t=$(this);$t.data('$xase5ePlaceholder').trigger('blur.'+options.namespace).addClass(options.className);});}],focus:[function(options){$(this).data('$xase5ePlaceholder').bind("focus."+options.namespace,function(e){if(e.isDefaultPrevented()){return;}
var $t=$(this);if($t.val()==$t.attr('placeholder')){$t.val('').removeClass(options.className);}});}],submit:[function(options){$(this).bind("submit."+options.namespace,function(e){if(e.isDefaultPrevented()){return;}
$(this).data('$xase5ePlaceholder').each(function(){var $t=$(this);if($t.val()==$t.attr('placeholder')){$t.val('').removeClass(options.className);}});});}],blur:[function(options){$(this).data('$xase5ePlaceholder').bind("blur."+options.namespace,function(e){if(e.isDefaultPrevented()){return;}
var $t=$(this);if($t.val()==''){$t.val($t.attr('placeholder')).addClass(options.className);}});}]};$(document).ready(function(){$('form').xase5ePlaceholder();});})(Nx.$);;(function($){$.widget("ui.combobox",{_create:function(){var self=this;var select=this.element.hide();var defaultValue=select.attr('data-default')||'';var className=select.attr('data-class')||'';var input=$('<input>').addClass(className).click(function(){$('button',$(this).closest('.wrapper')).trigger('click');}).insertAfter(select).attr('value',defaultValue).attr('readonly','readonly').autocomplete({source:function(request,response){var matcher=new RegExp(request.term,"i");response(select.children("option").map(function(){var text=$(this).text();if(this.value&&(!request.term||matcher.test(text))){return{id:this.value,label:text.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)("+$.ui.autocomplete.escapeRegex(request.term)+")(?![^<>]*>)(?![^&;]+;)","gi"),"<strong>$1</strong>"),value:text};}}));},delay:0,change:function(event,ui){if(!ui.item){$(this).val("");return false;}
select.val(ui.item.id);self._trigger("selected",event,{item:select.find("[value='"+ui.item.id+"']")});},minLength:0}).wrap('<span class="wrapper"></span>');$("<button></button>").addClass('expand').attr("tabIndex",-1).insertAfter(input).click(function(){if(input.autocomplete("widget").is(":visible")){input.autocomplete("close");return;}
input.autocomplete("search","");input.focus();});}});})(Nx.$);
﻿
(function($){$.fn.xaseDropDown=function(userOptions){var $t=$(this);var userOptions=userOptions||{};var setup=customEvents;if(typeof(userOptions.extend)==='function'){var userCustomEvents=$.extend(true,{},customEvents);setup=userOptions.extend(userCustomEvents)||setup;}
var options=$.extend({},$.fn.xaseDropDown.defaults,userOptions);for(customEvent in setup){var $self=$t;if(setup[customEvent]instanceof Array){for(var i=0;i<setup[customEvent].length;i++){setup[customEvent][i].call($self,options);}}else{setup[customEvent].call($self,options);}}
$('body').bind('click.'+options.namespace,function(){$t.trigger('blur.'+options.namespace);});if(options.autoInitialize){$t.trigger("initialize."+options.namespace);}};$.fn.xaseDropDown.defaults={namespace:'xaseDropDown',newSelect:'<ul></ul>',newOptions:'<li></li>',optionElement:'option',selectClass:'xaseDropDown',selectedClass:'selected',optionsClass:'options',optionClass:'option',hoverClass:'hover',triggerFocus:'click',triggerSelect:'click',autoInitialize:true};var dropDownRegistry=[];var customEvents={initialize:[function(options){dropDownRegistry.unshift($(this));this.bind("initialize."+options.namespace,function(e){if(e.isDefaultPrevented()||e.isPropagationStopped()){return;}
var $t=$(this);$t.trigger('setupSelects.'+options.namespace).trigger('setupOptions.'+options.namespace).trigger('setupSelectedOption.'+options.namespace);$t.hide();});}],setupSelects:[function(options){this.bind("setupSelects."+options.namespace,function(e){if(e.isDefaultPrevented()||e.isPropagationStopped()){return;}
var $t=$(this);var $newSelect=$(options.newSelect);$newSelect.attr('class',$t.attr('class')).addClass(options.selectClass).css({position:'relative'}).bind(options.triggerFocus+'.'+options.namespace,function(e){$t.trigger('focus.'+options.namespace);e.stopPropagation();}).data('$select',$t);$t.data('$select',$newSelect).after($newSelect);});}],setupOptions:[function(options){this.bind("setupOptions."+options.namespace,function(e){if(e.isDefaultPrevented()||e.isPropagationStopped()){return;}
var $t=$(this);var $newSelect=$t.data('$select');var $options=$(options.newSelect);$t.children().each(function(i){var $t=$(this);var $newOption=$(options.newOptions);$t.data('$option',$newOption);$newOption.addClass(options.optionClass).text($t.text()).data('$option',$t);$newOption.bind(options.triggerFocus+'.'+options.namespace,function(e){e.stopPropagation();return $t.trigger('select.'+options.namespace,$t);}).bind('hover'+options.namespace,function(){$(this).addClass('hover');},function(){$(this).removeClass('hover');});$newOption.appendTo($options);});$options.addClass(options.optionsClass).hide().appendTo($newSelect);$t.data('$options',$options);});}],setupSelectedOption:[function(options){this.bind("setupSelectedOption."+options.namespace,function(e){if(e.isDefaultPrevented()||e.isPropagationStopped()){return;}
var $t=$(this);var $newSelect=$t.data('$select');var $selected=$(':selected',$t);if($selected.length<1){$(options.optionElement,$t).eq(0);}
var $newSelected=$(options.newOptions);$newSelected.addClass(options.selectedClass).prependTo($newSelect);$t.data('$selected',$newSelected);$t.trigger('select.'+options.namespace,$selected);});}],select:[function(options){this.bind("select."+options.namespace,function(e,selected){if(e.isDefaultPrevented()||e.isPropagationStopped()){return;}
var $t=$(this);var $selected=$(selected);$(':selected',$t).removeAttr('selected').data('$option').removeClass(options.selectedClass);$selected.attr('selected','selected').data('$option').addClass(options.selectedClass);$t.data('$selected').text($selected.text());$t.trigger('blur.'+options.namespace);return false;});}],focus:[function(options){this.bind("focus."+options.namespace,function(e){if(e.isDefaultPrevented()||e.isPropagationStopped()){return;}
var $t=$(this);var $newSelect=$t.data('$select');var $options=$t.data('$options');var offset=$options.outerWidth()-$options.innerWidth();$.each(dropDownRegistry,function(){$(this).not($t).blur();});$options.css({position:'absolute',minWidth:$newSelect.outerWidth()-offset,top:$newSelect.outerHeight()-3,zIndex:999,display:'block'});e.stopPropagation();});}],blur:[function(options){this.bind("blur."+options.namespace,function(e){if(e.isDefaultPrevented()||e.isPropagationStopped()){return;}
var $t=$(this);$t.data('$options').hide();});}]};})(Nx.$);
(function($){$.fn.easySlider=function(options){var defaults={prevId:'prevBtn',prevText:'',nextId:'nextBtn',nextText:'',controlsShow:true,controlsBefore:'',controlsAfter:'',controlsFade:true,firstId:'firstBtn',firstText:'',firstShow:false,lastId:'lastBtn',lastText:'',lastShow:false,vertical:false,speed:400,auto:false,pause:2000,continuous:false,numeric:false,numericId:'controls'};options=$.extend(defaults,options);this.each(function(){var obj=$(this);var s=$("li",obj).length;var w=obj.width(w);var clickable=true;obj.width(w);obj.css("overflow","hidden");var ts=s-1;var t=0;$("ul",obj).css('width',s*w);if(options.continuous){$("ul",obj).prepend($("ul li:last-child",obj).clone().css("margin-left","-"+w+"px"));$("ul",obj).append($("ul li:nth-child(2)",obj).clone());$("ul",obj).css('width',(s+1)*w);}
if(!options.vertical){$("li",obj).css('float','left');}
if(options.controlsShow){var html=options.controlsBefore;if(options.numeric){html+='<ol id="'+options.numericId+'"></ol>';}else{if(options.firstShow){html+='<span class="'+options.firstId+'"><a href=\"javascript:void(0);\">'+options.firstText+'</a></span>';}
html+='<span class="'+options.prevId+'"><a href=\"javascript:void(0);\">'+options.prevText+'</a></span>';html+='<span class="'+options.nextId+'"><a href=\"javascript:void(0);\">'+options.nextText+'</a></span>';if(options.lastShow){html+='<span class="'+options.lastId+'"><a href=\"javascript:void(0);\">'+options.lastText+'</a></span>';}}
html+=options.controlsAfter;$(obj).after(html);}
if(options.numeric){for(var i=0;i<s;i++){$(document.createElement("li")).attr('class',options.numericId+(i+1)).html('<a rel='+i+' href=\"javascript:void(0);\">'+(i+1)+'</a>').appendTo($("."+options.numericId)).click(function(){animate($("a",$(this)).attr('rel'),true);});}}else{$("a","."+options.nextId).click(function(){animate("next",true);});$("a","."+options.prevId).click(function(){animate("prev",true);});$("a","."+options.firstId).click(function(){animate("first",true);});$("a","."+options.lastId).click(function(){animate("last",true);});}
function setCurrent(i){i=parseInt(i,10)+1;$("li","."+options.numericId).removeClass("current");$("li."+options.numericId+i).addClass("current");}
function adjust(){if(t>ts){t=0;}
if(t<0){t=ts;}
if(!options.vertical){$("ul",obj).css("margin-left",(t*w*-1));}else{$("ul",obj).css("margin-left",(t*h*-1));}
clickable=true;if(options.numeric){setCurrent(t);}}
function animate(dir,clicked){if(clickable){clickable=false;var ot=t;switch(dir){case"next":t=(ot>=ts)?(options.continuous?t+1:ts):t+1;break;case"prev":t=(t<=0)?(options.continuous?t-1:0):t-1;break;case"first":t=0;break;case"last":t=ts;break;default:t=dir;break;}
var diff=Math.abs(ot-t);var speed=diff*options.speed;if(!options.vertical){p=(t*w*-1);$("ul",obj).animate({marginLeft:p},{queue:false,duration:speed,complete:adjust});}else{p=(t*h*-1);$("ul",obj).animate({marginTop:p},{queue:false,duration:speed,complete:adjust});}
if(!options.continuous&&options.controlsFade){if(t==ts){$("a","."+options.nextId).hide();$("a","."+options.lastId).hide();}else{$("a","."+options.nextId).show();$("a","."+options.lastId).show();}
if(t===0){$("a","."+options.prevId).hide();$("a","."+options.firstId).hide();}else{$("a","."+options.prevId).show();$("a","."+options.firstId).show();}}
if(clicked){clearTimeout(timeout);}
if(options.auto&&dir=="next"&&!clicked){timeout=setTimeout(function(){animate("next",false);},diff*options.speed+options.pause);}}}
var timeout;if(options.auto){timeout=setTimeout(function(){animate("next",false);},options.pause);}
if(options.numeric){setCurrent(0);}
if(!options.continuous&&options.controlsFade){$("a","."+options.prevId).hide();$("a","."+options.firstId).hide();}});};})(Nx.$);
﻿;(function($){if(/1\.(0|1|2)\.(0|1|2)/.test($.fn.jquery)||/^1.1/.test($.fn.jquery)){alert('blockUI requires jQuery v1.2.3 or later!  You are using v'+$.fn.jquery);return;}
$.fn._fadeIn=$.fn.fadeIn;var noOp=function(){};var mode=document.documentMode||0;var setExpr=$.browser.msie&&(($.browser.version<8&&!mode)||mode<8);var ie6=$.browser.msie&&/MSIE 6.0/.test(navigator.userAgent)&&!mode;$.blockUI=function(opts){install(window,opts);};$.unblockUI=function(opts){remove(window,opts);};$.growlUI=function(title,message,timeout,onClose){var $m=$('<div class="growlUI"></div>');if(title)$m.append('<h1>'+title+'</h1>');if(message)$m.append('<h2>'+message+'</h2>');if(timeout==undefined)timeout=3000;$.blockUI({message:$m,fadeIn:700,fadeOut:1000,centerY:false,timeout:timeout,showOverlay:false,onUnblock:onClose,css:$.blockUI.defaults.growlCSS});};$.fn.block=function(opts){return this.unblock({fadeOut:0}).each(function(){if($.css(this,'position')=='static')
this.style.position='relative';if($.browser.msie)
this.style.zoom=1;install(this,opts);});};$.fn.unblock=function(opts){return this.each(function(){remove(this,opts);});};$.blockUI.version=2.33;$.blockUI.defaults={message:'<h1>Please wait...</h1>',title:null,draggable:true,theme:false,css:{padding:0,margin:0,width:'680px',top:'20%',left:'20%',textAlign:'left',color:'#000',border:'1px solid black',backgroundColor:'#fff',cursor:'default'},themedCSS:{width:'30%',top:'40%',left:'35%'},overlayCSS:{backgroundColor:'#FFF',opacity:0.7,cursor:'default'},growlCSS:{width:'350px',top:'10px',left:'',right:'10px',border:'none',padding:'5px',opacity:0.6,cursor:'default',color:'#fff',backgroundColor:'#000','-webkit-border-radius':'10px','-moz-border-radius':'10px','border-radius':'10px'},iframeSrc:/^https/i.test(window.location.href||'')?'javascript:false':'about:blank',forceIframe:false,baseZ:1000,centerX:true,centerY:true,allowBodyStretch:true,bindEvents:true,constrainTabKey:true,fadeIn:200,fadeOut:400,timeout:0,showOverlay:true,focusInput:true,applyPlatformOpacityRules:true,onBlock:null,onUnblock:null,quirksmodeOffsetHack:4};var pageBlock=null;var pageBlockEls=[];function install(el,opts){var full=(el==window);var msg=opts&&opts.message!==undefined?opts.message:undefined;opts=$.extend({},$.blockUI.defaults,opts||{});opts.overlayCSS=$.extend({},$.blockUI.defaults.overlayCSS,opts.overlayCSS||{});var css=$.extend({},$.blockUI.defaults.css,opts.css||{});var themedCSS=$.extend({},$.blockUI.defaults.themedCSS,opts.themedCSS||{});msg=msg===undefined?opts.message:msg;if(full&&pageBlock)
remove(window,{fadeOut:0});if(msg&&typeof msg!='string'&&(msg.parentNode||msg.jquery)){var node=msg.jquery?msg[0]:msg;var data={};$(el).data('blockUI.history',data);data.el=node;data.parent=node.parentNode;data.display=node.style.display;data.position=node.style.position;if(data.parent)
data.parent.removeChild(node);}
var z=opts.baseZ;var lyr1=($.browser.msie||opts.forceIframe)?$('<iframe class="blockUI" style="z-index:'+(z++)+';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="'+opts.iframeSrc+'"></iframe>'):$('<div class="blockUI" style="display:none"></div>');var lyr2=$('<div class="blockUI blockOverlay" style="z-index:'+(z++)+';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>');var lyr3,s;if(opts.theme&&full){s='<div class="blockUI blockMsg blockPage ui-dialog ui-widget ui-corner-all" style="z-index:'+z+';display:none;position:fixed">'+'<div class="ui-widget-header ui-dialog-titlebar blockTitle">'+(opts.title||'&nbsp;')+'</div>'+'<div class="ui-widget-content ui-dialog-content"></div>'+'</div>';}
else if(opts.theme){s='<div class="blockUI blockMsg blockElement ui-dialog ui-widget ui-corner-all" style="z-index:'+z+';display:none;position:absolute">'+'<div class="ui-widget-header ui-dialog-titlebar blockTitle">'+(opts.title||'&nbsp;')+'</div>'+'<div class="ui-widget-content ui-dialog-content"></div>'+'</div>';}
else if(full){s='<div class="blockUI blockMsg blockPage" style="z-index:'+z+';display:none;position:fixed"></div>';}
else{s='<div class="blockUI blockMsg blockElement" style="z-index:'+z+';display:none;position:absolute"></div>';}
lyr3=$(s);if(msg){if(opts.theme){lyr3.css(themedCSS);lyr3.addClass('ui-widget-content');}
else
lyr3.css(css);}
if(!opts.applyPlatformOpacityRules||!($.browser.mozilla&&/Linux/.test(navigator.platform)))
lyr2.css(opts.overlayCSS);lyr2.css('position',full?'fixed':'absolute');if($.browser.msie||opts.forceIframe)
lyr1.css('opacity',0.0);var layers=[lyr1,lyr2,lyr3],$par=full?$('body'):$(el);$.each(layers,function(){this.appendTo($par);});if(opts.theme&&opts.draggable&&$.fn.draggable){lyr3.draggable({handle:'.ui-dialog-titlebar',cancel:'li'});}
var expr=setExpr&&(!$.boxModel||$('object,embed',full?null:el).length>0);if(ie6||expr){if(full&&opts.allowBodyStretch&&$.boxModel)
$('html,body').css('height','100%');if((ie6||!$.boxModel)&&!full){var t=sz(el,'borderTopWidth'),l=sz(el,'borderLeftWidth');var fixT=t?'(0 - '+t+')':0;var fixL=l?'(0 - '+l+')':0;}
$.each([lyr1,lyr2,lyr3],function(i,o){var s=o[0].style;s.position='absolute';if(i<2){full?s.setExpression('height','Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.boxModel?0:'+opts.quirksmodeOffsetHack+') + "px"'):s.setExpression('height','this.parentNode.offsetHeight + "px"');full?s.setExpression('width','jQuery.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"'):s.setExpression('width','this.parentNode.offsetWidth + "px"');if(fixL)s.setExpression('left',fixL);if(fixT)s.setExpression('top',fixT);}
else if(opts.centerY){if(full)s.setExpression('top','(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"');s.marginTop=0;}
else if(!opts.centerY&&full){var top=(opts.css&&opts.css.top)?parseInt(opts.css.top):0;var expression='((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + '+top+') + "px"';s.setExpression('top',expression);}});}
if(msg){if(opts.theme)
lyr3.find('.ui-widget-content').append(msg);else
lyr3.append(msg);if(msg.jquery||msg.nodeType)
$(msg).show();}
if(($.browser.msie||opts.forceIframe)&&opts.showOverlay)
lyr1.show();if(opts.fadeIn){var cb=opts.onBlock?opts.onBlock:noOp;var cb1=(opts.showOverlay&&!msg)?cb:noOp;var cb2=msg?cb:noOp;if(opts.showOverlay)
lyr2._fadeIn(opts.fadeIn,cb1);if(msg)
lyr3._fadeIn(opts.fadeIn,cb2);}
else{if(opts.showOverlay)
lyr2.show();if(msg)
lyr3.show();if(opts.onBlock)
opts.onBlock();}
bind(1,el,opts);if(full){pageBlock=lyr3[0];pageBlockEls=$(':input:enabled:visible',pageBlock);if(opts.focusInput)
setTimeout(focus,20);}
else
center(lyr3[0],opts.centerX,opts.centerY);if(opts.timeout){var to=setTimeout(function(){full?$.unblockUI(opts):$(el).unblock(opts);},opts.timeout);$(el).data('blockUI.timeout',to);}};function remove(el,opts){var full=(el==window);var $el=$(el);var data=$el.data('blockUI.history');var to=$el.data('blockUI.timeout');if(to){clearTimeout(to);$el.removeData('blockUI.timeout');}
opts=$.extend({},$.blockUI.defaults,opts||{});bind(0,el,opts);var els;if(full)
els=$('body').children().filter('.blockUI').add('body > .blockUI');else
els=$('.blockUI',el);if(full)
pageBlock=pageBlockEls=null;if(opts.fadeOut){els.fadeOut(opts.fadeOut);setTimeout(function(){reset(els,data,opts,el);},opts.fadeOut);}
else
reset(els,data,opts,el);};function reset(els,data,opts,el){els.each(function(i,o){if(this.parentNode)
this.parentNode.removeChild(this);});if(data&&data.el){data.el.style.display=data.display;data.el.style.position=data.position;if(data.parent)
data.parent.appendChild(data.el);$(el).removeData('blockUI.history');}
if(typeof opts.onUnblock=='function')
opts.onUnblock(el,opts);};function bind(b,el,opts){var full=el==window,$el=$(el);if(!b&&(full&&!pageBlock||!full&&!$el.data('blockUI.isBlocked')))
return;if(!full)
$el.data('blockUI.isBlocked',b);if(!opts.bindEvents||(b&&!opts.showOverlay))
return;var events='mousedown mouseup keydown keypress';b?$(document).bind(events,opts,handler):$(document).unbind(events,handler);};function handler(e){if(e.keyCode&&e.keyCode==9){if(pageBlock&&e.data.constrainTabKey){var els=pageBlockEls;var fwd=!e.shiftKey&&e.target==els[els.length-1];var back=e.shiftKey&&e.target==els[0];if(fwd||back){setTimeout(function(){focus(back)},10);return false;}}}
if($(e.target).parents('div.blockMsg').length>0)
return true;return $(e.target).parents().children().filter('div.blockUI').length==0;};function focus(back){if(!pageBlockEls)
return;var e=pageBlockEls[back===true?pageBlockEls.length-1:0];if(e)
e.focus();};function center(el,x,y){var p=el.parentNode,s=el.style;var l=((p.offsetWidth-el.offsetWidth)/2)-sz(p,'borderLeftWidth');var t=((p.offsetHeight-el.offsetHeight)/2)-sz(p,'borderTopWidth');if(x)s.left=l>0?(l+'px'):'0';if(y)s.top=t>0?(t+'px'):'0';};function sz(el,p){return parseInt($.css(el,p))||0;};})(Nx.$);
﻿;(function($){$.fn.xaseTabs=function(userOptions){var $t=$(this);var userOptions=userOptions||{};var setup=customEvents;if(typeof(userOptions.extend)==='function'){var copyCustomEvents=$.extend(true,{},customEvents);setup=userOptions.extend(copyCustomEvents)||setup;}
var options=$.extend({},$.fn.xaseTabs.defaults,userOptions);$t.unbind('.'+options.namespace);for(customEvent in setup){var $self=$t;if(setup[customEvent]instanceof Array){for(var i=0;i<setup[customEvent].length;i++){setup[customEvent][i].call($self,options);}}else{setup[customEvent].call($self,options);}}
if(options.autoInitialize){$t.trigger("initialize."+options.namespace);}};$.xaseTabs={extend:function(extend){if(typeof(extend)!=='function'){return;}
var copyCustomEvents=$.extend(true,{},customEvents);var userCustomEvents=extend(copyCustomEvents)||customEvents;customEvents=$.extend(customEvents,userCustomEvents);}};$.fn.xaseTabs.defaults={namespace:'xaseTabs',tabTarget:'li',panelTarget:'~ div',activeAttribute:'selected',activeClass:'active',triggerEvent:'click',hashAttribute:'.',autoInitialize:true,triggerTabsOnStart:true,extend:null};var customEvents={initialize:[function(options){this.bind("initialize."+options.namespace,function(e){if(e.isDefaultPrevented()||e.isPropagationStopped()){return;}
var $t=$(this);var $tabs;var $panels;if(typeof(options.tabTarget)==='object'||typeof(options.tabTarget)==='array'){$tabs=$(options.tabTarget);}else if(typeof(options.tabTarget)==='string'){$tabs=$(options.tabTarget,$t);}
if(typeof(options.panelTarget)==='object'||typeof(options.panelTarget)==='array'){$panels=$(options.panelTarget);}else if(typeof(options.panelTarget)==='string'){$panels=$(options.panelTarget,$t);}
var $selected=$tabs.filter('.'+options.activeClass).eq(0);$t.data('$panels',$panels).data('$tabs',$tabs);$t.trigger("setupPanels."+options.namespace);$t.trigger('setupTabs.'+options.namespace);var hash=window.location.hash.split(options.namespace);if($.isArray(hash)){for(var i=hash.length-1;i>0;i--){var module=hash[i].split('-');if($t.is(options.hashAttribute+module[0])){$selected=$(this).data('$tabs').removeClass(options.activeClass).eq(module[1]-1).addClass(options.activeClass);}}}
$selected=$selected.length<1?$tabs.filter("["+options.activeAttribute+"="+options.activeAttribute+"]").eq(0):$selected;if($selected.length<1){$selected=$tabs.eq(0);}
if($selected.length>0&&options.triggerTabsOnStart){$t.trigger("activate."+options.namespace,$selected);}});}],setupPanels:[function(options){this.bind("setupPanels."+options.namespace,function(e){if(e.isDefaultPrevented()||e.isPropagationStopped()){return;}
var $t=$(this);var $tabs=$t.data('$tabs');var $panels=$t.data('$panels');$tabs.each(function(i){var $panel=$panels.eq(i);if($panel.length<1){$panel=$panels.eq(0);}
$(this).data('$panel',$panel);});});}],setupTabs:[function(options){this.bind("setupTabs."+options.namespace,function(e){if(e.isDefaultPrevented()||e.isPropagationStopped()){return;}
var $t=$(this);var $tabs=$t.data('$tabs');$tabs.unbind('.'+options.namespace).bind(options.triggerEvent+"."+options.namespace,function(e){$t.trigger("activate."+options.namespace,$(this).get(0));return false;});});}],activate:[function(options){this.bind("activate."+options.namespace,function(e,selected){if(e.isDefaultPrevented()||e.isPropagationStopped()){return;}
var $selected=$(selected)||{};if($selected.length<1){return;}
var $t=$(this);var $panel=$selected.data('$panel');var $panels=$t.data('$panels');var $tabs=$t.data('$tabs');$panels.hide();$tabs.removeClass(options.activeClass);$panel.show();$selected.addClass(options.activeClass);return false;});}]};})(Nx.$);
(function($){Nx.Utils.Overlay={show:function(url,$container,dataSelector,options,callback){callback=callback||null;url=url||null;options=options||null;var defaults=$.extend({css:{color:'#333',cursor:'pointer',border:'none',overflow:'hidden',top:'50px',maxHeight:'515',width:'733px',background:'transparent'},overlayCSS:{opacity:0.9}},options);if(url){$.blockUI($.extend(defaults,{message:'<div style="padding:100px 0 0 350px;height:50px;width:50px;"><img alt="" src="/sites/all/themes/theatersg/img/ajax-loader-big.gif" /></div>'}));$.get(url,function(data){$.unblockUI();$container.html($(dataSelector,$(data)));$.blockUI($.extend(defaults,{message:$container,onBlock:function(){if($.isFunction(callback)){callback();}}}));});}
else{$.blockUI($.extend(defaults,{message:$container,onBlock:function(){if($.isFunction(callback)){callback();}}}));}},hide:function($container){$.unblockUI({onUnblock:function(){$container.hide();},fadeOut:0});}};})(Nx.$);
(function($){Nx.Module.Event=function($ctx,sandbox,modId){Nx.Module.call(this,$ctx,sandbox,modId);};Nx.Module.Event.prototype=new Nx.Module();Nx.Module.Event.prototype.constructor=Nx.Module.Event;$.extend(Nx.Module.Event.prototype,{onBinding:function(){var that=this;var overlayApplication;var $iframe;var $tabs=$('.tabs',this.$ctx);$tabs.xaseTabs({tabTarget:'li a'});$('.buy',this.$ctx).bind('click',function(){$('li:last a',$tabs).trigger('click');return false;});var $shopBox=$('.shopBox');$('.eventTabs .shop',this.$ctx).click(function(){$('.modMedia',that.$ctx).slideUp('fast');var shopUrl=$(this).attr('data-shopurl');if($('iframe',that.$ctx).length===0){var $iframe=$('<iframe scrolling="no" frameborder="no" src="'+shopUrl+'"></iframe>');$('.shopContent',that.$ctx).append($iframe);$iframe.load(function(){$('.loading',that.$ctx).hide();});}
$(document).scrollTop(0);return false;});$('.eventTabs a:not(.shop)',this.$ctx).click(function(){$('.modMedia',that.$ctx).slideDown('fast');return false;});if(window.location.hash==='#tickets'){$('li:last a',$tabs).trigger('click');}}});})(Nx.$);
(function($){Nx.Module.EventChoose=function($ctx,sandbox,modId){Nx.Module.call(this,$ctx,sandbox,modId);};Nx.Module.EventChoose.prototype=new Nx.Module();Nx.Module.EventChoose.prototype.constructor=Nx.Module.EventChoose;$.extend(Nx.Module.EventChoose.prototype,{onBinding:function(){var that=this;var dateToggles=function($ctx){$('.toggle',$ctx).each(function(i){var $t=$(this).show();var $toggles=$('span',$t);var $dates=$t.next().hide();$toggles.click(function(e){$toggles.toggle();$dates.slideToggle();}).eq(0).show();});};dateToggles(that.$ctx);$('.accordion',this.$ctx).accordion({active:false,autoHeight:false,collapsible:true,changestart:function(event,ui){var $loader=$('.loading',$('.ui-accordion-content-active',that.$ctx));$loader.show();var $clicked=$('.ui-state-active',that.$ctx);var url=$clicked.attr('data-url');if($loader.length>0){$.ajax({url:url,type:"GET",dataType:"html",success:function(data){var $content=$('.view-content',$(data));var $headings=$('h3',$content);var $accContent=$clicked.next();var o=[];if($headings.length>0){o[o.length]='<ul class="tabNav">';var first=' class="first"';$('h3',$content).each(function(){var $this=$(this);o[o.length]='<li'+first+'><a href="#">'+$this.text()+'</a></li>';first='';});o[o.length]='</ul>';}
dateToggles($content);$accContent.html(o.join(''));$accContent.append($('.tabContent',$content));$('.tabNav',$accContent).xaseTabs({tabTarget:'li a'});}});}}});}});})(Nx.$);
(function($){Nx.Module.EventSearch=function($ctx,sandbox,modId){Nx.Module.call(this,$ctx,sandbox,modId);};Nx.Module.EventSearch.prototype=new Nx.Module();Nx.Module.EventSearch.prototype.constructor=Nx.Module.EventSearch;$.extend(Nx.Module.EventSearch.prototype,{onBinding:function(){var that=this;$('.day',this.$ctx).xaseDropDown();$('.month',this.$ctx).xaseDropDown({extend:function(customEvents){customEvents.select.unshift(function(options){this.bind("select."+options.namespace,function(e,selected){var $this=$(selected);var $row=$this.closest('.formRow');var text=$this.text();var year=parseInt(text.substring(text.length-2),10);if(year!==''){var $hidden=$('.year',$row);$hidden.attr('value','20'+year);}
var maxDay=$this.attr('data-days');var currentDay=parseInt($('.day .options li.selected',$row).text(),10);if(!isNaN(currentDay)&&currentDay>maxDay){$('.day .options li:eq('+maxDay+')',$row).trigger('click');}});});return customEvents;}});$('form',this.$ctx).bind('submit',function(){$('.month .options li.selected',this.$ctx).trigger('click');});}});})(Nx.$);
(function($){Nx.Module.Searchresults=function($ctx,sandbox,modId){Nx.Module.call(this,$ctx,sandbox,modId);};Nx.Module.Searchresults.prototype=new Nx.Module();Nx.Module.Searchresults.prototype.constructor=Nx.Module.Searchresults;$.extend(Nx.Module.Searchresults.prototype,{onBinding:function(){var that=this;var dateToggles=function($ctx){$('.toggle',$ctx).each(function(i){var $t=$(this).show();var $toggles=$('span',$t);var $dates=$t.next().hide();$toggles.click(function(e){$toggles.toggle();$dates.slideToggle();}).eq(0).show();});}
dateToggles(that.$ctx);}});})(Nx.$);
(function($){Nx.Module.SubNavigation=function($ctx,sandbox,modId){Nx.Module.call(this,$ctx,sandbox,modId);};Nx.Module.SubNavigation.prototype=new Nx.Module();Nx.Module.SubNavigation.prototype.constructor=Nx.Module.EventFilter;$.extend(Nx.Module.SubNavigation.prototype,{beforeBinding:function(callback){var $links=$('.hasChild > .nocontent',this.$ctx);this.$ctx.data('$links',$links);callback();},onBinding:function(){var that=this;var $ctx=this.$ctx;var $links=this.$ctx.data('$links');var $all=$('a',$ctx);$links.click(function(){$all.removeClass('active');$(this).addClass('active').next('ul').toggle();return false;});$('.active-trail',$ctx).parent().show();}});})(Nx.$);
(function($){Nx.Module.Teaser=function($ctx,sandbox,modId){Nx.Module.call(this,$ctx,sandbox,modId);};Nx.Module.Teaser.prototype=new Nx.Module();Nx.Module.Teaser.prototype.constructor=Nx.Module.Teaser;$.extend(Nx.Module.Teaser.prototype,{onBinding:function(){$('.bd',this.$ctx).click(function(){var link=$(this).attr('data-link');if(link){window.location.href=link;}});$('a',this.$ctx).bind('click',function(e){e.stopPropagation();});if($('.hover',this.$ctx).length>0){$('.bd',this.$ctx).hover(function(){$(this).addClass('over');},function(){$(this).removeClass('over');});}}});})(Nx.$);
(function($){Nx.Module.Profile=function($ctx,sandbox,modId){Nx.Module.call(this,$ctx,sandbox,modId);};Nx.Module.Profile.prototype=new Nx.Module();Nx.Module.Profile.prototype.constructor=Nx.Module.Profile;$.extend(Nx.Module.Profile.prototype,{beforeBinding:function(callback){if($('.actorBox',this.$ctx).length===0){$('<div class="actorBox"></div>').appendTo(this.$ctx);}
callback();},onBinding:function(){var that=this;var $actorBox=$('.actorBox',that.$ctx);$('.actor',this.$ctx).click(function(){Nx.Utils.Overlay.show($(this).attr('href'),$actorBox,'.modProfile');return false;});$('.modProfile .closeLink',this.$ctx).live('click',function(){Nx.Utils.Overlay.hide($actorBox);return false;});}});})(Nx.$);
(function($){Nx.Module.Footer=function($ctx,sandbox,modId){Nx.Module.call(this,$ctx,sandbox,modId);};Nx.Module.Footer.prototype=new Nx.Module();Nx.Module.Footer.prototype.constructor=Nx.Module.EventFilter;$.extend(Nx.Module.Footer.prototype,{beforeBinding:function(callback){$('.print',this.$ctx).show();callback();},onBinding:function(){var that=this;var $ctx=this.$ctx;$('.print',$ctx).click(function(){window.print();});}});})(Nx.$);
(function($){Nx.Module.Media=function($ctx,sandbox,modId){Nx.Module.call(this,$ctx,sandbox,modId);};Nx.Module.Media.prototype=new Nx.Module();Nx.Module.Media.prototype.constructor=Nx.Module.Media;$.extend(Nx.Module.Media.prototype,{onBinding:function(){var that=this;var $mediaSlider=$(".mediaSlider",this.$ctx);if($('li',$mediaSlider).length>1){$mediaSlider.easySlider({continuous:false});}}});})(Nx.$);
(function($){Nx.Module.TheaterSubscription=function($ctx,sandbox,modId){Nx.Module.call(this,$ctx,sandbox,modId);};Nx.Module.TheaterSubscription.prototype=new Nx.Module();Nx.Module.TheaterSubscription.prototype.constructor=Nx.Module.EventChoose;$.extend(Nx.Module.TheaterSubscription.prototype,{onBinding:function(){var that=this;$('.accordion',this.$ctx).accordion({active:false,autoHeight:false,collapsible:true,changestart:function(event,ui){var $loader=$('.loading',$('.ui-accordion-content-active',that.$ctx));$loader.show();var $clicked=$('.ui-state-active',that.$ctx);var url=$clicked.attr('data-url');if($loader.length>0){$.ajax({url:url,type:"GET",dataType:"html",success:function(data){var $content=$('.view-content',$(data));var $headings=$('h3',$content);var $accContent=$clicked.next();var o=[];if($headings.length>0){o[o.length]='<ul class="tabNav">';var first=' class="first"';$('h3',$content).each(function(){var $this=$(this);o[o.length]='<li'+first+'><a href="#">'+$this.text()+'</a></li>';first='';});o[o.length]='</ul>';}
$accContent.html(o.join(''));$accContent.append($('.tabContent',$content));$('.tabNav',$accContent).xaseTabs({tabTarget:'li a'});}});}}});}});})(Nx.$);
(function($){Nx.Module.EventChoose.Archive=function(parent){this.onBinding=function(){parent.onBinding();var $title=$('h1',this.$ctx);var $content=$('div.accContent',this.$ctx);var i=0;$title.click(function(){if(i==0){$title.addClass('ui-state-active');$content.slideDown('slow');i=1;}else{$title.removeClass('ui-state-active');$content.slideUp('slow');i=0;}});}};})(Nx.$);
(function($){Nx.Module.EventChoose.DropDown=function(parent){this.onBinding=function(){parent.onBinding();var that=this;var $ctx=this.$ctx;var setupOptionsAddMetadata=function(options){this.bind("setupOptions."+options.namespace,function(e){if(e.isDefaultPrevented()||typeof(options.subtitle)!=='object'){return;}
var d=0;$(this).children().each(function(i){var $t=$(this);var $option=$t.data('$option');if($t.val()){if(options.subtitle[i-d]){$option.append('<span class="subtitle">('+options.subtitle[i-d]+')</span>');}}else{d++;}});});};var setupOptionsAjaxTargets=function(options){this.bind("setupOptions."+options.namespace,function(e){if(e.isDefaultPrevented()){return;}
var $t=$(this);var $ajaxTargets;if(typeof(options.ajaxTarget)=='object'){$ajaxTargets=options.ajaxTarget;}else{$ajaxTargets=$(options.ajaxTarget,$t).hide();}
$t.data('$ajaxTargets',$ajaxTargets);var d=0;$t.children().each(function(i){var $t=$(this);if($t.val()){$t.data('$ajaxTarget',$ajaxTargets.eq(i-d));}else{d++;}});});};var selectShowAjaxTarget=function(options){this.bind("select."+options.namespace,function(e,selected){if(e.isDefaultPrevented()){return;}
var $t=$(this);var $selected=$(selected);var $ajaxTarget=$selected.data('$ajaxTarget');$t.data('$ajaxTargets').hide();if($ajaxTarget){$selected.data('$ajaxTarget').show();}});};var selectToggleTitle=function(options){this.bind("select."+options.namespace,function(e,selected){if(e.isDefaultPrevented()){return;}
if(!$(selected).data('$ajaxTarget')){options.$title.hide();return;}
options.$title.show();});};var selectRedirectToEvent=function(options){this.bind("select."+options.namespace,function(e,selected){if(e.isDefaultPrevented()||$(this).data('$options').find('.selected').length<1){return;}
var href=$(selected).val();if(href){window.location.href=href;e.preventDefault();}});};var selectLoadAjax=function(options){this.bind("select."+options.namespace,function(e,selected){if(e.isDefaultPrevented()){return;}
var $t=$(this);var $selected=$(selected);var $ajaxTarget=$selected.data('$ajaxTarget');var href=$selected.val();$t.data('$ajaxTargets').hide();if(!$ajaxTarget||!href){return;}
$ajaxTarget.show();$.ajax({type:"GET",cache:false,url:'/spielplan/'+href,dataTypeString:'html',error:function(XMLHttpRequest,textStatus,errorThrown){},success:function(data){var $content=$('.modEventChoose',$(data));$ajaxTarget.removeClass('loading');if($content.length>1){var $subcatSelect=$('<select><option value="">Reihe wählen</option></select>');var $eventSelects=$('<div class="eventSelects"><h2>Veranstaltung</h2></div>');var subtitle=[];$('.bd > h3',$content).each(function(i){var $t=$(this);subtitle[i]=[];$subcatSelect.append($('<option value="'+i+'">'+$t.text()+'</option>'));var $events=$t.next().children('.event');var $eventSelect=$('<select class="eventSelect eventSelect'+i+'"><option value="">Veranstaltung wählen</option></select>');$events.each(function(j){var $t=$(this);var title=$('h4',$t).text();var href=$('h4 a',$t).attr('href');subtitle[i][j]=$('h5',$t).text();$eventSelect.append($('<option value="'+href+'">'+title+'</option>'));});$eventSelects.append($eventSelect);});$ajaxTarget.html($subcatSelect).prepend('<h2>Reihe</h2>').append($eventSelects);$('.eventSelects select',$ajaxTarget).each(function(i){$(this).xaseDropDown({subtitle:subtitle[i],extend:function(customEvents){customEvents.setupOptions.push(setupOptionsAddMetadata);customEvents.select.unshift(selectRedirectToEvent);return customEvents;}});});$('select:eq(0)',$ajaxTarget).xaseDropDown({ajaxTarget:$('.eventSelects > ul',$ajaxTarget),$title:$('.eventSelects h2',$ajaxTarget),extend:function(customEvents){customEvents.setupOptions.unshift(setupOptionsAjaxTargets);customEvents.select.unshift(selectToggleTitle);customEvents.select.unshift(selectShowAjaxTarget);return customEvents;}});}else{var $events=$('.tabContent .event',$content);var $eventSelect=$('<select class="eventSelect"><option value="">Veranstaltung wählen</option></select>');var subtitle=[];$events.each(function(i){var $t=$(this);var title=$('h4',$t).text();var href=$('h4 a',$t).attr('href');subtitle[i]=$('h5',$t).text();$eventSelect.append($('<option value="'+href+'">'+title+'</option>'));});$ajaxTarget.html($eventSelect).prepend('<h2>Veranstaltung</h2>');$('select',$ajaxTarget).xaseDropDown({subtitle:subtitle,extend:function(customEvents){customEvents.setupOptions.push(setupOptionsAddMetadata);customEvents.select.unshift(selectRedirectToEvent);return customEvents;}});}}});});};var xaseDropDownExtension=function(customEvents){customEvents.setupOptions.unshift(setupOptionsAjaxTargets);customEvents.select.unshift(selectLoadAjax);return customEvents;};$('select',this.$ctx).xaseDropDown({ajaxTarget:'~ div',extend:xaseDropDownExtension});};};})(Nx.$);
