/* Create Export file on the fly... */
var Nx=Nx||{};Nx.$=jQuery;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.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.modules.length;$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){var that=this;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);if(that.config.debug){throw ex;}}};}(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.dependencyCounter.beforeBinding++;this.dependencies();this.dependencyCounter.beforeBinding--;}
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.sandbox.readyForAfterBinding(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=[];this.afterBindingCallbacks=[];};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);}},readyForAfterBinding:function(callback){this.afterBindingCallbacks.push(callback);if(this.application.modules.length==this.afterBindingCallbacks.length){for(var i=0;i<this.afterBindingCallbacks.length;i++){this.afterBindingCallbacks[i]();}}},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.modId===component.modId&&this.components[j].role==='Master'){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.$);
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(){}};})(jQuery);
(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.$);
if(jQuery.ui){(function(d){d.widget("ui.slider",d.ui.mouse,{widgetEventPrefix:"slide",options:{animate:false,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null},_create:function(){var b=this,a=this.options;this._mouseSliding=this._keySliding=false;this._animateOff=true;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all");a.disabled&&this.element.addClass("ui-slider-disabled ui-disabled");this.range=d([]);if(a.range){if(a.range===true){this.range=d("<div></div>");if(!a.values)a.values=[this._valueMin(),this._valueMin()];if(a.values.length&&a.values.length!==2)a.values=[a.values[0],a.values[0]]}else this.range=d("<div></div>");this.range.appendTo(this.element).addClass("ui-slider-range");if(a.range==="min"||a.range==="max")this.range.addClass("ui-slider-range-"+a.range);this.range.addClass("ui-widget-header")}d(".ui-slider-handle",this.element).length===0&&d("<a href='#'></a>").appendTo(this.element).addClass("ui-slider-handle");if(a.values&&a.values.length)for(;d(".ui-slider-handle",this.element).length<a.values.length;)d("<a href='#'></a>").appendTo(this.element).addClass("ui-slider-handle");this.handles=d(".ui-slider-handle",this.element).addClass("ui-state-default ui-corner-all");this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(c){c.preventDefault()}).hover(function(){a.disabled||d(this).addClass("ui-state-hover")},function(){d(this).removeClass("ui-state-hover")}).focus(function(){if(a.disabled)d(this).blur();else{d(".ui-slider .ui-state-focus").removeClass("ui-state-focus");d(this).addClass("ui-state-focus")}}).blur(function(){d(this).removeClass("ui-state-focus")});this.handles.each(function(c){d(this).data("index.ui-slider-handle",c)});this.handles.keydown(function(c){var e=true,f=d(this).data("index.ui-slider-handle"),h,g,i;if(!b.options.disabled){switch(c.keyCode){case d.ui.keyCode.HOME:case d.ui.keyCode.END:case d.ui.keyCode.PAGE_UP:case d.ui.keyCode.PAGE_DOWN:case d.ui.keyCode.UP:case d.ui.keyCode.RIGHT:case d.ui.keyCode.DOWN:case d.ui.keyCode.LEFT:e=false;if(!b._keySliding){b._keySliding=true;d(this).addClass("ui-state-active");h=b._start(c,f);if(h===false)return}break}i=b.options.step;h=b.options.values&&b.options.values.length?(g=b.values(f)):(g=b.value());switch(c.keyCode){case d.ui.keyCode.HOME:g=b._valueMin();break;case d.ui.keyCode.END:g=b._valueMax();break;case d.ui.keyCode.PAGE_UP:g=b._trimAlignValue(h+(b._valueMax()-b._valueMin())/5);break;case d.ui.keyCode.PAGE_DOWN:g=b._trimAlignValue(h-(b._valueMax()-b._valueMin())/5);break;case d.ui.keyCode.UP:case d.ui.keyCode.RIGHT:if(h===b._valueMax())return;g=b._trimAlignValue(h+i);break;case d.ui.keyCode.DOWN:case d.ui.keyCode.LEFT:if(h===b._valueMin())return;g=b._trimAlignValue(h-i);break}b._slide(c,f,g);return e}}).keyup(function(c){var e=d(this).data("index.ui-slider-handle");if(b._keySliding){b._keySliding=false;b._stop(c,e);b._change(c,e);d(this).removeClass("ui-state-active")}});this._refreshValue();this._animateOff=false;var o=this.options;this.handles.each(function(c){o.create({handle:this,value:o.value})});},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");this._mouseDestroy();return this},_mouseCapture:function(b){var a=this.options,c,e,f,h,g;if(a.disabled)return false;this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();c=this._normValueFromMouse({x:b.pageX,y:b.pageY});e=this._valueMax()-this._valueMin()+1;h=this;this.handles.each(function(i){var j=Math.abs(c-h.values(i));if(e>j){e=j;f=d(this);g=i}});if(a.range===true&&this.values(1)===a.min){g+=1;f=d(this.handles[g])}if(this._start(b,g)===false)return false;this._mouseSliding=true;h._handleIndex=g;f.addClass("ui-state-active").focus();a=f.offset();this._clickOffset=!d(b.target).parents().andSelf().is(".ui-slider-handle")?{left:0,top:0}:{left:b.pageX-a.left-f.width()/2,top:b.pageY-a.top-f.height()/2-(parseInt(f.css("borderTopWidth"),10)||0)-(parseInt(f.css("borderBottomWidth"),10)||0)+(parseInt(f.css("marginTop"),10)||0)};this.handles.hasClass("ui-state-hover")||this._slide(b,g,c);return this._animateOff=true},_mouseStart:function(){return true},_mouseDrag:function(b){var a=this._normValueFromMouse({x:b.pageX,y:b.pageY});this._slide(b,this._handleIndex,a);return false},_mouseStop:function(b){this.handles.removeClass("ui-state-active");this._mouseSliding=false;this._stop(b,this._handleIndex);this._change(b,this._handleIndex);this._clickOffset=this._handleIndex=null;return this._animateOff=false},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(b){var a;if(this.orientation==="horizontal"){a=this.elementSize.width;b=b.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{a=this.elementSize.height;b=b.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}a=b/a;if(a>1)a=1;if(a<0)a=0;if(this.orientation==="vertical")a=1-a;b=this._valueMax()-this._valueMin();return this._trimAlignValue(this._valueMin()+a*b)},_start:function(b,a){var c={handle:this.handles[a],value:this.value()};if(this.options.values&&this.options.values.length){c.value=this.values(a);c.values=this.values()}return this._trigger("start",b,c)},_slide:function(b,a,c){var e;if(this.options.values&&this.options.values.length){e=this.values(a?0:1);if(this.options.values.length===2&&this.options.range===true&&(a===0&&c>e||a===1&&c<e))c=e;if(c!==this.values(a)){e=this.values();e[a]=c;b=this._trigger("slide",b,{handle:this.handles[a],value:c,values:e});this.values(a?0:1);b!==false&&this.values(a,c,true)}}else{this.value();b=this._trigger("slide",b,{handle:this.handles[a],value:c});b!==false&&this.value(c)}},_stop:function(b,a){var c={handle:this.handles[a],value:this.value()};if(this.options.values&&this.options.values.length){c.value=this.values(a);c.values=this.values()}this._trigger("stop",b,c);this.handles[a].blur()},_change:function(b,a){if(!this._keySliding&&!this._mouseSliding){var c={handle:this.handles[a],value:this.value()};if(this.options.values&&this.options.values.length){c.value=this.values(a);c.values=this.values()}this._trigger("change",b,c)}},value:function(b){if(arguments.length){this.options.value=this._trimAlignValue(b);this._refreshValue();this._change(null,0)}return this._value()},values:function(b,a){var c,e,f;if(arguments.length>1){this.options.values[b]=this._trimAlignValue(a);this._refreshValue();this._change(null,b)}if(arguments.length)if(d.isArray(arguments[0])){c=this.options.values;e=arguments[0];for(f=0;f<c.length;f+=1){c[f]=this._trimAlignValue(e[f]);this._change(null,f)}this._refreshValue()}else return this.options.values&&this.options.values.length?this._values(b):this.value();else return this._values()},_setOption:function(b,a){var c,e=0;if(d.isArray(this.options.values))e=this.options.values.length;d.Widget.prototype._setOption.apply(this,arguments);switch(b){case"disabled":if(a){this.handles.filter(".ui-state-focus").blur();this.handles.removeClass("ui-state-hover");this.handles.attr("disabled","disabled");this.element.addClass("ui-disabled")}else{this.handles.removeAttr("disabled");this.element.removeClass("ui-disabled")}break;case"orientation":this._detectOrientation();this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);this._refreshValue();break;case"value":this._animateOff=true;this._refreshValue();this._change(null,0);this._animateOff=false;break;case"values":this._animateOff=true;this._refreshValue();for(c=0;c<e;c+=1)this._change(null,c);this._animateOff=false;break}},_value:function(){var b=this.options.value;return b=this._trimAlignValue(b)},_values:function(b){var a,c;if(arguments.length){a=this.options.values[b];return a=this._trimAlignValue(a)}else{a=this.options.values.slice();for(c=0;c<a.length;c+=1)a[c]=this._trimAlignValue(a[c]);return a}},_trimAlignValue:function(b){if(b<=this._valueMin())return this._valueMin();if(b>=this._valueMax())return this._valueMax();var a=this.options.step>0?this.options.step:1,c=(b-this._valueMin())%a;alignValue=b-c;if(Math.abs(c)*2>=a)alignValue+=c>0?a:-a;return parseFloat(alignValue.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var b=this.options.range,a=this.options,c=this,e=!this._animateOff?a.animate:false,f,h={},g,i,j,l;if(this.options.values&&this.options.values.length)this.handles.each(function(k){f=(c.values(k)-c._valueMin())/(c._valueMax()-c._valueMin())*100;h[c.orientation==="horizontal"?"left":"bottom"]=f+"%";d(this).stop(1,1)[e?"animate":"css"](h,a.animate);if(c.options.range===true)if(c.orientation==="horizontal"){if(k===0)c.range.stop(1,1)[e?"animate":"css"]({left:f+"%"},a.animate);if(k===1)c.range[e?"animate":"css"]({width:f-g+"%"},{queue:false,duration:a.animate})}else{if(k===0)c.range.stop(1,1)[e?"animate":"css"]({bottom:f+"%"},a.animate);if(k===1)c.range[e?"animate":"css"]({height:f-g+"%"},{queue:false,duration:a.animate})}g=f});else{i=this.value();j=this._valueMin();l=this._valueMax();f=l!==j?(i-j)/(l-j)*100:0;h[c.orientation==="horizontal"?"left":"bottom"]=f+"%";this.handle.stop(1,1)[e?"animate":"css"](h,a.animate);if(b==="min"&&this.orientation==="horizontal")this.range.stop(1,1)[e?"animate":"css"]({width:f+"%"},a.animate);if(b==="max"&&this.orientation==="horizontal")this.range[e?"animate":"css"]({width:100-f+"%"},{queue:false,duration:a.animate});if(b==="min"&&this.orientation==="vertical")this.range.stop(1,1)[e?"animate":"css"]({height:f+"%"},a.animate);if(b==="max"&&this.orientation==="vertical")this.range[e?"animate":"css"]({height:100-f+"%"},{queue:false,duration:a.animate})}}});d.extend(d.ui.slider,{version:"1.8.9"})})(jQuery);}
(function($){$.fn.carouFredSel=function(o){if(this.length>1){return this.each(function(){$(this).carouFredSel(o);});}
this.init=function(o){if(typeof(o)!='object')o={};if(typeof(o.scroll)=='number'){if(o.scroll<=50)o.scroll={items:o.scroll};else o.scroll={duration:o.scroll};}else{if(typeof(o.scroll)=='string')o.scroll={easing:o.scroll};}
if(typeof(o.items)=='number')o.items={visible:o.items};else if(typeof(o.items)=='string')o.items={width:o.items,height:o.items};opts=$.extend(true,{},$.fn.carouFredSel.defaults,o);opts.padding=getPadding(opts.padding);opts.usePadding=(opts.padding[0]==0&&opts.padding[1]==0&&opts.padding[2]==0&&opts.padding[3]==0)?false:true;direction=(opts.direction=='up'||opts.direction=='left')?'next':'prev';if(opts.direction=='right'||opts.direction=='left'){opts.dimentions=['width','outerWidth','height','outerHeight','left','top','marginRight'];}else{opts.dimentions=['height','outerHeight','width','outerWidth','top','left','marginBottom'];opts.padding=[opts.padding[3],opts.padding[2],opts.padding[1],opts.padding[0]];}
if(!opts.items.width)opts.items.width=getItems($cfs).outerWidth(true);if(!opts.items.height)opts.items.height=getItems($cfs).outerHeight(true);if(typeof(opts.items.minimum)!='number')opts.items.minimum=opts.items.visible;if(typeof(opts.scroll.items)!='number')opts.scroll.items=opts.items.visible;if(typeof(opts.scroll.duration)!='number')opts.scroll.duration=500;opts.auto=getNaviObject(opts.auto,false,true);opts.prev=getNaviObject(opts.prev);opts.next=getNaviObject(opts.next);opts.pagination=getNaviObject(opts.pagination,true);opts.auto=$.extend({},opts.scroll,opts.auto);opts.prev=$.extend({},opts.scroll,opts.prev);opts.next=$.extend({},opts.scroll,opts.next);opts.pagination=$.extend({},opts.scroll,opts.pagination);if(typeof(opts.pagination.keys)!='boolean')opts.pagination.keys=false;if(typeof(opts.pagination.anchorBuilder)!='function')opts.pagination.anchorBuilder=$.fn.carouFredSel.pageAnchorBuilder;if(typeof(opts.auto.play)!='boolean')opts.auto.play=true;if(typeof(opts.auto.nap)!='boolean')opts.auto.nap=true;if(typeof(opts.auto.delay)!='number')opts.auto.delay=0;if(typeof(opts.auto.pauseDuration)!='number')opts.auto.pauseDuration=(opts.auto.duration<10)?2500:opts.auto.duration*5;};this.build=function(){$wrp.css({position:'relative',overflow:'hidden'});$cfs.data('cfs_origCss',{width:$cfs.css('width'),height:$cfs.css('height'),position:$cfs.css('position'),top:$cfs.css('top'),left:$cfs.css('left')}).css({position:'absolute'});if(opts.usePadding){getItems($cfs).each(function(){var m=parseInt($(this).css(opts.dimentions[6]));if(isNaN(m))m=0;$(this).data('cfs_origCssMargin',m);});}
showNavi(opts,totalItems);};this.bind_events=function(){$cfs.bind('pause',function(){if(autoTimeout!=null){clearTimeout(autoTimeout);}
if(autoInterval!=null){clearInterval(autoInterval);}}).bind('play',function(e,d,f,p){$cfs.trigger('pause');if(opts.auto.play){if(d!='prev'&&d!='next')d=direction;if(typeof(f)!='number')f=0;autoTimeout=setTimeout(function(){if($cfs.is(':animated')){$cfs.trigger('play',d);}else{pauseTimePassed=0;$cfs.trigger(d,opts.auto);}},opts.auto.pauseDuration+f-pauseTimePassed);if(opts.auto.pauseOnHover==='resume'){autoInterval=setInterval(function(){pauseTimePassed+=100;},100);}}}).bind('prev',function(e,sO,nI){if($cfs.is(':animated'))return false;if(opts.items.minimum>=totalItems){return false;}
if(typeof(sO)=='number')nI=sO;if(typeof(sO)!='object')sO=opts.prev;if(typeof(nI)!='number')nI=sO.items;if(typeof(nI)!='number'){return false;}
if(!opts.circular){var nulItem=totalItems-firstItem;if(nulItem-nI<0){nI=nulItem;}
if(firstItem==0){nI=0;}}
firstItem+=nI;if(firstItem>=totalItems)firstItem-=totalItems;if(!opts.circular&&!opts.infinite){if(firstItem==0&&opts.prev.button)opts.prev.button.addClass('disabled');if(opts.next.button)opts.next.button.removeClass('disabled');}
if(nI==0){if(opts.infinite)$cfs.trigger('next',totalItems-opts.items.visible);return false;}
getItems($cfs,':gt('+(totalItems-nI-1)+')').prependTo($cfs);if(totalItems<opts.items.visible+nI)getItems($cfs,':lt('+((opts.items.visible+nI)-totalItems)+')').clone(true).appendTo($cfs);var c_itm=getCurrentItems($cfs,opts,nI),l_cur=getItems($cfs,':nth('+(nI-1)+')'),l_old=c_itm[1].filter(':last'),l_new=c_itm[0].filter(':last');if(opts.usePadding)l_old.css(opts.dimentions[6],l_old.data('cfs_origCssMargin'));var i_siz=getSizes(opts,getItems($cfs,':lt('+nI+')')),w_siz=mapWrapperSizes(getSizes(opts,c_itm[0],true),opts);if(opts.usePadding)l_old.css(opts.dimentions[6],l_old.data('cfs_origCssMargin')+opts.padding[1]);var a_cfs={},a_new={},a_cur={},a_dur=sO.duration;if(a_dur=='auto')a_dur=opts.scroll.duration/opts.scroll.items*nI;else if(a_dur<=0)a_dur=0;else if(a_dur<10)a_dur=i_siz[0]/a_dur;if(sO.onBefore)sO.onBefore(c_itm[1],c_itm[0],w_siz,a_dur);if(opts.usePadding){var new_m=opts.padding[3];a_cur[opts.dimentions[6]]=l_cur.data('cfs_origCssMargin');a_new[opts.dimentions[6]]=l_new.data('cfs_origCssMargin')+opts.padding[1];l_cur.css(opts.dimentions[6],l_cur.data('cfs_origCssMargin')+opts.padding[3]);l_cur.stop().animate(a_cur,{duration:a_dur,easing:sO.easing});l_new.stop().animate(a_new,{duration:a_dur,easing:sO.easing});}else{var new_m=0;}
a_cfs[opts.dimentions[4]]=new_m;if((typeof(opts[opts.dimentions[0]])!='number'&&typeof(opts.items[opts.dimentions[0]])!='number')||(typeof(opts[opts.dimentions[2]])!='number'&&typeof(opts.items[opts.dimentions[2]])!='number')){$wrp.stop().animate(w_siz,{duration:a_dur,easing:sO.easing});}
$cfs.data('cfs_numItems',nI).data('cfs_slideObj',sO).data('cfs_oldItems',c_itm[1]).data('cfs_newItems',c_itm[0]).data('cfs_wrapSize',w_siz).css(opts.dimentions[4],-i_siz[0]).animate(a_cfs,{duration:a_dur,easing:sO.easing,complete:function(){if($cfs.data('cfs_slideObj').onAfter){$cfs.data('cfs_slideObj').onAfter($cfs.data('cfs_oldItems'),$cfs.data('cfs_newItems'),$cfs.data('cfs_wrapSize'));}
if(totalItems<opts.items.visible+$cfs.data('cfs_numItems')){getItems($cfs,':gt('+(totalItems-1)+')').remove();}
var l_itm=getItems($cfs,':nth('+(opts.items.visible+$cfs.data('cfs_numItems')-1)+')');if(opts.usePadding){l_itm.css(opts.dimentions[6],l_itm.data('cfs_origCssMargin'));}}});$cfs.trigger('updatePageStatus').trigger('play',['',a_dur]);}).bind('next',function(e,sO,nI){if($cfs.is(':animated'))return false;if(opts.items.minimum>=totalItems){return false;}
if(typeof(sO)=='number')nI=sO;if(typeof(sO)!='object')sO=opts.next;if(typeof(nI)!='number')nI=sO.items;if(typeof(nI)!='number'){return false;}
if(!opts.circular){if(firstItem==0){if(nI>totalItems-opts.items.visible){nI=totalItems-opts.items.visible;}}else{if(firstItem-nI<opts.items.visible){nI=firstItem-opts.items.visible;}}}
firstItem-=nI;if(firstItem<0)firstItem+=totalItems;if(!opts.circular&&!opts.infinite){if(firstItem==opts.items.visible&&opts.next.button)opts.next.button.addClass('disabled');if(opts.prev.button)opts.prev.button.removeClass('disabled');}
if(nI==0){if(opts.infinite)$cfs.trigger('prev',totalItems-opts.items.visible);return false;}
if(totalItems<opts.items.visible+nI)getItems($cfs,':lt('+((opts.items.visible+nI)-totalItems)+')').clone(true).appendTo($cfs);var c_itm=getCurrentItems($cfs,opts,nI),l_cur=getItems($cfs,':nth('+(nI-1)+')'),l_old=c_itm[0].filter(':last'),l_new=c_itm[1].filter(':last');if(opts.usePadding){l_old.css(opts.dimentions[6],l_old.data('cfs_origCssMargin'));l_new.css(opts.dimentions[6],l_new.data('cfs_origCssMargin'));}
var i_siz=getSizes(opts,getItems($cfs,':lt('+nI+')')),w_siz=mapWrapperSizes(getSizes(opts,c_itm[1],true),opts);if(opts.usePadding){l_old.css(opts.dimentions[6],l_old.data('cfs_origCssMargin')+opts.padding[1]);l_new.css(opts.dimentions[6],l_new.data('cfs_origCssMargin')+opts.padding[1]);}
var a_cfs={},a_old={},a_cur={},a_dur=sO.duration;if(a_dur=='auto')a_dur=opts.scroll.duration/opts.scroll.items*nI;else if(a_dur<=0)a_dur=0;else if(a_dur<10)a_dur=i_siz[0]/a_dur;if(sO.onBefore)sO.onBefore(c_itm[0],c_itm[1],w_siz,a_dur);a_cfs[opts.dimentions[4]]=-i_siz[0];if(opts.usePadding){a_old[opts.dimentions[6]]=l_old.data('cfs_origCssMargin');a_cur[opts.dimentions[6]]=l_cur.data('cfs_origCssMargin')+opts.padding[3];l_new.css(opts.dimentions[6],l_new.data('cfs_origCssMargin')+opts.padding[1]);l_old.stop().animate(a_old,{duration:a_dur,easing:sO.easing});l_cur.stop().animate(a_cur,{duration:a_dur,easing:sO.easing});}
if((typeof(opts[opts.dimentions[0]])!='number'&&typeof(opts.items[opts.dimentions[0]])!='number')||(typeof(opts[opts.dimentions[2]])!='number'&&typeof(opts.items[opts.dimentions[2]])!='number')){$wrp.stop().animate(w_siz,{duration:a_dur,easing:sO.easing});}
$cfs.data('cfs_numItems',nI).data('cfs_slideObj',sO).data('cfs_oldItems',c_itm[0]).data('cfs_newItems',c_itm[1]).data('cfs_wrapSize',w_siz).animate(a_cfs,{duration:a_dur,easing:sO.easing,complete:function(){if($cfs.data('cfs_slideObj').onAfter){$cfs.data('cfs_slideObj').onAfter($cfs.data('cfs_oldItems'),$cfs.data('cfs_newItems'),$cfs.data('cfs_wrapSize'));}
if(totalItems<opts.items.visible+$cfs.data('cfs_numItems')){getItems($cfs,':gt('+(totalItems-1)+')').remove();}
var org_m=(opts.usePadding)?opts.padding[3]:0;$cfs.css(opts.dimentions[4],org_m);var l_itm=getItems($cfs,':lt('+$cfs.data('cfs_numItems')+')').appendTo($cfs).filter(':last');if(opts.usePadding){l_itm.css(opts.dimentions[6],l_itm.data('cfs_origCssMargin'));}}});$cfs.trigger('updatePageStatus').trigger('play',['',a_dur]);}).bind('slideTo',function(e,num,dev,org,obj){if($cfs.is(':animated'))return false;num=getItemIndex(num,dev,org,firstItem,totalItems,$cfs);if(num==0)return false;if(typeof(obj)!='object')obj=false;if(opts.circular){if(num<totalItems/2)$cfs.trigger('next',[obj,num]);else $cfs.trigger('prev',[obj,totalItems-num]);}else{if(firstItem==0||firstItem>num)$cfs.trigger('next',[obj,num]);else $cfs.trigger('prev',[obj,totalItems-num]);}}).bind('insertItem',function(e,itm,num,org,dev){if(typeof(itm)=='object'&&typeof(itm.jquery)=='undefined')itm=$(itm);if(typeof(itm)=='string')itm=$(itm);if(typeof(itm)!='object'||typeof(itm.jquery)=='undefined'||itm.length==0){return false;}
if(typeof(num)=='undefined'||num=='end'){$cfs.append(itm);}else{num=getItemIndex(num,dev,org,firstItem,totalItems,$cfs);var $cit=getItems($cfs,':nth('+num+')');if($cit.length){if(num<=firstItem)firstItem+=itm.length;$cit.before(itm);}else{$cfs.append(itm);}}
totalItems=getItems($cfs).length;link_anchors('','.caroufredsel',$cfs);setSizes($cfs,opts);showNavi(opts,totalItems);$cfs.trigger('updatePageStatus',true);}).bind('removeItem',function(e,num,org,dev){if(typeof(num)=='undefined'||num=='end'){getItems($cfs,':last').remove();}else{num=getItemIndex(num,dev,org,firstItem,totalItems,$cfs);var $cit=getItems($cfs,':nth('+num+')');if($cit.length){if(num<firstItem)firstItem-=$cit.length;$cit.remove();}}
totalItems=getItems($cfs).length;link_anchors('','.caroufredsel',$cfs);setSizes($cfs,opts);showNavi(opts,totalItems);$cfs.trigger('updatePageStatus',true);}).bind('updatePageStatus',function(e,bpa){bpa=true;if(!opts.pagination.container)return false;var curPage=(firstItem==0)?0:Math.round((totalItems-firstItem)/opts.items.visible);var numPages=Math.ceil(totalItems/opts.items.visible);if(typeof(bpa)=='boolean'&&bpa){getItems(opts.pagination.container).remove();for(var a=0;a<numPages;a++){opts.pagination.container.append(opts.pagination.anchorBuilder(a+1,curPage+1));}
getItems(opts.pagination.container).unbind('click').each(function(a){$(this).click(function(e){$cfs.trigger('slideTo',[a*opts.items.visible,0,true,opts.pagination]);e.preventDefault();});});};if(numPages>opts.pagerItems+1){if(curPage>(opts.pagerItems/2)+1){for(var i=1;i<curPage-opts.pagerItems/2&&i<numPages-opts.pagerItems;i++){$('a',opts.pagination.container).filter('a[data-nr="'+(i+1)+'"]').remove();}
$('a',opts.pagination.container).filter(':nth(0)').after('<span>&hellip;</span>')}
if(curPage<numPages-opts.pagerItems+1){var i=Math.max(curPage+Math.round(opts.pagerItems/2),opts.pagerItems);for(i;i<numPages-1;i++){$('a',opts.pagination.container).filter('a[data-nr="'+(i+1)+'"]').remove();}
$('a',opts.pagination.container).filter(':last-child').before('<span>&hellip;</span>')}}
opts.pagination.container.find('a:not(:last-child), span:not(:last-child)').after('<span class="sep">&#124;</span>');});if(opts.useScrollTo){$cfs.bind('scrollTo',function(e,a,b,c,d){$cfs.trigger('slideTo',[a,b,c,d]);});}};this.bind_buttons=function(){if(opts.auto.pauseOnHover&&opts.auto.play){$wrp.hover(function(){$cfs.trigger('pause');},function(){$cfs.trigger('play');});}
if(opts.prev.button){opts.prev.button.click(function(e){$cfs.trigger('prev');e.preventDefault();});if(opts.prev.pauseOnHover&&opts.auto.play){opts.prev.button.hover(function(){$cfs.trigger('pause');},function(){$cfs.trigger('play');});}
if(!opts.circular&&!opts.infinite){opts.prev.button.addClass('disabled');}}
if(opts.next.button){opts.next.button.click(function(e){$cfs.trigger('next');e.preventDefault();});if(opts.next.pauseOnHover&&opts.auto.play){opts.next.button.hover(function(){$cfs.trigger('pause');},function(){$cfs.trigger('play');})}}
if(opts.pagination.container){$cfs.trigger('updatePageStatus',true);if(opts.pagination.pauseOnHover&&opts.auto.play){opts.pagination.container.hover(function(){$cfs.trigger('pause');},function(){$cfs.trigger('play');});}}
if(opts.next.key||opts.prev.key){$(document).keyup(function(e){var k=e.keyCode;if(k==opts.next.key)$cfs.trigger('next');if(k==opts.prev.key)$cfs.trigger('prev');});}
if(opts.pagination.keys){$(document).keyup(function(e){var k=e.keyCode;if(k>=49&&k<58){k=(k-49)*opts.items.visible;if(k<=totalItems){$cfs.trigger('slideTo',[k,0,true,opts.pagination]);}}});}
if(opts.auto.play){$cfs.trigger('play',[direction,opts.auto.delay]);if($.fn.nap&&opts.auto.nap){$cfs.nap('pause','play');}}};this.destroy=function(){$cfs.css($cfs.data('cfs_origCss')).unbind('pause').unbind('play').unbind('prev').unbind('next').unbind('scrollTo').unbind('slideTo').unbind('insertItem').unbind('removeItem').unbind('updatePageStatus');$wrp.replaceWith($cfs);return this;};this.configuration=function(a,b){if(typeof(a)=='undefined')return opts;if(typeof(b)=='undefined'){var r=eval('opts.'+a);if(typeof(r)=='undefined')r='';return r;}
eval('opts.'+a+' = b');this.init(opts);setSizes($cfs,opts);return this;};this.link_anchors=function($c,se){link_anchors($c,se,$cfs);};var $cfs=$(this),$wrp=$(this).wrap('<div class="caroufredsel_wrapper" />').parent(),opts={},totalItems=getItems($cfs).length,firstItem=0,autoTimeout=null,autoInterval=null,pauseTimePassed=0,direction='next';this.init(o);this.build();this.bind_events();this.bind_buttons();link_anchors('','.caroufredsel',$cfs);setSizes($cfs,opts);if(opts.items.start!==0&&opts.items.start!==false){var s=opts.items.start;if(opts.items.start===true){s=window.location.hash;if(!s.length)s=0;}
$cfs.trigger('slideTo',[s,0,true,{duration:0}]);}
return this;};$.fn.carouFredSel.defaults={infinite:true,circular:true,direction:'left',padding:0,useScrollTo:true,pagerItems:5,items:{visible:5,start:0},scroll:{easing:'swing',pauseOnHover:false}};$.fn.carouFredSel.pageAnchorBuilder=function(nr,current){if(current===nr){return'<a class="selected" href="#" data-nr="'+nr+'"><span>'+nr+'</span></a>';}else{return'<a href="#" data-nr="'+nr+'"><span>'+nr+'</span></a>';}};function link_anchors($c,se,$cfs){if(typeof($c)=='undefined'||$c.length==0)$c=$('body');else if(typeof($c)=='string')$c=$($c);if(typeof($c)!='object')return false;if(typeof(se)=='undefined')se='';$c.find('a'+se).each(function(){var h=this.hash||'';if(h.length>0&&getItems($cfs).index($(h))!=-1){$(this).unbind('click').click(function(e){$cfs.trigger('slideTo',h);e.preventDefault();});}});}
function showNavi(o,t){if(o.items.minimum>=t){var f='hide';}else{var f='show';}
if(o.prev.button)o.prev.button[f]();if(o.next.button)o.next.button[f]();if(o.pagination.container)o.pagination.container[f]();}
function getKeyCode(k){if(k=='right')return 39;if(k=='left')return 37;if(k=='up')return 38;if(k=='down')return 40;return-1};function getNaviObject(obj,pagi,auto){if(typeof(pagi)!='boolean')pagi=false;if(typeof(auto)!='boolean')auto=false;if(typeof(obj)=='undefined')obj={};if(typeof(obj)=='string'){var temp=getKeyCode(obj);if(temp==-1)obj=$(obj);else obj=temp;}
if(pagi){if(typeof(obj.jquery)!='undefined')obj={container:obj};if(typeof(obj)=='boolean')obj={keys:obj};if(typeof(obj.container)=='string')obj.container=$(obj.container);}else if(auto){if(typeof(obj)=='boolean')obj={play:obj};if(typeof(obj)=='number')obj={pauseDuration:obj};}else{if(typeof(obj.jquery)!='undefined')obj={button:obj};if(typeof(obj)=='number')obj={key:obj};if(typeof(obj.button)=='string')obj.button=$(obj.button);if(typeof(obj.key)=='string')obj.key=getKeyCode(obj.key);}
return obj;};function getItems(a,f){if(typeof(f)!='string')f='';return $('> *'+f,a);};function getCurrentItems(c,o,n){var oi=getItems(c,':lt('+o.items.visible+')'),ni=getItems(c,':lt('+(o.items.visible+n)+'):gt('+(n-1)+')');return[oi,ni];};function getItemIndex(num,dev,org,firstItem,totalItems,$cfs){if(typeof(num)=='string'){if(isNaN(num))num=$(num);else num=parseInt(num);}
if(typeof(num)=='object'){if(typeof(num.jquery)=='undefined')num=$(num);num=getItems($cfs).index(num);if(num==-1)num=0;if(typeof(org)!='boolean')org=false;}else{if(typeof(org)!='boolean')org=true;}
if(isNaN(num))num=0;else num=parseInt(num);if(isNaN(dev))dev=0;else dev=parseInt(dev);if(org){num+=firstItem;}
num+=dev;while(num>=totalItems){num-=totalItems;}
while(num<0){num+=totalItems;}
return num;};function getSizes(o,$i,wrap){if(typeof(wrap)!='boolean')wrap=false;var di=o.dimentions,s1=0,s2=0;if(wrap&&typeof(o[di[0]])=='number')s1+=o[di[0]];else if(typeof(o.items[di[0]])=='number')s1+=o.items[di[0]]*$i.length;else{$i.each(function(){s1+=$(this)[di[1]](true);});}
if(wrap&&typeof(o[di[2]])=='number')s2+=o[di[2]];else if(typeof(o.items[di[2]])=='number')s2+=o.items[di[2]];else{$i.each(function(){var m=$(this)[di[3]](true);if(s2<m)s2=m;});}
return[s1,s2];};function mapWrapperSizes(ws,o){var pad=(o.usePadding)?o.padding:[0,0,0,0];var wra={};wra[o.dimentions[0]]=ws[0]+pad[1]+pad[3];wra[o.dimentions[2]]=ws[1]+pad[0]+pad[2];return wra;};function setSizes($c,o){var $w=$c.parent(),$i=getItems($c),$l=$i.filter(':nth('+(o.items.visible-1)+')'),is=getSizes(o,$i);$w.css(mapWrapperSizes(getSizes(o,$i.filter(':lt('+o.items.visible+')'),true),o));if(o.usePadding){$l.css(o.dimentions[6],$l.data('cfs_origCssMargin')+o.padding[1]);$c.css(o.dimentions[5],o.padding[0]);$c.css(o.dimentions[4],o.padding[3]);}
$c.css(o.dimentions[0],is[0]*2);$c.css(o.dimentions[2],is[1]);};function getPadding(p){if(typeof(p)=='number')p=[p];else if(typeof(p)=='string')p=p.split('px').join('').split(' ');if(typeof(p)!='object'){p=[0];}
for(i in p){p[i]=parseInt(p[i]);}
switch(p.length){case 0:return[0,0,0,0];case 1:return[p[0],p[0],p[0],p[0]];case 2:return[p[0],p[1],p[0],p[1]];case 3:return[p[0],p[1],p[2],p[1]];default:return p;}};function log(m){if(typeof(m)=='string')m='carouFredSel: '+m;if(window.console&&window.console.log)window.console.log(m);else try{console.log(m);}catch(err){}};$.fn.caroufredsel=function(o){this.carouFredSel(o);};})(jQuery);
jQuery.cookie=function(name,value,options){if(typeof value!='undefined'){options=options||{};if(value===null){value='';options.expires=-1;}
var expires='';if(options.expires&&(typeof options.expires=='number'||options.expires.toUTCString)){var date;if(typeof options.expires=='number'){date=new Date();date.setTime(date.getTime()+(options.expires*24*60*60*1000));}else{date=options.expires;}
expires='; expires='+date.toUTCString();}
var path=options.path?'; path='+(options.path):'';var domain=options.domain?'; domain='+(options.domain):'';var secure=options.secure?'; secure':'';document.cookie=[name,'=',encodeURIComponent(value),expires,path,domain,secure].join('');}else{var cookieValue=null;if(document.cookie&&document.cookie!=''){var cookies=document.cookie.split(';');for(var i=0;i<cookies.length;i++){var cookie=jQuery.trim(cookies[i]);if(cookie.substring(0,name.length+1)==(name+'=')){cookieValue=decodeURIComponent(cookie.substring(name.length+1));break;}}}
return cookieValue;}};
(function($){$.fn.equalHeights=function(minHeight,maxHeight){tallest=(minHeight)?minHeight:0;this.each(function(){var $this=$(this);if($this.outerHeight()>tallest){tallest=$this.outerHeight();}});if((maxHeight)&&tallest>maxHeight)tallest=maxHeight;return this.each(function(){var $this=$(this);var padding=parseInt($this.css('padding-top'))+parseInt($this.css('padding-bottom'));$this.height(tallest-padding);});}})(jQuery);
(function($){var tmp,loading,overlay,wrap,outer,inner,close,nav_left,nav_right,selectedIndex=0,selectedOpts={},selectedArray=[],currentIndex=0,currentOpts={},currentArray=[],ajaxLoader=null,imgPreloader=new Image(),imgRegExp=/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i,swfRegExp=/[^\.]\.(swf)\s*$/i,loadingTimer,loadingFrame=1,start_pos,final_pos,busy=false,shadow=20,fx=$.extend($('<div/>')[0],{prop:0}),titleh=0,isIE6=!$.support.opacity&&!window.XMLHttpRequest,fancybox_abort=function(){loading.hide();imgPreloader.onerror=imgPreloader.onload=null;if(ajaxLoader){ajaxLoader.abort();}
tmp.empty();},fancybox_error=function(){$.fancybox('<p id="fancybox_error">The requested content cannot be loaded.<br />Please try again later.</p>',{'scrolling':'no','padding':20,'transitionIn':'none','transitionOut':'none'});},fancybox_get_viewport=function(){return[$(window).width(),$(window).height(),$(document).scrollLeft(),$(document).scrollTop()];},fancybox_get_zoom_to=function(){var view=fancybox_get_viewport(),to={},margin=currentOpts.margin,resize=currentOpts.autoScale,horizontal_space=(shadow+margin)*2,vertical_space=(shadow+margin)*2,double_padding=(currentOpts.padding*2),ratio;if(currentOpts.width.toString().indexOf('%')>-1){to.width=((view[0]*parseFloat(currentOpts.width))/100)-(shadow*2);resize=false;}else{to.width=currentOpts.width+double_padding;}
if(currentOpts.height.toString().indexOf('%')>-1){to.height=((view[1]*parseFloat(currentOpts.height))/100)-(shadow*2);resize=false;}else{to.height=currentOpts.height+double_padding;}
if(resize&&(to.width>(view[0]-horizontal_space)||to.height>(view[1]-vertical_space))){if(selectedOpts.type=='image'||selectedOpts.type=='swf'){horizontal_space+=double_padding;vertical_space+=double_padding;ratio=Math.min(Math.min(view[0]-horizontal_space,currentOpts.width)/currentOpts.width,Math.min(view[1]-vertical_space,currentOpts.height)/currentOpts.height);to.width=Math.round(ratio*(to.width-double_padding))+double_padding;to.height=Math.round(ratio*(to.height-double_padding))+double_padding;}else{to.width=Math.min(to.width,(view[0]-horizontal_space));to.height=Math.min(to.height,(view[1]-vertical_space));}}
to.top=view[3]+((view[1]-(to.height+(shadow*2)))*0.5);to.left=view[2]+((view[0]-(to.width+(shadow*2)))*0.5);if(currentOpts.autoScale===false){to.top=Math.max(view[3]+margin,to.top);to.left=Math.max(view[2]+margin,to.left);}
return to;},fancybox_format_title=function(title){if(title&&title.length){switch(currentOpts.titlePosition){case'inside':return title;case'over':return'<span id="fancybox-title-over">'+title+'</span>';default:return'<span id="fancybox-title-wrap"><span id="fancybox-title-left"></span><span id="fancybox-title-main">'+title+'</span><span id="fancybox-title-right"></span></span>';}}
return false;},fancybox_process_title=function(){var title=currentOpts.title,width=final_pos.width-(currentOpts.padding*2),titlec='fancybox-title-'+currentOpts.titlePosition;$('#fancybox-title').remove();titleh=0;if(currentOpts.titleShow===false){return;}
title=$.isFunction(currentOpts.titleFormat)?currentOpts.titleFormat(title,currentArray,currentIndex,currentOpts):fancybox_format_title(title);if(!title||title===''){return;}
$('<div id="fancybox-title" class="'+titlec+'" />').css({'width':width,'paddingLeft':currentOpts.padding,'paddingRight':currentOpts.padding}).html(title).appendTo('body');switch(currentOpts.titlePosition){case'inside':titleh=$("#fancybox-title").outerHeight(true)-currentOpts.padding;final_pos.height+=titleh;break;case'over':$('#fancybox-title').css('bottom',currentOpts.padding);break;default:$('#fancybox-title').css('bottom',$("#fancybox-title").outerHeight(true)*-1);break;}
$('#fancybox-title').appendTo(outer).hide();},fancybox_set_navigation=function(){$(document).unbind('keydown.fb').bind('keydown.fb',function(e){if(e.keyCode==27&&currentOpts.enableEscapeButton){e.preventDefault();$.fancybox.close();}else if(e.keyCode==37){e.preventDefault();$.fancybox.prev();}else if(e.keyCode==39){e.preventDefault();$.fancybox.next();}});if($.fn.mousewheel){wrap.unbind('mousewheel.fb');if(currentArray.length>1){wrap.bind('mousewheel.fb',function(e,delta){e.preventDefault();if(busy||delta===0){return;}
if(delta>0){$.fancybox.prev();}else{$.fancybox.next();}});}}
if(!currentOpts.showNavArrows){return;}
if((currentOpts.cyclic&&currentArray.length>1)||currentIndex!==0){nav_left.show();}
if((currentOpts.cyclic&&currentArray.length>1)||currentIndex!=(currentArray.length-1)){nav_right.show();}},fancybox_preload_images=function(){var href,objNext;if((currentArray.length-1)>currentIndex){href=currentArray[currentIndex+1].href;if(typeof href!=='undefined'&&href.match(imgRegExp)){objNext=new Image();objNext.src=href;}}
if(currentIndex>0){href=currentArray[currentIndex-1].href;if(typeof href!=='undefined'&&href.match(imgRegExp)){objNext=new Image();objNext.src=href;}}},_finish=function(){inner.css('overflow',(currentOpts.scrolling=='auto'?(currentOpts.type=='image'||currentOpts.type=='iframe'||currentOpts.type=='swf'?'hidden':'auto'):(currentOpts.scrolling=='yes'?'auto':'visible')));if(!$.support.opacity){inner.get(0).style.removeAttribute('filter');wrap.get(0).style.removeAttribute('filter');}
$('#fancybox-title').show();if(currentOpts.hideOnContentClick){inner.one('click',$.fancybox.close);}
if(currentOpts.hideOnOverlayClick){overlay.one('click',$.fancybox.close);}
if(currentOpts.showCloseButton){close.show();}
fancybox_set_navigation();$(window).bind("resize.fb",$.fancybox.center);if(currentOpts.centerOnScroll){$(window).bind("scroll.fb",$.fancybox.center);}else{$(window).unbind("scroll.fb");}
if($.isFunction(currentOpts.onComplete)){currentOpts.onComplete(currentArray,currentIndex,currentOpts);}
busy=false;fancybox_preload_images();},fancybox_draw=function(pos){var width=Math.round(start_pos.width+(final_pos.width-start_pos.width)*pos),height=Math.round(start_pos.height+(final_pos.height-start_pos.height)*pos),top=Math.round(start_pos.top+(final_pos.top-start_pos.top)*pos),left=Math.round(start_pos.left+(final_pos.left-start_pos.left)*pos);wrap.css({'width':width+'px','height':height+'px','top':top+'px','left':left+'px'});width=Math.max(width-currentOpts.padding*2,0);height=Math.max(height-(currentOpts.padding*2+(titleh*pos)),0);inner.css({'width':width+'px','height':height+'px'});if(typeof final_pos.opacity!=='undefined'){wrap.css('opacity',(pos<0.5?0.5:pos));}},fancybox_get_obj_pos=function(obj){var pos=obj.offset();pos.top+=parseFloat(obj.css('paddingTop'))||0;pos.left+=parseFloat(obj.css('paddingLeft'))||0;pos.top+=parseFloat(obj.css('border-top-width'))||0;pos.left+=parseFloat(obj.css('border-left-width'))||0;pos.width=obj.width();pos.height=obj.height();return pos;},fancybox_get_zoom_from=function(){var orig=selectedOpts.orig?$(selectedOpts.orig):false,from={},pos,view;if(orig&&orig.length){pos=fancybox_get_obj_pos(orig);from={width:(pos.width+(currentOpts.padding*2)),height:(pos.height+(currentOpts.padding*2)),top:(pos.top-currentOpts.padding-shadow),left:(pos.left-currentOpts.padding-shadow)};}else{view=fancybox_get_viewport();from={width:1,height:1,top:view[3]+view[1]*0.5,left:view[2]+view[0]*0.5};}
return from;},fancybox_show=function(){loading.hide();if(wrap.is(":visible")&&$.isFunction(currentOpts.onCleanup)){if(currentOpts.onCleanup(currentArray,currentIndex,currentOpts)===false){$.event.trigger('fancybox-cancel');busy=false;return;}}
currentArray=selectedArray;currentIndex=selectedIndex;currentOpts=selectedOpts;inner.get(0).scrollTop=0;inner.get(0).scrollLeft=0;if(currentOpts.overlayShow){if(isIE6){$('select:not(#fancybox-tmp select)').filter(function(){return this.style.visibility!=='hidden';}).css({'visibility':'hidden'}).one('fancybox-cleanup',function(){this.style.visibility='inherit';});}
overlay.css({'background-color':currentOpts.overlayColor,'opacity':currentOpts.overlayOpacity}).unbind().show();}
final_pos=fancybox_get_zoom_to();fancybox_process_title();if(wrap.is(":visible")){$(close.add(nav_left).add(nav_right)).hide();var pos=wrap.position(),equal;start_pos={top:pos.top,left:pos.left,width:wrap.width(),height:wrap.height()};equal=(start_pos.width==final_pos.width&&start_pos.height==final_pos.height);inner.fadeOut(currentOpts.changeFade,function(){var finish_resizing=function(){inner.html(tmp.contents()).fadeIn(currentOpts.changeFade,_finish);};$.event.trigger('fancybox-change');inner.empty().css('overflow','hidden');if(equal){inner.css({top:currentOpts.padding,left:currentOpts.padding,width:Math.max(final_pos.width-(currentOpts.padding*2),1),height:Math.max(final_pos.height-(currentOpts.padding*2)-titleh,1)});finish_resizing();}else{inner.css({top:currentOpts.padding,left:currentOpts.padding,width:Math.max(start_pos.width-(currentOpts.padding*2),1),height:Math.max(start_pos.height-(currentOpts.padding*2),1)});fx.prop=0;$(fx).animate({prop:1},{duration:currentOpts.changeSpeed,easing:currentOpts.easingChange,step:fancybox_draw,complete:finish_resizing});}});return;}
wrap.css('opacity',1);if(currentOpts.transitionIn=='elastic'){start_pos=fancybox_get_zoom_from();inner.css({top:currentOpts.padding,left:currentOpts.padding,width:Math.max(start_pos.width-(currentOpts.padding*2),1),height:Math.max(start_pos.height-(currentOpts.padding*2),1)}).html(tmp.contents());wrap.css(start_pos).show();if(currentOpts.opacity){final_pos.opacity=0;}
fx.prop=0;$(fx).animate({prop:1},{duration:currentOpts.speedIn,easing:currentOpts.easingIn,step:fancybox_draw,complete:_finish});}else{inner.css({top:currentOpts.padding,left:currentOpts.padding,width:Math.max(final_pos.width-(currentOpts.padding*2),1),height:Math.max(final_pos.height-(currentOpts.padding*2)-titleh,1)}).html(tmp.contents());wrap.css(final_pos).fadeIn(currentOpts.transitionIn=='none'?0:currentOpts.speedIn,_finish);}},fancybox_process_inline=function(){tmp.width(selectedOpts.width);tmp.height(selectedOpts.height);if(selectedOpts.width=='auto'){selectedOpts.width=tmp.width();}
if(selectedOpts.height=='auto'){selectedOpts.height=tmp.height();}
fancybox_show();},fancybox_process_image=function(){busy=true;selectedOpts.width=imgPreloader.width;selectedOpts.height=imgPreloader.height;$("<img />").attr({'id':'fancybox-img','src':imgPreloader.src,'alt':selectedOpts.title}).appendTo(tmp);fancybox_show();},fancybox_start=function(){fancybox_abort();var obj=selectedArray[selectedIndex],href,type,title,str,emb,selector,data;selectedOpts=$.extend({},$.fn.fancybox.defaults,(typeof $(obj).data('fancybox')=='undefined'?selectedOpts:$(obj).data('fancybox')));title=obj.title||$(obj).title||selectedOpts.title||'';if(obj.nodeName&&!selectedOpts.orig){selectedOpts.orig=$(obj).children("img:first").length?$(obj).children("img:first"):$(obj);}
if(title===''&&selectedOpts.orig){title=selectedOpts.orig.attr('alt');}
if(obj.nodeName&&(/^(?:javascript|#)/i).test(obj.href)){href=selectedOpts.href||null;}else{href=selectedOpts.href||obj.href||null;}
if(selectedOpts.type){type=selectedOpts.type;if(!href){href=selectedOpts.content;}}else if(selectedOpts.content){type='html';}else if(href){if(href.match(imgRegExp)){type='image';}else if(href.match(swfRegExp)){type='swf';}else if($(obj).hasClass("iframe")){type='iframe';}else if(href.match(/#/)){obj=href.substr(href.indexOf("#"));type=$(obj).length>0?'inline':'ajax';}else{type='ajax';}}else{type='inline';}
selectedOpts.type=type;selectedOpts.href=href;selectedOpts.title=title;if(selectedOpts.autoDimensions&&selectedOpts.type!=='iframe'&&selectedOpts.type!=='swf'){selectedOpts.width='auto';selectedOpts.height='auto';}
if(selectedOpts.modal){selectedOpts.overlayShow=true;selectedOpts.hideOnOverlayClick=false;selectedOpts.hideOnContentClick=false;selectedOpts.enableEscapeButton=false;selectedOpts.showCloseButton=false;}
if($.isFunction(selectedOpts.onStart)){if(selectedOpts.onStart(selectedArray,selectedIndex,selectedOpts)===false){busy=false;return;}}
tmp.css('padding',(shadow+selectedOpts.padding+selectedOpts.margin));$('.fancybox-inline-tmp').unbind('fancybox-cancel').bind('fancybox-change',function(){$(this).replaceWith(inner.children());});switch(type){case'html':tmp.html(selectedOpts.content);fancybox_process_inline();break;case'inline':$('<div class="fancybox-inline-tmp" />').hide().insertBefore($(obj)).bind('fancybox-cleanup',function(){$(this).replaceWith(inner.children());}).bind('fancybox-cancel',function(){$(this).replaceWith(tmp.children());});$(obj).appendTo(tmp);fancybox_process_inline();break;case'image':busy=false;$.fancybox.showActivity();imgPreloader=new Image();imgPreloader.onerror=function(){fancybox_error();};imgPreloader.onload=function(){imgPreloader.onerror=null;imgPreloader.onload=null;fancybox_process_image();};imgPreloader.src=href;break;case'swf':str='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+selectedOpts.width+'" height="'+selectedOpts.height+'"><param name="movie" value="'+href+'"></param>';emb='';$.each(selectedOpts.swf,function(name,val){str+='<param name="'+name+'" value="'+val+'"></param>';emb+=' '+name+'="'+val+'"';});str+='<embed src="'+href+'" type="application/x-shockwave-flash" width="'+selectedOpts.width+'" height="'+selectedOpts.height+'"'+emb+'></embed></object>';tmp.html(str);fancybox_process_inline();break;case'ajax':selector=href.split('#',2);data=selectedOpts.ajax.data||{};if(selector.length>1){href=selector[0];if(typeof data=="string"){data+='&selector='+selector[1];}else{data.selector=selector[1];}}
busy=false;$.fancybox.showActivity();ajaxLoader=$.ajax($.extend(selectedOpts.ajax,{url:href,data:data,error:fancybox_error,success:function(data,textStatus,XMLHttpRequest){if(ajaxLoader.status==200){tmp.html(data);fancybox_process_inline();}}}));break;case'iframe':$('<iframe id="fancybox-frame" name="fancybox-frame'+new Date().getTime()+'" frameborder="0" hspace="0" scrolling="'+selectedOpts.scrolling+'" src="'+selectedOpts.href+'"></iframe>').appendTo(tmp);fancybox_show();break;}},fancybox_animate_loading=function(){if(!loading.is(':visible')){clearInterval(loadingTimer);return;}
$('div',loading).css('top',(loadingFrame*-40)+'px');loadingFrame=(loadingFrame+1)%12;},fancybox_init=function(){if($("#fancybox-wrap").length){return;}
$('body').append(tmp=$('<div id="fancybox-tmp"></div>'),loading=$('<div id="fancybox-loading"><div></div></div>'),overlay=$('<div id="fancybox-overlay"></div>'),wrap=$('<div id="fancybox-wrap"></div>'));if(!$.support.opacity){wrap.addClass('fancybox-ie');loading.addClass('fancybox-ie');}
outer=$('<div id="fancybox-outer"></div>').append('<div class="fancy-bg" id="fancy-bg-n"></div><div class="fancy-bg" id="fancy-bg-ne"></div><div class="fancy-bg" id="fancy-bg-e"></div><div class="fancy-bg" id="fancy-bg-se"></div><div class="fancy-bg" id="fancy-bg-s"></div><div class="fancy-bg" id="fancy-bg-sw"></div><div class="fancy-bg" id="fancy-bg-w"></div><div class="fancy-bg" id="fancy-bg-nw"></div>').appendTo(wrap);outer.append(inner=$('<div id="fancybox-inner"></div>'),close=$('<a id="fancybox-close"></a>'),nav_left=$('<a href="javascript:;" id="fancybox-left"><span class="fancy-ico" id="fancybox-left-ico"></span></a>'),nav_right=$('<a href="javascript:;" id="fancybox-right"><span class="fancy-ico" id="fancybox-right-ico"></span></a>'));close.click($.fancybox.close);loading.click($.fancybox.cancel);nav_left.click(function(e){e.preventDefault();$.fancybox.prev();});nav_right.click(function(e){e.preventDefault();$.fancybox.next();});if(isIE6){overlay.get(0).style.setExpression('height',"document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight + 'px'");loading.get(0).style.setExpression('top',"(-20 + (document.documentElement.clientHeight ? document.documentElement.clientHeight/2 : document.body.clientHeight/2 ) + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop )) + 'px'");outer.prepend('<iframe id="fancybox-hide-sel-frame" src="javascript:\'\';" scrolling="no" frameborder="0" ></iframe>');}};$.fn.fancybox=function(options){$(this).data('fancybox',$.extend({},options,($.metadata?$(this).metadata():{}))).unbind('click.fb').bind('click.fb',function(e){e.preventDefault();if(busy){return;}
busy=true;$(this).blur();selectedArray=[];selectedIndex=0;var rel=$(this).attr('rel')||'';if(!rel||rel==''||rel==='nofollow'){selectedArray.push(this);}else{selectedArray=$("a[rel="+rel+"], area[rel="+rel+"]");selectedIndex=selectedArray.index(this);}
fancybox_start();return false;});return this;};$.fancybox=function(obj){if(busy){return;}
busy=true;var opts=typeof arguments[1]!=='undefined'?arguments[1]:{};selectedArray=[];selectedIndex=opts.index||0;if($.isArray(obj)){for(var i=0,j=obj.length;i<j;i++){if(typeof obj[i]=='object'){$(obj[i]).data('fancybox',$.extend({},opts,obj[i]));}else{obj[i]=$({}).data('fancybox',$.extend({content:obj[i]},opts));}}
selectedArray=jQuery.merge(selectedArray,obj);}else{if(typeof obj=='object'){$(obj).data('fancybox',$.extend({},opts,obj));}else{obj=$({}).data('fancybox',$.extend({content:obj},opts));}
selectedArray.push(obj);}
if(selectedIndex>selectedArray.length||selectedIndex<0){selectedIndex=0;}
fancybox_start();};$.fancybox.showActivity=function(){clearInterval(loadingTimer);loading.show();loadingTimer=setInterval(fancybox_animate_loading,66);};$.fancybox.hideActivity=function(){loading.hide();};$.fancybox.next=function(){return $.fancybox.pos(currentIndex+1);};$.fancybox.prev=function(){return $.fancybox.pos(currentIndex-1);};$.fancybox.pos=function(pos){if(busy){return;}
pos=parseInt(pos,10);if(pos>-1&&currentArray.length>pos){selectedIndex=pos;fancybox_start();}
if(currentOpts.cyclic&&currentArray.length>1&&pos<0){selectedIndex=currentArray.length-1;fancybox_start();}
if(currentOpts.cyclic&&currentArray.length>1&&pos>=currentArray.length){selectedIndex=0;fancybox_start();}
return;};$.fancybox.cancel=function(){if(busy){return;}
busy=true;$.event.trigger('fancybox-cancel');fancybox_abort();if(selectedOpts&&$.isFunction(selectedOpts.onCancel)){selectedOpts.onCancel(selectedArray,selectedIndex,selectedOpts);}
busy=false;};$.fancybox.close=function(){if(busy||wrap.is(':hidden')){return;}
busy=true;if(currentOpts&&$.isFunction(currentOpts.onCleanup)){if(currentOpts.onCleanup(currentArray,currentIndex,currentOpts)===false){busy=false;return;}}
fancybox_abort();$(close.add(nav_left).add(nav_right)).hide();$('#fancybox-title').remove();wrap.add(inner).add(overlay).unbind();$(window).unbind("resize.fb scroll.fb");$(document).unbind('keydown.fb');function _cleanup(){overlay.fadeOut('fast');wrap.hide();$.event.trigger('fancybox-cleanup');inner.empty();if($.isFunction(currentOpts.onClosed)){currentOpts.onClosed(currentArray,currentIndex,currentOpts);}
currentArray=selectedOpts=[];currentIndex=selectedIndex=0;currentOpts=selectedOpts={};busy=false;}
inner.css('overflow','hidden');if(currentOpts.transitionOut=='elastic'){start_pos=fancybox_get_zoom_from();var pos=wrap.position();final_pos={top:pos.top,left:pos.left,width:wrap.width(),height:wrap.height()};if(currentOpts.opacity){final_pos.opacity=1;}
fx.prop=1;$(fx).animate({prop:0},{duration:currentOpts.speedOut,easing:currentOpts.easingOut,step:fancybox_draw,complete:_cleanup});}else{wrap.fadeOut(currentOpts.transitionOut=='none'?0:currentOpts.speedOut,_cleanup);}};$.fancybox.resize=function(){var c,h;if(busy||wrap.is(':hidden')){return;}
busy=true;c=inner.wrapInner("<div style='overflow:auto'></div>").children();h=c.height();wrap.css({height:h+(currentOpts.padding*2)+titleh});inner.css({height:h});c.replaceWith(c.children());$.fancybox.center();};$.fancybox.center=function(){busy=true;var view=fancybox_get_viewport(),margin=currentOpts.margin,to={};to.top=view[3]+((view[1]-((wrap.height()-titleh)+(shadow*2)))*0.5);to.left=view[2]+((view[0]-(wrap.width()+(shadow*2)))*0.5);to.top=Math.max(view[3]+margin,to.top);to.left=Math.max(view[2]+margin,to.left);wrap.css(to);busy=false;};$.fn.fancybox.defaults={padding:10,margin:20,opacity:false,modal:false,cyclic:false,scrolling:'auto',width:560,height:340,autoScale:true,autoDimensions:true,centerOnScroll:false,ajax:{},swf:{wmode:'transparent'},hideOnOverlayClick:true,hideOnContentClick:false,overlayShow:true,overlayOpacity:0.3,overlayColor:'#666',titleShow:true,titlePosition:'outside',titleFormat:null,transitionIn:'fade',transitionOut:'fade',speedIn:300,speedOut:300,changeSpeed:300,changeFade:'fast',easingIn:'swing',easingOut:'swing',showCloseButton:true,showNavArrows:true,enableEscapeButton:true,onStart:null,onCancel:null,onComplete:null,onCleanup:null,onClosed:null};$(document).ready(function(){fancybox_init();});})(jQuery);;(function($){var instances=new Array();$.galleriffic={version:'2.0.1',normalizeHash:function(hash){return hash.replace(/^.*#/,'').replace(/\?.*$/,'');},register:function(gallery){instances[instances.length]=gallery;},getStartIndex:function(){if(instances.length<2){return 0;}
return instances[instances.length-2].imageCounter;},gotoImage:function(hash){for(var i=0;i<instances.length;i++){if(instances[i].getImage(hash)){instances[i].gotoImage1(instances[i].getImage(hash));return true;}}
return false;}};var defaults={delay:3000,numThumbs:20,preloadAhead:40,enableTopPager:false,enableBottomPager:true,maxPagesToShow:7,imageContainerSel:'',captionContainerSel:'',controlsContainerSel:'',loadingContainerSel:'',renderSSControls:true,renderNavControls:true,playLinkText:'Play',pauseLinkText:'Pause',prevLinkText:'Previous',nextLinkText:'Next',nextPageLinkText:'Next &rsaquo;',prevPageLinkText:'&lsaquo; Prev',enableHistory:false,enableKeyboardNavigation:true,autoStart:false,syncTransitions:false,defaultTransitionDuration:1000,onSlideChange:undefined,onTransitionOut:undefined,onTransitionIn:undefined,onPageTransitionOut:undefined,onPageTransitionIn:undefined,onImageAdded:undefined,onImageRemoved:undefined};$.fn.galleriffic=function(settings){$.extend(this,{version:$.galleriffic.version,isSlideshowRunning:false,slideshowTimeout:undefined,clickHandler:function(e,link){this.pause();if(!this.enableHistory){var hash=$.galleriffic.normalizeHash($(link).attr('href'));this.gotoImage(hash);e.preventDefault();}},appendImage:function(listItem){this.addImage(listItem,false,false);return this;},insertImage:function(listItem,position){this.addImage(listItem,false,true,position);return this;},addImage:function(listItem,thumbExists,insert,position){var $li=(typeof listItem==="string")?$(listItem):listItem;var $aThumb=$li.find('a.thumb');var slideUrl=$aThumb.attr('href');var title=$aThumb.attr('title');var $caption=$li.find('.caption').remove();var hash=$aThumb.attr('name');this.imageCounter++;if(!hash||this.allImages[''+hash]){hash=this.imageCounter+this.startIndex;}
if(!insert)
position=this.data.length;var imageData={title:title,slideUrl:slideUrl,caption:$caption,hash:hash,gallery:this,index:position};if(insert){this.data.splice(position,0,imageData);this.updateIndices(position);}
else{this.data.push(imageData);}
var gallery=this;if(!thumbExists){this.updateThumbs(function(){var $thumbsUl=gallery.find('ul.thumbs');if(insert)
$thumbsUl.children(':eq('+position+')').before($li);else
$thumbsUl.append($li);if(gallery.onImageAdded)
gallery.onImageAdded(imageData,$li);});}
this.allImages[''+hash]=imageData;$aThumb.attr('rel','history').attr('href','#'+hash).removeAttr('name').click(function(e){gallery.clickHandler(e,this);});return this;},removeImageByIndex:function(index){if(index<0||index>=this.data.length)
return false;var imageData=this.data[index];if(!imageData)
return false;this.removeImage(imageData);return true;},removeImage:function(imageData){var index=imageData.index;this.data.splice(index,1);delete this.allImages[''+imageData.hash];this.updateThumbs(function(){var $li=gallery.find('ul.thumbs').children(':eq('+index+')').remove();if(gallery.onImageRemoved)
gallery.onImageRemoved(imageData,$li);});this.updateIndices(index);return this;},updateIndices:function(startIndex){for(i=startIndex;i<this.data.length;i++){this.data[i].index=i;}
return this;},initializeThumbs:function(){this.data=[];var gallery=this;this.find('ul.thumbs > li').each(function(i){gallery.addImage($(this),true,false);});return this;},isPreloadComplete:false,preloadInit:function(){if(this.preloadAhead==0)return this;this.preloadStartIndex=this.currentImage.index;var nextIndex=this.getNextIndex(this.preloadStartIndex);return this.preloadRecursive(this.preloadStartIndex,nextIndex);},preloadRelocate:function(index){this.preloadStartIndex=index;return this;},preloadRecursive:function(startIndex,currentIndex){if(startIndex!=this.preloadStartIndex){var nextIndex=this.getNextIndex(this.preloadStartIndex);return this.preloadRecursive(this.preloadStartIndex,nextIndex);}
var gallery=this;var preloadCount=currentIndex-startIndex;if(preloadCount<0)
preloadCount=this.data.length-1-startIndex+currentIndex;if(this.preloadAhead>=0&&preloadCount>this.preloadAhead){setTimeout(function(){gallery.preloadRecursive(startIndex,currentIndex);},500);return this;}
var imageData=this.data[currentIndex];if(!imageData)
return this;if(imageData.image)
return this.preloadNext(startIndex,currentIndex);var image=new Image();image.onload=function(){imageData.image=this;gallery.preloadNext(startIndex,currentIndex);};image.alt=imageData.title;image.src=imageData.slideUrl;return this;},preloadNext:function(startIndex,currentIndex){var nextIndex=this.getNextIndex(currentIndex);if(nextIndex==startIndex){this.isPreloadComplete=true;}else{var gallery=this;setTimeout(function(){gallery.preloadRecursive(startIndex,nextIndex);},100);}
return this;},getNextIndex:function(index){var nextIndex=index+1;if(nextIndex>=this.data.length)
nextIndex=0;return nextIndex;},getPrevIndex:function(index){var prevIndex=index-1;if(prevIndex<0)
prevIndex=this.data.length-1;return prevIndex;},pause:function(){this.isSlideshowRunning=false;if(this.slideshowTimeout){clearTimeout(this.slideshowTimeout);this.slideshowTimeout=undefined;}
if(this.$controlsContainer){this.$controlsContainer.find('div.ss-controls a').removeClass().addClass('play').attr('title',this.playLinkText).attr('href','#play').html(this.playLinkText);}
return this;},play:function(){this.isSlideshowRunning=true;if(this.$controlsContainer){this.$controlsContainer.find('div.ss-controls a').removeClass().addClass('pause').attr('title',this.pauseLinkText).attr('href','#pause').html(this.pauseLinkText);}
if(!this.slideshowTimeout){var gallery=this;this.slideshowTimeout=setTimeout(function(){gallery.ssAdvance();},this.delay);}
return this;},toggleSlideshow:function(){if(this.isSlideshowRunning)
this.pause();else
this.play();return this;},ssAdvance:function(){if(this.isSlideshowRunning)
this.next(true);return this;},next:function(dontPause,bypassHistory){this.gotoIndex(this.getNextIndex(this.currentImage.index),dontPause,bypassHistory);return this;},previous:function(dontPause,bypassHistory){this.gotoIndex(this.getPrevIndex(this.currentImage.index),dontPause,bypassHistory);return this;},nextPage:function(dontPause,bypassHistory){var page=this.getCurrentPage();var lastPage=this.getNumPages()-1;if(page<lastPage){var startIndex=page*this.numThumbs;var nextPage=startIndex+this.numThumbs;this.gotoIndex(nextPage,dontPause,bypassHistory);}
return this;},previousPage:function(dontPause,bypassHistory){var page=this.getCurrentPage();if(page>0){var startIndex=page*this.numThumbs;var prevPage=startIndex-this.numThumbs;this.gotoIndex(prevPage,dontPause,bypassHistory);}
return this;},gotoIndex:function(index,dontPause,bypassHistory){if(!dontPause)
this.pause();if(index<0)index=0;else if(index>=this.data.length)index=this.data.length-1;var imageData=this.data[index];if(!bypassHistory&&this.enableHistory)
$.historyLoad(String(imageData.hash));else
this.gotoImage1(imageData);return this;},gotoImage1:function(imageData){if(this.currentImage.index==imageData.index&&this.init){return;}
var index=imageData.index;if(this.onSlideChange)
this.onSlideChange(this.currentImage.index,index);this.currentImage=imageData;this.preloadRelocate(index);this.refresh();return this;},getDefaultTransitionDuration:function(isSync){if(isSync)
return this.defaultTransitionDuration;return this.defaultTransitionDuration/2;},refresh:function(){var imageData=this.currentImage;if(!imageData)
return this;var index=imageData.index;if(this.$controlsContainer){this.$controlsContainer.find('div.nav-controls a.prev').attr('href','#'+this.data[this.getPrevIndex(index)].hash).end().find('div.nav-controls a.next').attr('href','#'+this.data[this.getNextIndex(index)].hash);}
var previousSlide=this.$imageContainer.find('.current').addClass('previous').removeClass('current');var previousCaption=0;if(this.$captionContainer){previousCaption=this.$captionContainer.find('.current').addClass('previous').removeClass('current');}
var isSync=this.syncTransitions&&imageData.image;var isTransitioning=true;var gallery=this;var transitionOutCallback=function(){isTransitioning=false;previousSlide.remove();if(previousCaption)
previousCaption.remove();if(!isSync){if(imageData.image&&imageData.hash==gallery.data[gallery.currentImage.index].hash){gallery.buildImage(imageData,isSync);}else{if(gallery.$loadingContainer){gallery.$loadingContainer.show();}}}};if(previousSlide.length==0){transitionOutCallback();}else{if(this.onTransitionOut){this.onTransitionOut(previousSlide,previousCaption,isSync,transitionOutCallback);}else{previousSlide.fadeTo(this.getDefaultTransitionDuration(isSync),0.0,transitionOutCallback);if(previousCaption)
previousCaption.fadeTo(this.getDefaultTransitionDuration(isSync),0.0);}}
if(isSync)
this.buildImage(imageData,isSync);if(!imageData.image){var image=new Image();image.onload=function(){imageData.image=this;if(!isTransitioning&&imageData.hash==gallery.data[gallery.currentImage.index].hash){gallery.buildImage(imageData,isSync);}};image.alt=imageData.title;image.src=imageData.slideUrl;}
this.relocatePreload=true;return this.syncThumbs();},buildImage:function(imageData,isSync){var gallery=this;var nextIndex=this.getNextIndex(imageData.index);var newSlide=this.$imageContainer.append('<span class="image-wrapper current"><a class="advance-link" rel="history" href="#'+this.data[nextIndex].hash+'" title="'+imageData.title+'"></a></span>').find('.current').css('opacity','0');newSlide.find('a').append(imageData.image).click(function(e){gallery.clickHandler(e,this);});var newCaption=0;if(this.$captionContainer){newCaption=this.$captionContainer.append('<div class="image-caption current"></div>').find('.current').css('opacity','0').append(imageData.caption);}
if(this.$loadingContainer){this.$loadingContainer.hide();}
if(this.onTransitionIn){this.onTransitionIn(newSlide,newCaption,isSync);}else{newSlide.fadeTo(this.getDefaultTransitionDuration(isSync),1.0);if(newCaption)
newCaption.fadeTo(this.getDefaultTransitionDuration(isSync),1.0);}
if(this.isSlideshowRunning){if(this.slideshowTimeout)
clearTimeout(this.slideshowTimeout);this.slideshowTimeout=setTimeout(function(){gallery.ssAdvance();},this.delay);}
return this;},getCurrentPage:function(){return Math.floor(this.currentImage.index/this.numThumbs);},syncThumbs:function(){var page=this.getCurrentPage();if(page!=this.displayedPage)
this.updateThumbs();var $thumbs=this.find('ul.thumbs').children();$thumbs.filter('.selected').removeClass('selected');$thumbs.eq(this.currentImage.index).addClass('selected');return this;},updateThumbs:function(postTransitionOutHandler){var gallery=this;var transitionOutCallback=function(){if(postTransitionOutHandler)
postTransitionOutHandler();gallery.rebuildThumbs();if(gallery.onPageTransitionIn)
gallery.onPageTransitionIn();else
gallery.show();};if(this.onPageTransitionOut){this.onPageTransitionOut(transitionOutCallback);}else{this.hide();transitionOutCallback();}
return this;},rebuildThumbs:function(){var needsPagination=this.data.length>this.numThumbs;if(this.enableTopPager){var $topPager=this.find('div.top');if($topPager.length==0)
$topPager=this.prepend('<div class="top pagination"></div>').find('div.top');else
$topPager.empty();if(needsPagination)
this.buildPager($topPager);}
if(this.enableBottomPager){var $bottomPager=this.find('div.bottom');if($bottomPager.length==0)
$bottomPager=this.append('<div class="bottom pagination"></div>').find('div.bottom');else
$bottomPager.empty();if(needsPagination)
this.buildPager($bottomPager);}
var page=this.getCurrentPage();var startIndex=page*this.numThumbs;var stopIndex=startIndex+this.numThumbs-1;if(stopIndex>=this.data.length)
stopIndex=this.data.length-1;var $thumbsUl=this.find('ul.thumbs');$thumbsUl.find('li').each(function(i){var $li=$(this);if(i>=startIndex&&i<=stopIndex){$li.show();}else{$li.hide();}});this.displayedPage=page;$thumbsUl.removeClass('noscript');return this;},getNumPages:function(){return Math.ceil(this.data.length/this.numThumbs);},buildPager:function(pager){var gallery=this;var numPages=this.getNumPages();var page=this.getCurrentPage();var startIndex=page*this.numThumbs;var pagesRemaining=this.maxPagesToShow-1;var pageNum=page-Math.floor((this.maxPagesToShow-1)/2)+1;if(pageNum>0){var remainingPageCount=numPages-pageNum;if(remainingPageCount<pagesRemaining){pageNum=pageNum-(pagesRemaining-remainingPageCount);}}
if(pageNum<0){pageNum=0;}
if(pageNum>0){this.buildPageLink(pager,0,numPages);if(pageNum>1)
pager.append('<span class="ellipsis">&hellip;</span>');pagesRemaining--;}
while(pagesRemaining>0){this.buildPageLink(pager,pageNum,numPages);pagesRemaining--;pageNum++;}
if(pageNum<numPages){var lastPageNum=numPages-1;if(pageNum<lastPageNum)
pager.append('<span class="ellipsis">&hellip;</span>');this.buildPageLink(pager,lastPageNum,numPages);}
pager.find('a:not(:last-child), span:not(:last-child)').after('<span class="sep">&#124;</span>');pager.find('a').click(function(e){gallery.clickHandler(e,this);});return this;},buildPageLink:function(pager,pageNum,numPages){var pageLabel=pageNum+1;var currentPage=this.getCurrentPage();if(pageNum==currentPage)
pager.append('<span class="current">'+pageLabel+'</span>');else if(pageNum<numPages){var imageIndex=pageNum*this.numThumbs;pager.append('<a rel="history" href="#'+this.data[imageIndex].hash+'" title="'+pageLabel+'">'+pageLabel+'</a>');}
return this;},getImage:function(hash){if(!hash)
return undefined;hash=$.galleriffic.normalizeHash(hash);return this.allImages[hash];},gotoImage:function(hash){var imageData=this.getImage(hash);if(!imageData)
return false;this.gotoImage1(imageData);return true;},removeImageByHash:function(hash){var imageData=this.getImage(hash);if(!imageData)
return false;return this.removeImageByIndex(imageData.index);}});$.extend(this,defaults,settings);$.galleriffic.register(this);this.allImages={};this.imageCounter=0;this.startIndex=$.galleriffic.getStartIndex();this.init=false;if(this.enableHistory&&!$.historyInit)
this.enableHistory=false;if(this.imageContainerSel)this.$imageContainer=$(this.imageContainerSel);if(this.captionContainerSel)this.$captionContainer=$(this.captionContainerSel);if(this.loadingContainerSel)this.$loadingContainer=$(this.loadingContainerSel);this.initializeThumbs();if(this.maxPagesToShow<3)
this.maxPagesToShow=3;this.displayedPage=-1;this.currentImage=this.data[0];var gallery=this;if(this.$loadingContainer)
this.$loadingContainer.hide();if(this.controlsContainerSel){this.$controlsContainer=$(this.controlsContainerSel).empty();if(this.renderSSControls){if(this.autoStart){this.$controlsContainer.append('<div class="ss-controls"><a href="#pause" class="pause" title="'+this.pauseLinkText+'">'+this.pauseLinkText+'</a></div>');}else{this.$controlsContainer.append('<div class="ss-controls"><a href="#play" class="play" title="'+this.playLinkText+'">'+this.playLinkText+'</a></div>');}
this.$controlsContainer.find('div.ss-controls a').click(function(e){gallery.toggleSlideshow();e.preventDefault();return false;});}
if(this.renderNavControls){this.$controlsContainer.append('<div class="nav-controls"><a class="prev" rel="history" title="'+this.prevLinkText+'"><span>'+this.prevLinkText+'</span></a><a class="next" rel="history" title="'+this.nextLinkText+'"><span>'+this.nextLinkText+'</span></a></div>').find('div.nav-controls a').click(function(e){gallery.clickHandler(e,this);});}}
var initFirstImage=!this.enableHistory||!location.hash;if(this.enableHistory&&location.hash){var hash=$.galleriffic.normalizeHash(location.hash);var imageData=this.allImages[hash];if(!imageData)
initFirstImage=true;}
if(initFirstImage){this.gotoIndex(0,false,true);}
if(this.enableKeyboardNavigation){$(document).keydown(function(e){var key=e.charCode?e.charCode:e.keyCode?e.keyCode:0;switch(key){case 32:gallery.next();e.preventDefault();break;case 33:gallery.previousPage();e.preventDefault();break;case 34:gallery.nextPage();e.preventDefault();break;case 35:gallery.gotoIndex(gallery.data.length-1);e.preventDefault();break;case 36:gallery.gotoIndex(0);e.preventDefault();break;case 37:gallery.previous();e.preventDefault();break;case 39:gallery.next();e.preventDefault();break;}});}
if(this.autoStart)
this.play();setTimeout(function(){gallery.preloadInit();},1000);this.init=true;return this;};})(jQuery);
jQuery.extend({historyCurrentHash:undefined,historyCallback:undefined,historyIframeSrc:undefined,historyInit:function(callback,src){jQuery.historyCallback=callback;if(src)jQuery.historyIframeSrc=src;var current_hash=location.hash.replace(/\?.*$/,'');jQuery.historyCurrentHash=current_hash;if(jQuery.browser.msie){if(jQuery.historyCurrentHash==''){jQuery.historyCurrentHash='#';}
jQuery("body").prepend('<iframe id="jQuery_history" style="display: none;"'+
(jQuery.historyIframeSrc?' src="'+jQuery.historyIframeSrc+'"':'')
+'></iframe>');var ihistory=jQuery("#jQuery_history")[0];var iframe=ihistory.contentWindow.document;iframe.open();iframe.close();iframe.location.hash=current_hash;}
else if(jQuery.browser.safari){jQuery.historyBackStack=[];jQuery.historyBackStack.length=history.length;jQuery.historyForwardStack=[];jQuery.lastHistoryLength=history.length;jQuery.isFirst=true;}
if(current_hash)
jQuery.historyCallback(current_hash.replace(/^#/,''));setInterval(jQuery.historyCheck,100);},historyAddHistory:function(hash){jQuery.historyBackStack.push(hash);jQuery.historyForwardStack.length=0;this.isFirst=true;},historyCheck:function(){if(jQuery.browser.msie){var ihistory=jQuery("#jQuery_history")[0];var iframe=ihistory.contentDocument||ihistory.contentWindow.document;var current_hash=iframe.location.hash.replace(/\?.*$/,'');if(current_hash!=jQuery.historyCurrentHash){location.hash=current_hash;jQuery.historyCurrentHash=current_hash;jQuery.historyCallback(current_hash.replace(/^#/,''));}}else if(jQuery.browser.safari){if(jQuery.lastHistoryLength==history.length&&jQuery.historyBackStack.length>jQuery.lastHistoryLength){jQuery.historyBackStack.shift();}
if(!jQuery.dontCheck){var historyDelta=history.length-jQuery.historyBackStack.length;jQuery.lastHistoryLength=history.length;if(historyDelta){jQuery.isFirst=false;if(historyDelta<0){for(var i=0;i<Math.abs(historyDelta);i++)jQuery.historyForwardStack.unshift(jQuery.historyBackStack.pop());}else{for(var i=0;i<historyDelta;i++)jQuery.historyBackStack.push(jQuery.historyForwardStack.shift());}
var cachedHash=jQuery.historyBackStack[jQuery.historyBackStack.length-1];if(cachedHash!=undefined){jQuery.historyCurrentHash=location.hash.replace(/\?.*$/,'');jQuery.historyCallback(cachedHash);}}else if(jQuery.historyBackStack[jQuery.historyBackStack.length-1]==undefined&&!jQuery.isFirst){if(location.hash){var current_hash=location.hash;jQuery.historyCallback(location.hash.replace(/^#/,''));}else{var current_hash='';jQuery.historyCallback('');}
jQuery.isFirst=true;}}}else{var current_hash=location.hash.replace(/\?.*$/,'');if(current_hash!=jQuery.historyCurrentHash){jQuery.historyCurrentHash=current_hash;jQuery.historyCallback(current_hash.replace(/^#/,''));}}},historyLoad:function(hash){var newhash;hash=decodeURIComponent(hash.replace(/\?.*$/,''));if(jQuery.browser.safari){newhash=hash;}
else{newhash='#'+hash;location.hash=newhash;}
jQuery.historyCurrentHash=newhash;if(jQuery.browser.msie){var ihistory=jQuery("#jQuery_history")[0];var iframe=ihistory.contentWindow.document;iframe.open();iframe.close();iframe.location.hash=newhash;jQuery.lastHistoryLength=history.length;jQuery.historyCallback(hash);}
else if(jQuery.browser.safari){jQuery.dontCheck=true;this.historyAddHistory(hash);var fn=function(){jQuery.dontCheck=false;};window.setTimeout(fn,200);jQuery.historyCallback(hash);location.hash=newhash;}
else{jQuery.historyCallback(hash);}}});
(function($){Nx.Module.ImageGallery=function($ctx,sandbox,modId){Nx.Module.call(this,$ctx,sandbox,modId);};Nx.Module.ImageGallery.prototype=new Nx.Module();Nx.Module.ImageGallery.prototype.constructor=Nx.Module.ImageGallery;$.extend(Nx.Module.ImageGallery.prototype,{dependencies:function(){},beforeBinding:function(callback){callback();},onBinding:function(){var that=this;this.gallery=$('.navigation',that.$ctx).galleriffic({delay:0,numThumbs:5,preloadAhead:10,enableTopPager:false,enableBottomPager:true,imageContainerSel:$('.slideshow',that.$ctx),controlsContainerSel:$('.controls',that.$ctx),captionContainerSel:$('.caption-container',that.$ctx),loadingContainerSel:$('.loading',that.$ctx),renderSSControls:false,renderNavControls:true,enableKeyboardNavigation:false,prevLinkText:$('.controls',that.$ctx).attr("data-prev"),nextLinkText:$('.controls',that.$ctx).attr("data-next"),nextPageLinkText:$('.controls',that.$ctx).attr("data-next"),prevPageLinkText:$('.controls',that.$ctx).attr("data-prev"),enableHistory:true,autoStart:false,syncTransitions:true,defaultTransitionDuration:0});this.gallery.find('a.prev').click(function(e){that.gallery.previousPage();e.preventDefault();});this.gallery.find('a.next').click(function(e){that.gallery.nextPage();e.preventDefault();});$.historyInit(this.pageload,"advanced.html");$("a[rel='history']",that.$ctx).live('click',function(e){if(e.button!=0)return true;var hash=this.href;hash=hash.replace(/^.*#/,'');$.historyLoad(hash);return false;});$("a.zoom",that.$ctx).live('click',$.proxy(this.showLightbox,this));if($("#fancybox-close span").length===0){if(typeof(closeTxt=$('.navigation',that.$ctx).attr('data-close'))==='undefined')closeTxt='x';$("#fancybox-close").append('<span>'+closeTxt+'</span>');}},afterBinding:function(){},pageload:function(hash){if(hash){$.galleriffic.gotoImage(hash);}else{this.gallery.gotoIndex(0);}},showLightbox:function(event){event.preventDefault();var href=$(event.target).attr('href');var title=$(event.target).attr('title');$.fancybox({'href':href,'title':title,'titlePosition':'over','overlayOpacity':0.9,'overlayColor':'#000','padding':10});}});})(Nx.$);
(function($){Nx.Module.ImageTeaser=function($ctx,sandbox,modId){Nx.Module.call(this,$ctx,sandbox,modId);};Nx.Module.ImageTeaser.prototype=new Nx.Module();Nx.Module.ImageTeaser.prototype.constructor=Nx.Module.ImageTeaser;$.extend(Nx.Module.ImageTeaser.prototype,{dependencies:function(){},beforeBinding:function(callback){callback();},onBinding:function(){},afterBinding:function(){}});})(Nx.$);;(function($){Nx.Module.ImageTeaser.Slide=function(parent){this.onBinding=function(){var that=this;that.$ctx.bind('mouseenter',$.proxy(function(){var thisMod=this;if(thisMod.timer){window.clearTimeout(thisMod.timer);}
thisMod.timer=window.setTimeout(function(){$('.desc, .overlay',that.$ctx).animate({top:that.$ctx.data('endTop')},500);},500);},that));that.$ctx.bind('mouseleave',$.proxy(function(){if(this.timer){window.clearTimeout(this.timer);}
$('.desc, .overlay',that.$ctx).animate({top:that.$ctx.data('startTop')},500);},that));};this.afterBinding=function(){var that=this;if($('img',that.$ctx).get(0).complete){initSettings(that);}else{$('img',that.$ctx).bind('load',function(){initSettings(that);});}};initSettings=function(that){that.$ctx.data('startTop',$('img',that.$ctx).height()-parseInt($('.desc h2, .desc h3, .desc .h2, .desc .h3',that.$ctx).outerHeight(true)));$('.desc, .overlay',that.$ctx).css('top',that.$ctx.data('startTop')).css('bottom','auto').find('p').show();$('.overlay',that.$ctx).height($('.desc',that.$ctx).height());that.$ctx.data('endTop',$('img',that.$ctx).height()-$('.desc',that.$ctx).height());};};})(Nx.$);
(function($){Nx.Module.Breadcrumb=function($ctx,sandbox,modId){Nx.Module.call(this,$ctx,sandbox,modId);};Nx.Module.Breadcrumb.prototype=new Nx.Module();Nx.Module.Breadcrumb.prototype.constructor=Nx.Module.Breadcrumb;$.extend(Nx.Module.Breadcrumb.prototype,{timer:null,dependencies:function(){},beforeBinding:function(callback){callback();},onBinding:function(){var that=this;},afterBinding:function(){var that=this;if($.browser.msie&&$.browser.version=="7.0"){$("li:gt(0)",that.$ctx).before("> ");}}});})(Nx.$);
(function($){Nx.Module.Flvvideo=function($ctx,sandbox,modId){Nx.Module.call(this,$ctx,sandbox,modId);};Nx.Module.Flvvideo.prototype=new Nx.Module();Nx.Module.Flvvideo.prototype.constructor=Nx.Module.Flvvideo;$.extend(Nx.Module.Flvvideo.prototype,{dependencies:function(){},beforeBinding:function(callback){callback();},onBinding:function(){},afterBinding:function(){}});})(Nx.$);
(function($){Nx.Module.Form=function($ctx,sandbox,modId){Nx.Module.call(this,$ctx,sandbox,modId);};Nx.Module.Form.prototype=new Nx.Module();Nx.Module.Form.prototype.constructor=Nx.Module.Form;$.extend(Nx.Module.Form.prototype,{dependencies:function(){},beforeBinding:function(callback){callback();},onBinding:function(){},afterBinding:function(){}});})(Nx.$);
(function($){Nx.Module.ImageGallery=function($ctx,sandbox,modId){Nx.Module.call(this,$ctx,sandbox,modId);};Nx.Module.ImageGallery.prototype=new Nx.Module();Nx.Module.ImageGallery.prototype.constructor=Nx.Module.ImageGallery;$.extend(Nx.Module.ImageGallery.prototype,{dependencies:function(){},beforeBinding:function(callback){callback();},onBinding:function(){var that=this;this.gallery=$('.navigation',that.$ctx).galleriffic({delay:0,numThumbs:5,preloadAhead:10,enableTopPager:false,enableBottomPager:true,imageContainerSel:$('.slideshow',that.$ctx),controlsContainerSel:$('.controls',that.$ctx),captionContainerSel:$('.caption-container',that.$ctx),loadingContainerSel:$('.loading',that.$ctx),renderSSControls:false,renderNavControls:true,enableKeyboardNavigation:false,prevLinkText:$('.controls',that.$ctx).attr("data-prev"),nextLinkText:$('.controls',that.$ctx).attr("data-next"),nextPageLinkText:$('.controls',that.$ctx).attr("data-next"),prevPageLinkText:$('.controls',that.$ctx).attr("data-prev"),enableHistory:true,autoStart:false,syncTransitions:true,defaultTransitionDuration:0});this.gallery.find('a.prev').click(function(e){that.gallery.previousPage();e.preventDefault();});this.gallery.find('a.next').click(function(e){that.gallery.nextPage();e.preventDefault();});$.historyInit(this.pageload,"advanced.html");$("a[rel='history']",that.$ctx).live('click',function(e){if(e.button!=0)return true;var hash=this.href;hash=hash.replace(/^.*#/,'');$.historyLoad(hash);return false;});$("a.zoom",that.$ctx).live('click',$.proxy(this.showLightbox,this));if($("#fancybox-close span").length===0){if(typeof(closeTxt=$('.navigation',that.$ctx).attr('data-close'))==='undefined')closeTxt='x';$("#fancybox-close").append('<span>'+closeTxt+'</span>');}},afterBinding:function(){},pageload:function(hash){if(hash){$.galleriffic.gotoImage(hash);}else{this.gallery.gotoIndex(0);}},showLightbox:function(event){event.preventDefault();var href=$(event.target).attr('href');var title=$(event.target).attr('title');$.fancybox({'href':href,'title':title,'titlePosition':'over','overlayOpacity':0.9,'overlayColor':'#000','padding':10});}});})(Nx.$);
(function($){Nx.Module.ImageTeaser=function($ctx,sandbox,modId){Nx.Module.call(this,$ctx,sandbox,modId);};Nx.Module.ImageTeaser.prototype=new Nx.Module();Nx.Module.ImageTeaser.prototype.constructor=Nx.Module.ImageTeaser;$.extend(Nx.Module.ImageTeaser.prototype,{dependencies:function(){},beforeBinding:function(callback){callback();},onBinding:function(){},afterBinding:function(){}});})(Nx.$);;(function($){Nx.Module.ImageTeaser.Slide=function(parent){this.onBinding=function(){var that=this;that.$ctx.bind('mouseenter',$.proxy(function(){var thisMod=this;if(thisMod.timer){window.clearTimeout(thisMod.timer);}
thisMod.timer=window.setTimeout(function(){$('.desc, .overlay',that.$ctx).animate({top:that.$ctx.data('endTop')},500);},500);},that));that.$ctx.bind('mouseleave',$.proxy(function(){if(this.timer){window.clearTimeout(this.timer);}
$('.desc, .overlay',that.$ctx).animate({top:that.$ctx.data('startTop')},500);},that));};this.afterBinding=function(){var that=this;if($('img',that.$ctx).get(0).complete){initSettings(that);}else{if($.browser.msie){window.attachEvent('onload',function(){initSettings(that);});}else{console.log("BAR");$('img',that.$ctx).bind('load',function(){initSettings(that);});}}};initSettings=function(that){that.$ctx.data('startTop',$('img',that.$ctx).height()-parseInt($('.desc h2, .desc h3, .desc .h2, .desc .h3',that.$ctx).outerHeight(true)));$('.desc, .overlay',that.$ctx).css('top',that.$ctx.data('startTop')).css('bottom','auto').find('p').show();$('.overlay',that.$ctx).height($('.desc',that.$ctx).height());that.$ctx.data('endTop',$('img',that.$ctx).height()-$('.desc',that.$ctx).height());};};})(Nx.$);
(function($){Nx.Module.ProductFinder=function($ctx,sandbox,modId){Nx.Module.call(this,$ctx,sandbox,modId);};Nx.Module.ProductFinder.prototype=new Nx.Module();Nx.Module.ProductFinder.prototype.constructor=Nx.Module.ProductFinder;$.extend(Nx.Module.ProductFinder.prototype,{dependencies:function(){},beforeBinding:function(callback){callback();},onBinding:function(){var that=this;var initialCall=true;$(".top_nav>li>a",that.$ctx).click(function(){$(".second_nav>li>a",that.$ctx).parent().removeClass("active");if(!$(this).hasClass("all_products")){if(!$(this).parent().hasClass("extended")){$("li",$(this).parent().parent()).removeClass("extended").children(".second_nav").slideUp();$(this).parent().addClass("extended").children(".second_nav").slideDown();$(".top_nav>li",that.$ctx).hide();$(".top_nav>li.extended",that.$ctx).show();$(".top_nav>li>a.all_products",that.$ctx).show().parent().show();$(".pagination",that.$ctx).show();$(".btn.prev",that.$ctx).show();$(".btn.next",that.$ctx).show();that.getResults(that,$(this).attr("href"),initialCall);}
else{that.getResults(that,$(this).attr("href"),initialCall);}}
return false;});$(".top_nav>li>a.all_products",that.$ctx).click(function(){$(".second_nav",that.$ctx).slideUp(500,function(){$(".top_nav>li.extended",that.$ctx).removeClass("extended");$(".top_nav>li",that.$ctx).show();$(".top_nav>li>a.all_products",that.$ctx).hide().parent().hide();$(".second_nav li",that.$ctx).removeClass("active");});that.getCategories();});$(".second_nav>li>a",that.$ctx).click(function(){$(".second_nav>li>a",that.$ctx).parent().removeClass("active");$(this).parent().addClass("active");that.getResults(that,$(this).attr("href"),initialCall);return false;});$(".result ul.carousel",that.$ctx).carouFredSel({circular:false,infinite:false,width:699,height:200,items:{visible:5,minimum:5},scroll:{items:5,easing:"linear",duration:500},auto:false,prev:{button:$(".prev",that.$ctx)},next:{button:$(".next",that.$ctx)}});},afterBinding:function(){var that=this;that.getCategories();var elem=$(".top_nav>li a.initial:first",that.$ctx);if(elem.parent().parent().hasClass("second_nav")){elem.parent().parent().show();elem.parent().parent().parent().addClass("extended");$(".top_nav>li",that.$ctx).hide();$(".top_nav>li.extended>a",that.$ctx).show().parent().show();$(".top_nav>li>a.all_products",that.$ctx).show().parent().show();}
elem.trigger("click");},getResults:function(that,params,initialCall){var that=this;$.ajax({url:params,dataType:'json',cache:true,beforeSend:function(){$('.caroufredsel_wrapper',that.$ctx).append('<div class="loading"></div>');$('.caroufredsel_wrapper .loading').fadeIn(300);},success:function(data){var $curItems=$(".products li",that.$ctx);var curData=data;$(".products.carousel",that.$ctx).fadeTo(300,0,function(){$("li",$(this)).each(function(i){$(".result ul",that.$ctx).trigger("removeItem",i);});$(".result a.prev").addClass('disabled');if($(curData.result).size()>5){$(".result a.next").removeClass('disabled');}
$.each(curData.result,function(i,item){var tags="";var separator="";if(item.tags){$.each(item.tags,function(cur,curItem){tags+=separator+curItem.tag;separator=" ,";});if(tags.length){tags=" ("+tags+")";}}
$(".result ul",that.$ctx).trigger("insertItem",'<li><a href="'+item.href+'"><img src="'+item.src+'" alt="'+item.title+tags+'" title="'+item.title+tags+'" /><h4>'+item.title+'</h4></a></li>');});var listItems=curData.result.length;if(listItems<6){$('.next',that.$ctx).addClass('disabled');}
$(this).fadeTo(300,1,function(){$('.caroufredsel_wrapper .loading').fadeOut(300);$('.caroufredsel_wrapper .loading',that.$ctx).remove();});});$(".result .total",that.$ctx).html(curData.message);if(initialCall){$(".teaser",that.$ctx).hide();$(".result",that.$ctx).show();}}});},getCategories:function(){var that=$(this);$(".products.carousel",that.$ctx).fadeTo(300,0,function(){$("li",$(this)).each(function(i){$(".result ul",that.$ctx).trigger("removeItem",i);});$(".result a.prev").addClass('disabled');if($(".products.categories li").size()>5){$(".result a.next").removeClass('disabled');}
$(".products.categories li").each(function(i,item){$(".result ul",that.$ctx).trigger("insertItem",$(item).clone());});$(this).fadeTo(300,1,function(){$('.caroufredsel_wrapper .loading').fadeOut(300);$('.caroufredsel_wrapper .loading',that.$ctx).remove();});});}});})(Nx.$);
(function($){Nx.Module.ProductPresenter=function($ctx,sandbox,modId){Nx.Module.call(this,$ctx,sandbox,modId);};Nx.Module.ProductPresenter.prototype=new Nx.Module();Nx.Module.ProductPresenter.prototype.constructor=Nx.Module.ProductPresenter;$.extend(Nx.Module.ProductPresenter.prototype,{dependencies:function(){},beforeBinding:function(callback){callback();},onBinding:function(){var that=this;$("ul.carousel",that.$ctx).carouFredSel({circular:false,infinite:false,width:644,height:200,items:{visible:4,minimum:4},scroll:{items:4,easing:"linear",duration:500},auto:false,prev:{button:$(".prev",that.$ctx)},next:{button:$(".next",that.$ctx)}});},afterBinding:function(){}});})(Nx.$);
(function($){Nx.Module.ProduktBerater=function($ctx,sandbox,modId){Nx.Module.call(this,$ctx,sandbox,modId);};Nx.Module.ProduktBerater.prototype=new Nx.Module();Nx.Module.ProduktBerater.prototype.constructor=Nx.Module.ProduktBerater;$.extend(Nx.Module.ProduktBerater.prototype,{dependencies:function(){},beforeBinding:function(callback){callback();},onBinding:function(){},afterBinding:function(){}});})(Nx.$);
(function($){Nx.Module.SiteActionBar=function($ctx,sandbox,modId){Nx.Module.call(this,$ctx,sandbox,modId);};Nx.Module.SiteActionBar.prototype=new Nx.Module();Nx.Module.SiteActionBar.prototype.constructor=Nx.Module.SiteActionBar;$.extend(Nx.Module.SiteActionBar.prototype,{dependencies:function(){},beforeBinding:function(callback){callback();},onBinding:function(){var that=this;},afterBinding:function(){}});})(Nx.$);
(function($){Nx.Module.SocialLinks=function($ctx,sandbox,modId){Nx.Module.call(this,$ctx,sandbox,modId);};Nx.Module.SocialLinks.prototype=new Nx.Module();Nx.Module.SocialLinks.prototype.constructor=Nx.Module.SocialLinks;$.extend(Nx.Module.SocialLinks.prototype,{dependencies:function(){},beforeBinding:function(callback){callback();},onBinding:function(){},afterBinding:function(){}});})(Nx.$);
(function($){Nx.Module.StageCarousel=function($ctx,sandbox,modId){Nx.Module.call(this,$ctx,sandbox,modId);};Nx.Module.StageCarousel.prototype=new Nx.Module();Nx.Module.StageCarousel.prototype.constructor=Nx.Module.StageCarousel;$.extend(Nx.Module.StageCarousel.prototype,{dependencies:function(){},beforeBinding:function(callback){callback();},onBinding:function(){var that=this;that.$ctx.carousel=$(".bd:first",that.$ctx).carouFredSel({items:{visible:1,minimum:1},scroll:{items:1,easing:"linear",duration:3000,pauseDuration:3000,pauseOnHover:true},auto:4000,prev:{button:$(".prev",that.$ctx),items:1,duration:2000},next:{button:$(".next",that.$ctx),items:1,duration:2000}});that.$ctx.carousel.bind("pauseHover",function(){$(".caroufredsel_wrapper",that.$ctx).unbind("mouseleave");});that.$ctx.carousel.bind("playHover",function(){$(".caroufredsel_wrapper",that.$ctx).bind("mouseleave",function(){$(".bd:first",that.$ctx).trigger("play");});});$(".bd:first",that.$ctx).bind("next",function(){});},afterBinding:function(){}});})(Nx.$);
(function($){Nx.Module.TeaserCarousel=function($ctx,sandbox,modId){Nx.Module.call(this,$ctx,sandbox,modId);};Nx.Module.TeaserCarousel.prototype=new Nx.Module();Nx.Module.TeaserCarousel.prototype.constructor=Nx.Module.TeaserCarousel;$.extend(Nx.Module.TeaserCarousel.prototype,{dependencies:function(){},beforeBinding:function(callback){callback();},onBinding:function(){var that=this;$(".bd:first",that.$ctx).carouFredSel({width:960,height:160,items:{visible:5,minimum:5},scroll:{items:5,easing:"linear",duration:2000},auto:false,prev:{button:$(".prev",that.$ctx),onBefore:function(oldItems,newItems,newSizes,duration){that.$ctx.data('blocked','true');$(".active",that.$ctx).removeClass('active').animate({width:160},300);$($(newItems)[0]).addClass('active').animate({width:320},600);},onAfter:function(oldItems,newItems,newSizes,duration){that.$ctx.data('blocked','false');}},next:{button:$(".next",that.$ctx),onBefore:function(oldItems,newItems,newSizes,duration){that.$ctx.data('blocked','true');$(".active",that.$ctx).removeClass('active').animate({width:160},300);$($(newItems)[0]).addClass('active').animate({width:320},600);},onAfter:function(oldItems,newItems,newSizes,duration){that.$ctx.data('blocked','false');}}});$(".bd > .mod",that.$ctx).bind('mouseenter',function(){var thisMod=this;if(thisMod.timer){window.clearTimeout(thisMod.timer);}
thisMod.timer=window.setTimeout(function(){if(!$(thisMod).hasClass('active')&&that.$ctx.data('blocked')==='false'){that.$ctx.data('blocked','true');$(".active",that.$ctx).removeClass('active').animate({width:160},500,function(){that.$ctx.data('blocked','false');});$(thisMod).addClass('active').animate({width:320},475);}},400);});$(".bd > .mod",that.$ctx).bind('mouseleave',function(){if(this.timer){window.clearTimeout(this.timer);}});},afterBinding:function(){var that=this;$(".mod:first",that.$ctx).addClass('active').css("width","320px");that.$ctx.data('blocked','false');that.$ctx.data('next','-1');}});})(Nx.$);
(function($){Nx.Module.TippBox=function($ctx,sandbox,modId){Nx.Module.call(this,$ctx,sandbox,modId);};Nx.Module.TippBox.prototype=new Nx.Module();Nx.Module.TippBox.prototype.constructor=Nx.Module.TippBox;$.extend(Nx.Module.TippBox.prototype,{dependencies:function(){},beforeBinding:function(callback){callback();},onBinding:function(){var that=this;$(".bd ul li",that.$ctx).css('width',that.$ctx.width()+'px');var curHeight=$(".bd ul",that.$ctx).height();$(".bd ul",that.$ctx).carouFredSel({height:curHeight,circular:false,infinite:false,items:{visible:1,minimum:1,height:curHeight},scroll:{duration:0},auto:false,prev:{button:$(".prev",that.$ctx)},next:{button:$(".next",that.$ctx)},pagination:{container:$(".pagination",that.$ctx)}});},afterBinding:function(){}});})(Nx.$);
(function($){Nx.Module.Video=function($ctx,sandbox,modId){Nx.Module.call(this,$ctx,sandbox,modId);};Nx.Module.Video.prototype=new Nx.Module();Nx.Module.Video.prototype.constructor=Nx.Module.Video;$.extend(Nx.Module.Video.prototype,{dependencies:function(){},beforeBinding:function(callback){callback();},onBinding:function(){},afterBinding:function(){}});})(Nx.$);
(function($){Nx.Module.Visual=function($ctx,sandbox,modId){Nx.Module.call(this,$ctx,sandbox,modId);};Nx.Module.Visual.prototype=new Nx.Module();Nx.Module.Visual.prototype.constructor=Nx.Module.Visual;$.extend(Nx.Module.Visual.prototype,{dependencies:function(){var that=this;var done=false;var player;if($("iframe",that.$ctx).get(0)){var tag=document.createElement('script');tag.src="http://www.youtube.com/player_api";$("body").append(tag);}},beforeBinding:function(callback){var that=this;callback();},onBinding:function(){},afterBinding:function(){}});})(Nx.$);function onYouTubePlayerAPIReady(){Nx.$(".modStageCarousel iframe").each(function(){var iframe=Nx.$(this);var videoID=null;var rndNum=Math.round(Math.random()*1000);iframe.parent().append("<div id='YTVideo"+rndNum+"'>");videoID=iframe.attr("src");videoID=videoID.split("embed/")[1];iframe.remove();player=new YT.Player('YTVideo'+rndNum,{height:'420',width:'960',videoId:videoID,events:{'onStateChange':onStateChange}});});};function onStateChange(event){if(event.data==1||event.data==3){Nx.$(".modStageCarousel .bd:first").trigger("pauseHover").trigger("pause");}else{Nx.$(".modStageCarousel .bd:first").trigger("playHover").trigger("play");}};
(function($){Nx.Module.Voting=function($ctx,sandbox,modId){Nx.Module.call(this,$ctx,sandbox,modId);};Nx.Module.Voting.prototype=new Nx.Module();Nx.Module.Voting.prototype.constructor=Nx.Module.Voting;$.extend(Nx.Module.Voting.prototype,{dependencies:function(){},beforeBinding:function(callback){callback();},onBinding:function(){},afterBinding:function(){}});})(Nx.$);;(function($){Nx.Module.Voting.Active=function(parent){this.onBinding=function(){var that=this;var $curForm=$("form",that.$ctx);var multiVote=(parseInt($(":[name='expires']",$curForm).attr("value"))===-1)?true:false;var cookie=$.cookie($curForm.attr('id'));if(cookie&&!multiVote){getResults(that,$curForm,'showResult=true',cookie,multiVote);}else{if(cookie)$.cookie($curForm.attr('id'),null,{path:'/'});$("button",that.$ctx).bind("click",function(event){event.preventDefault();if($('input:radio:checked',$curForm).length>0){getResults(that,$curForm,$curForm.serialize(),cookie,multiVote);}else{$('input:radio:first',$curForm).focus();}});}};getResults=function(that,$curForm,params,cookie,multiVote){$.ajax({url:$curForm.attr("action"),dataType:'json',cache:false,data:params,success:function(data){var curUnit=$(":[name='output']",$curForm).attr("value");var curResults=(typeof(data.intro)!='undefined')?data.intro+'<dl>':'<dl>';var curExpires=parseInt($(":[name='expires']",$curForm).attr("value"));$.each(data.results,function(i,item){var curValue=(curUnit==='percent')?item.percent+'%':item.number;curResults+='<dd>'+item.label+'</dd><dt><span style="width:'+item.percent*3+'px;"></span>'+curValue+'</dt>';});curResults+="</dl>";if(curUnit==='number'&&typeof(data.totalNum)!='undefined')curResults+=data.totalNum;$(".voting",that.$ctx).hide();$(".result",that.$ctx).append(curResults).show();if(!cookie&&!multiVote)$.cookie($curForm.attr('id'),true,{expires:curExpires,path:'/'});}});};};})(Nx.$);
