var MooTools={version:'1.11'};function $defined(obj){return(obj!=undefined);};function $type(obj){if(!$defined(obj))return false;if(obj.htmlElement)return'element';var type=typeof obj;if(type=='object'&&obj.nodeName){switch(obj.nodeType){case 1:return'element';case 3:return(/\S/).test(obj.nodeValue)?'textnode':'whitespace';}} if(type=='object'||type=='function'){switch(obj.constructor){case Array:return'array';case RegExp:return'regexp';case Class:return'class';} if(typeof obj.length=='number'){if(obj.item)return'collection';if(obj.callee)return'arguments';}} return type;};function $merge(){var mix={};for(var i=0;i-1:this.indexOf(string)>-1;},escapeRegExp:function(){return this.replace(/([.*+?^${}()|[\]\/\\])/g,'\\$1');}});Array.extend({rgbToHex:function(array){if(this.length<3)return false;if(this.length==4&&this[3]==0&&!array)return'transparent';var hex=[];for(var i=0;i<3;i++){var bit=(this[i]-0).toString(16);hex.push((bit.length==1)?'0'+bit:bit);} return array?hex:'#'+hex.join('');},hexToRgb:function(array){if(this.length!=3)return false;var rgb=[];for(var i=0;i<3;i++){rgb.push(parseInt((this[i].length==1)?this[i]+this[i]:this[i],16));} return array?rgb:'rgb('+rgb.join(',')+')';}});Function.extend({create:function(options){var fn=this;options=$merge({'bind':fn,'event':false,'arguments':null,'delay':false,'periodical':false,'attempt':false},options);if($chk(options.arguments)&&$type(options.arguments)!='array')options.arguments=[options.arguments];return function(event){var args;if(options.event){event=event||window.event;args=[(options.event===true)?event:new options.event(event)];if(options.arguments)args.extend(options.arguments);} else args=options.arguments||arguments;var returns=function(){return fn.apply($pick(options.bind,fn),args);};if(options.delay)return setTimeout(returns,options.delay);if(options.periodical)return setInterval(returns,options.periodical);if(options.attempt)try{return returns();}catch(err){return false;};return returns();};},pass:function(args,bind){return this.create({'arguments':args,'bind':bind});},attempt:function(args,bind){return this.create({'arguments':args,'bind':bind,'attempt':true})();},bind:function(bind,args){return this.create({'bind':bind,'arguments':args});},bindAsEventListener:function(bind,args){return this.create({'bind':bind,'event':true,'arguments':args});},delay:function(delay,bind,args){return this.create({'delay':delay,'bind':bind,'arguments':args})();},periodical:function(interval,bind,args){return this.create({'periodical':interval,'bind':bind,'arguments':args})();}});Number.extend({toInt:function(){return parseInt(this);},toFloat:function(){return parseFloat(this);},limit:function(min,max){return Math.min(max,Math.max(min,this));},round:function(precision){precision=Math.pow(10,precision||0);return Math.round(this*precision)/precision;},times:function(fn){for(var i=0;i';} el=document.createElement(el);} el=$(el);return(!props||!el)?el:el.set(props);}});var Elements=new Class({initialize:function(elements){return(elements)?$extend(elements,this):this;}});Elements.extend=function(props){for(var prop in props){this.prototype[prop]=props[prop];this[prop]=$native.generic(prop);}};function $(el){if(!el)return null;if(el.htmlElement)return Garbage.collect(el);if([window,document].contains(el))return el;var type=$type(el);if(type=='string'){el=document.getElementById(el);type=(el)?'element':false;} if(type!='element')return null;if(el.htmlElement)return Garbage.collect(el);if(['object','embed'].contains(el.tagName.toLowerCase()))return el;$extend(el,Element.prototype);el.htmlElement=function(){};return Garbage.collect(el);};document.getElementsBySelector=document.getElementsByTagName;function $$(){var elements=[];for(var i=0,j=arguments.length;i0&&fKey<13)this.key='f'+fKey;} this.key=this.key||String.fromCharCode(this.code).toLowerCase();}else if(this.type.test(/(click|mouse|menu)/)){this.page={'x':event.pageX||event.clientX+document.documentElement.scrollLeft,'y':event.pageY||event.clientY+document.documentElement.scrollTop};this.client={'x':event.pageX?event.pageX-window.pageXOffset:event.clientX,'y':event.pageY?event.pageY-window.pageYOffset:event.clientY};this.rightClick=(event.which==3)||(event.button==2);switch(this.type){case'mouseover':this.relatedTarget=event.relatedTarget||event.fromElement;break;case'mouseout':this.relatedTarget=event.relatedTarget||event.toElement;} this.fixRelatedTarget();} return this;},stop:function(){return this.stopPropagation().preventDefault();},stopPropagation:function(){if(this.event.stopPropagation)this.event.stopPropagation();else this.event.cancelBubble=true;return this;},preventDefault:function(){if(this.event.preventDefault)this.event.preventDefault();else this.event.returnValue=false;return this;}});Event.fix={relatedTarget:function(){if(this.relatedTarget&&this.relatedTarget.nodeType==3)this.relatedTarget=this.relatedTarget.parentNode;},relatedTargetGecko:function(){try{Event.fix.relatedTarget.call(this);}catch(e){this.relatedTarget=this.target;}}};Event.prototype.fixRelatedTarget=(window.gecko)?Event.fix.relatedTargetGecko:Event.fix.relatedTarget;Event.keys=new Abstract({'enter':13,'up':38,'down':40,'left':37,'right':39,'esc':27,'space':32,'backspace':8,'tab':9,'delete':46});Element.Methods.Events={addEvent:function(type,fn){this.$events=this.$events||{};this.$events[type]=this.$events[type]||{'keys':[],'values':[]};if(this.$events[type].keys.contains(fn))return this;this.$events[type].keys.push(fn);var realType=type;var custom=Element.Events[type];if(custom){if(custom.add)custom.add.call(this,fn);if(custom.map)fn=custom.map;if(custom.type)realType=custom.type;} if(!this.addEventListener)fn=fn.create({'bind':this,'event':true});this.$events[type].values.push(fn);return(Element.NativeEvents.contains(realType))?this.addListener(realType,fn):this;},removeEvent:function(type,fn){if(!this.$events||!this.$events[type])return this;var pos=this.$events[type].keys.indexOf(fn);if(pos==-1)return this;var key=this.$events[type].keys.splice(pos,1)[0];var value=this.$events[type].values.splice(pos,1)[0];var custom=Element.Events[type];if(custom){if(custom.remove)custom.remove.call(this,fn);if(custom.type)type=custom.type;} return(Element.NativeEvents.contains(type))?this.removeListener(type,value):this;},addEvents:function(source){return Element.setMany(this,'addEvent',source);},removeEvents:function(type){if(!this.$events)return this;if(!type){for(var evType in this.$events)this.removeEvents(evType);this.$events=null;}else if(this.$events[type]){this.$events[type].keys.each(function(fn){this.removeEvent(type,fn);},this);this.$events[type]=null;} return this;},fireEvent:function(type,args,delay){if(this.$events&&this.$events[type]){this.$events[type].keys.each(function(fn){fn.create({'bind':this,'delay':delay,'arguments':args})();},this);} return this;},cloneEvents:function(from,type){if(!from.$events)return this;if(!type){for(var evType in from.$events)this.cloneEvents(from,evType);}else if(from.$events[type]){from.$events[type].keys.each(function(fn){this.addEvent(type,fn);},this);} return this;}};window.extend(Element.Methods.Events);document.extend(Element.Methods.Events);Element.extend(Element.Methods.Events);Element.Events=new Abstract({'mouseenter':{type:'mouseover',map:function(event){event=new Event(event);if(event.relatedTarget!=this&&!this.hasChild(event.relatedTarget))this.fireEvent('mouseenter',event);}},'mouseleave':{type:'mouseout',map:function(event){event=new Event(event);if(event.relatedTarget!=this&&!this.hasChild(event.relatedTarget))this.fireEvent('mouseleave',event);}},'mousewheel':{type:(window.gecko)?'DOMMouseScroll':'mousewheel'}});Element.NativeEvents=['click','dblclick','mouseup','mousedown','mousewheel','DOMMouseScroll','mouseover','mouseout','mousemove','keydown','keypress','keyup','load','unload','beforeunload','resize','move','focus','blur','change','submit','reset','select','error','abort','contextmenu','scroll'];Function.extend({bindWithEvent:function(bind,args){return this.create({'bind':bind,'arguments':args,'event':Event});}});Elements.extend({filterByTag:function(tag){return new Elements(this.filter(function(el){return(Element.getTag(el)==tag);}));},filterByClass:function(className,nocash){var elements=this.filter(function(el){return(el.className&&el.className.contains(className,' '));});return(nocash)?elements:new Elements(elements);},filterById:function(id,nocash){var elements=this.filter(function(el){return(el.id==id);});return(nocash)?elements:new Elements(elements);},filterByAttribute:function(name,operator,value,nocash){var elements=this.filter(function(el){var current=Element.getProperty(el,name);if(!current)return false;if(!operator)return true;switch(operator){case'=':return(current==value);case'*=':return(current.contains(value));case'^=':return(current.substr(0,value.length)==value);case'$=':return(current.substr(current.length-value.length)==value);case'!=':return(current!=value);case'~=':return current.contains(value,' ');} return false;});return(nocash)?elements:new Elements(elements);}});function $E(selector,filter){return($(filter)||document).getElement(selector);};function $ES(selector,filter){return($(filter)||document).getElementsBySelector(selector);};$$.shared={'regexp':/^(\w*|\*)(?:#([\w-]+)|\.([\w-]+))?(?:\[(\w+)(?:([!*^$]?=)["']?([^"'\]]*)["']?)?])?$/,'xpath':{getParam:function(items,context,param,i){var temp=[context.namespaceURI?'xhtml:':'',param[1]];if(param[2])temp.push('[@id="',param[2],'"]');if(param[3])temp.push('[contains(concat(" ", @class, " "), " ',param[3],' ")]');if(param[4]){if(param[5]&¶m[6]){switch(param[5]){case'*=':temp.push('[contains(@',param[4],', "',param[6],'")]');break;case'^=':temp.push('[starts-with(@',param[4],', "',param[6],'")]');break;case'$=':temp.push('[substring(@',param[4],', string-length(@',param[4],') - ',param[6].length,' + 1) = "',param[6],'"]');break;case'=':temp.push('[@',param[4],'="',param[6],'"]');break;case'!=':temp.push('[@',param[4],'!="',param[6],'"]');}}else{temp.push('[@',param[4],']');}} items.push(temp.join(''));return items;},getItems:function(items,context,nocash){var elements=[];var xpath=document.evaluate('.//'+items.join('//'),context,$$.shared.resolver,XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,null);for(var i=0,j=xpath.snapshotLength;i<\/script>');$('ie_ready').onreadystatechange=function(){if(this.readyState=='complete')domReady();};}}else{window.addListener("load",domReady);document.addListener("DOMContentLoaded",domReady);}}};window.onDomReady=function(fn){return this.addEvent('domready',fn);};window.extend({getWidth:function(){if(this.webkit419)return this.innerWidth;if(this.opera)return document.body.clientWidth;return document.documentElement.clientWidth;},getHeight:function(){if(this.webkit419)return this.innerHeight;if(this.opera)return document.body.clientHeight;return document.documentElement.clientHeight;},getScrollWidth:function(){if(this.ie)return Math.max(document.documentElement.offsetWidth,document.documentElement.scrollWidth);if(this.webkit)return document.body.scrollWidth;return document.documentElement.scrollWidth;},getScrollHeight:function(){if(this.ie)return Math.max(document.documentElement.offsetHeight,document.documentElement.scrollHeight);if(this.webkit)return document.body.scrollHeight;return document.documentElement.scrollHeight;},getScrollLeft:function(){return this.pageXOffset||document.documentElement.scrollLeft;},getScrollTop:function(){return this.pageYOffset||document.documentElement.scrollTop;},getSize:function(){return{'size':{'x':this.getWidth(),'y':this.getHeight()},'scrollSize':{'x':this.getScrollWidth(),'y':this.getScrollHeight()},'scroll':{'x':this.getScrollLeft(),'y':this.getScrollTop()}};},getPosition:function(){return{'x':0,'y':0};}});var Fx={};Fx.Base=new Class({options:{onStart:Class.empty,onComplete:Class.empty,onCancel:Class.empty,transition:function(p){return-(Math.cos(Math.PI*p)-1)/2;},duration:500,unit:'px',wait:true,fps:50},initialize:function(options){this.element=this.element||null;this.setOptions(options);if(this.options.initialize)this.options.initialize.call(this);},step:function(){var time=$time();if(time=(7-4*a)/11){value=-Math.pow((11-6*a-11*p)/4,2)+b*b;break;}} return value;},Elastic:function(p,x){return Math.pow(2,10*--p)*Math.cos(20*p*Math.PI*(x[0]||1)/3);}});['Quad','Cubic','Quart','Quint'].each(function(transition,i){Fx.Transitions[transition]=new Fx.Transition(function(p){return Math.pow(p,[i+2]);});Fx.Transitions.compat(transition);});var Drag={};Drag.Base=new Class({options:{handle:false,unit:'px',onStart:Class.empty,onBeforeStart:Class.empty,onComplete:Class.empty,onSnap:Class.empty,onDrag:Class.empty,limit:false,modifiers:{x:'left',y:'top'},grid:false,snap:6},initialize:function(el,options){this.setOptions(options);this.element=$(el);this.handle=$(this.options.handle)||this.element;this.mouse={'now':{},'pos':{}};this.value={'start':{},'now':{}};this.bound={'start':this.start.bindWithEvent(this),'check':this.check.bindWithEvent(this),'drag':this.drag.bindWithEvent(this),'stop':this.stop.bind(this)};this.attach();if(this.options.initialize)this.options.initialize.call(this);},attach:function(){this.handle.addEvent('mousedown',this.bound.start);return this;},detach:function(){this.handle.removeEvent('mousedown',this.bound.start);return this;},start:function(event){this.fireEvent('onBeforeStart',this.element);this.mouse.start=event.page;var limit=this.options.limit;this.limit={'x':[],'y':[]};for(var z in this.options.modifiers){if(!this.options.modifiers[z])continue;this.value.now[z]=this.element.getStyle(this.options.modifiers[z]).toInt();this.mouse.pos[z]=event.page[z]-this.value.now[z];if(limit&&limit[z]){for(var i=0;i<2;i++){if($chk(limit[z][i]))this.limit[z][i]=($type(limit[z][i])=='function')?limit[z][i]():limit[z][i];}}} if($type(this.options.grid)=='number')this.options.grid={'x':this.options.grid,'y':this.options.grid};document.addListener('mousemove',this.bound.check);document.addListener('mouseup',this.bound.stop);this.fireEvent('onStart',this.element);event.stop();},check:function(event){var distance=Math.round(Math.sqrt(Math.pow(event.page.x-this.mouse.start.x,2)+Math.pow(event.page.y-this.mouse.start.y,2)));if(distance>this.options.snap){document.removeListener('mousemove',this.bound.check);document.addListener('mousemove',this.bound.drag);this.drag(event);this.fireEvent('onSnap',this.element);} event.stop();},drag:function(event){this.out=false;this.mouse.now=event.page;for(var z in this.options.modifiers){if(!this.options.modifiers[z])continue;this.value.now[z]=this.mouse.now[z]-this.mouse.pos[z];if(this.limit[z]){if($chk(this.limit[z][1])&&(this.value.now[z]>this.limit[z][1])){this.value.now[z]=this.limit[z][1];this.out=true;}else if($chk(this.limit[z][0])&&(this.value.now[z]el.left&&now.xel.top);},stop:function(){if(this.overed&&!this.out)this.overed.fireEvent('drop',[this.element,this]);else this.element.fireEvent('emptydrop',this);this.parent();return this;}});Element.extend({makeDraggable:function(options){return new Drag.Move(this,options);}});var XHR=new Class({options:{method:'post',async:true,onRequest:Class.empty,onSuccess:Class.empty,onFailure:Class.empty,urlEncoded:true,encoding:'utf-8',autoCancel:false,headers:{}},setTransport:function(){this.transport=(window.XMLHttpRequest)?new XMLHttpRequest():(window.ie?new ActiveXObject('Microsoft.XMLHTTP'):false);return this;},initialize:function(options){this.setTransport().setOptions(options);this.options.isSuccess=this.options.isSuccess||this.isSuccess;this.headers={};if(this.options.urlEncoded&&this.options.method=='post'){var encoding=(this.options.encoding)?'; charset='+this.options.encoding:'';this.setHeader('Content-type','application/x-www-form-urlencoded'+encoding);} if(this.options.initialize)this.options.initialize.call(this);},onStateChange:function(){if(this.transport.readyState!=4||!this.running)return;this.running=false;var status=0;try{status=this.transport.status;}catch(e){};if(this.options.isSuccess.call(this,status))this.onSuccess();else this.onFailure();this.transport.onreadystatechange=Class.empty;},isSuccess:function(status){return((status>=200)&&(status<300));},onSuccess:function(){this.response={'text':this.transport.responseText,'xml':this.transport.responseXML};this.fireEvent('onSuccess',[this.response.text,this.response.xml]);this.callChain();},onFailure:function(){this.fireEvent('onFailure',this.transport);},setHeader:function(name,value){this.headers[name]=value;return this;},send:function(url,data){if(this.options.autoCancel)this.cancel();else if(this.running)return this;this.running=true;if(data&&this.options.method=='get'){url=url+(url.contains('?')?'&':'?')+data;data=null;} this.transport.open(this.options.method.toUpperCase(),url,this.options.async);this.transport.onreadystatechange=this.onStateChange.bind(this);if((this.options.method=='post')&&this.transport.overrideMimeType)this.setHeader('Connection','close');$extend(this.headers,this.options.headers);for(var type in this.headers)try{this.transport.setRequestHeader(type,this.headers[type]);}catch(e){};this.fireEvent('onRequest');this.transport.send($pick(data,null));return this;},cancel:function(){if(!this.running)return this;this.running=false;this.transport.abort();this.transport.onreadystatechange=Class.empty;this.setTransport();this.fireEvent('onCancel');return this;}});XHR.implement(new Chain,new Events,new Options);var Ajax=XHR.extend({options:{data:null,update:null,onComplete:Class.empty,evalScripts:false,evalResponse:false},initialize:function(url,options){this.addEvent('onSuccess',this.onComplete);this.setOptions(options);this.options.data=this.options.data||this.options.postBody;if(!['post','get'].contains(this.options.method)){this._method='_method='+this.options.method;this.options.method='post';} this.parent();this.setHeader('X-Requested-With','XMLHttpRequest');this.setHeader('Accept','text/javascript, text/html, application/xml, text/xml, */*');this.url=url;},onComplete:function(){if(this.options.update)$(this.options.update).empty().setHTML(this.response.text);if(this.options.evalScripts||this.options.evalResponse)this.evalScripts();this.fireEvent('onComplete',[this.response.text,this.response.xml],20);},request:function(data){data=data||this.options.data;switch($type(data)){case'element':data=$(data).toQueryString();break;case'object':data=Object.toQueryString(data);} if(this._method)data=(data)?[this._method,data].join('&'):this._method;return this.send(this.url,data);},evalScripts:function(){var script,scripts;if(this.options.evalResponse||(/(ecma|java)script/).test(this.getHeader('Content-type')))scripts=this.response.text;else{scripts=[];var regexp=/]*>([\s\S]*?)<\/script>/gi;while((script=regexp.exec(this.response.text)))scripts.push(script[1]);scripts=scripts.join('\n');} if(scripts)(window.execScript)?window.execScript(scripts):window.setTimeout(scripts,0);},getHeader:function(name){try{return this.transport.getResponseHeader(name);}catch(e){};return null;}});Object.toQueryString=function(source){var queryString=[];for(var property in source)queryString.push(encodeURIComponent(property)+'='+encodeURIComponent(source[property]));return queryString.join('&');};Element.extend({send:function(options){return new Ajax(this.getProperty('action'),$merge({data:this.toQueryString()},options,{method:'post'})).request();}});var Cookie=new Abstract({options:{domain:false,path:false,duration:false,secure:false},set:function(key,value,options){options=$merge(this.options,options);value=encodeURIComponent(value);if(options.domain)value+='; domain='+options.domain;if(options.path)value+='; path='+options.path;if(options.duration){var date=new Date();date.setTime(date.getTime()+options.duration*24*60*60*1000);value+='; expires='+date.toGMTString();} if(options.secure)value+='; secure';document.cookie=key+'='+value;return $extend(options,{'key':key,'value':value});},get:function(key){var value=document.cookie.match('(?:^|;)\\s*'+key.escapeRegExp()+'=([^;]*)');return value?decodeURIComponent(value[1]):false;},remove:function(cookie,options){if($type(cookie)=='object')this.set(cookie.key,'',$merge(cookie,{duration:-1}));else this.set(cookie,'',$merge(options,{duration:-1}));}});var Json={toString:function(obj){switch($type(obj)){case'string':return'"'+obj.replace(/(["\\])/g,'\\$1')+'"';case'array':return'['+obj.map(Json.toString).join(',')+']';case'object':var string=[];for(var property in obj)string.push(Json.toString(property)+':'+Json.toString(obj[property]));return'{'+string.join(',')+'}';case'number':if(isFinite(obj))break;case false:return'null';} return String(obj);},evaluate:function(str,secure){return(($type(str)!='string')||(secure&&!str.test(/^("(\\.|[^"\\\n\r])*?"|[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t])+?$/)))?null:eval('('+str+')');}};Json.Remote=XHR.extend({initialize:function(url,options){this.url=url;this.addEvent('onSuccess',this.onComplete);this.parent(options);this.setHeader('X-Request','JSON');},send:function(obj){return this.parent(this.url,'json='+Json.toString(obj));},onComplete:function(){this.fireEvent('onComplete',[Json.evaluate(this.response.text,this.options.secure)]);}});var Asset=new Abstract({javascript:function(source,properties){properties=$merge({'onload':Class.empty},properties);var script=new Element('script',{'src':source}).addEvents({'load':properties.onload,'readystatechange':function(){if(this.readyState=='complete')this.fireEvent('load');}});delete properties.onload;return script.setProperties(properties).inject(document.head);},css:function(source,properties){return new Element('link',$merge({'rel':'stylesheet','media':'screen','type':'text/css','href':source},properties)).inject(document.head);},image:function(source,properties){properties=$merge({'onload':Class.empty,'onabort':Class.empty,'onerror':Class.empty},properties);var image=new Image();image.src=source;var element=new Element('img',{'src':source});['load','abort','error'].each(function(type){var event=properties['on'+type];delete properties['on'+type];element.addEvent(type,function(){this.removeEvent(type,arguments.callee);event.call(this);});});if(image.width&&image.height)element.fireEvent('load',element,1);return element.setProperties(properties);},images:function(sources,options){options=$merge({onComplete:Class.empty,onProgress:Class.empty},options);if(!sources.push)sources=[sources];var images=[];var counter=0;sources.each(function(source){var img=new Asset.image(source,{'onload':function(){options.onProgress.call(this,counter);counter++;if(counter==sources.length)options.onComplete();}});images.push(img);});return new Elements(images);}});var Hash=new Class({length:0,initialize:function(object){this.obj=object||{};this.setLength();},get:function(key){return(this.hasKey(key))?this.obj[key]:null;},hasKey:function(key){return(key in this.obj);},set:function(key,value){if(!this.hasKey(key))this.length++;this.obj[key]=value;return this;},setLength:function(){this.length=0;for(var p in this.obj)this.length++;return this;},remove:function(key){if(this.hasKey(key)){delete this.obj[key];this.length--;} return this;},each:function(fn,bind){$each(this.obj,fn,bind);},extend:function(obj){$extend(this.obj,obj);return this.setLength();},merge:function(){this.obj=$merge.apply(null,[this.obj].extend(arguments));return this.setLength();},empty:function(){this.obj={};this.length=0;return this;},keys:function(){var keys=[];for(var property in this.obj)keys.push(property);return keys;},values:function(){var values=[];for(var property in this.obj)values.push(this.obj[property]);return values;}});function $H(obj){return new Hash(obj);};Hash.Cookie=Hash.extend({initialize:function(name,options){this.name=name;this.options=$extend({'autoSave':true},options||{});this.load();},save:function(){if(this.length==0){Cookie.remove(this.name,this.options);return true;} var str=Json.toString(this.obj);if(str.length>4096)return false;Cookie.set(this.name,str,this.options);return true;},load:function(){this.obj=Json.evaluate(Cookie.get(this.name),true)||{};this.setLength();}});Hash.Cookie.Methods={};['extend','set','merge','empty','remove'].each(function(method){Hash.Cookie.Methods[method]=function(){Hash.prototype[method].apply(this,arguments);if(this.options.autoSave)this.save();return this;};});Hash.Cookie.implement(Hash.Cookie.Methods);var Color=new Class({initialize:function(color,type){type=type||(color.push?'rgb':'hex');var rgb,hsb;switch(type){case'rgb':rgb=color;hsb=rgb.rgbToHsb();break;case'hsb':rgb=color.hsbToRgb();hsb=color;break;default:rgb=color.hexToRgb(true);hsb=rgb.rgbToHsb();} rgb.hsb=hsb;rgb.hex=rgb.rgbToHex();return $extend(rgb,Color.prototype);},mix:function(){var colors=$A(arguments);var alpha=($type(colors[colors.length-1])=='number')?colors.pop():50;var rgb=this.copy();colors.each(function(color){color=new Color(color);for(var i=0;i<3;i++)rgb[i]=Math.round((rgb[i]/100*(100-alpha))+(color[i]/100*alpha));});return new Color(rgb,'rgb');},invert:function(){return new Color(this.map(function(value){return 255-value;}));},setHue:function(value){return new Color([value,this.hsb[1],this.hsb[2]],'hsb');},setSaturation:function(percent){return new Color([this.hsb[0],percent,this.hsb[2]],'hsb');},setBrightness:function(percent){return new Color([this.hsb[0],this.hsb[1],percent],'hsb');}});function $RGB(r,g,b){return new Color([r,g,b],'rgb');};function $HSB(h,s,b){return new Color([h,s,b],'hsb');};Array.extend({rgbToHsb:function(){var red=this[0],green=this[1],blue=this[2];var hue,saturation,brightness;var max=Math.max(red,green,blue),min=Math.min(red,green,blue);var delta=max-min;brightness=max/255;saturation=(max!=0)?delta/max:0;if(saturation==0){hue=0;}else{var rr=(max-red)/delta;var gr=(max-green)/delta;var br=(max-blue)/delta;if(red==max)hue=br-gr;else if(green==max)hue=2+rr-br;else hue=4+gr-rr;hue/=6;if(hue<0)hue++;} return[Math.round(hue*360),Math.round(saturation*100),Math.round(brightness*100)];},hsbToRgb:function(){var br=Math.round(this[2]/100*255);if(this[1]==0){return[br,br,br];}else{var hue=this[0]%360;var f=hue%60;var p=Math.round((this[2]*(100-this[1]))/10000*255);var q=Math.round((this[2]*(6000-this[1]*f))/600000*255);var t=Math.round((this[2]*(6000-this[1]*(60-f)))/600000*255);switch(Math.floor(hue/60)){case 0:return[br,t,p];case 1:return[q,br,p];case 2:return[p,br,t];case 3:return[p,q,br];case 4:return[t,p,br];case 5:return[br,p,q];}} return false;}});var Scroller=new Class({options:{area:20,velocity:1,onChange:function(x,y){this.element.scrollTo(x,y);}},initialize:function(element,options){this.setOptions(options);this.element=$(element);this.mousemover=([window,document].contains(element))?$(document.body):this.element;},start:function(){this.coord=this.getCoords.bindWithEvent(this);this.mousemover.addListener('mousemove',this.coord);},stop:function(){this.mousemover.removeListener('mousemove',this.coord);this.timer=$clear(this.timer);},getCoords:function(event){this.page=(this.element==window)?event.client:event.page;if(!this.timer)this.timer=this.scroll.periodical(50,this);},scroll:function(){var el=this.element.getSize();var pos=this.element.getPosition();var change={'x':0,'y':0};for(var z in this.page){if(this.page[z]<(this.options.area+pos[z])&&el.scroll[z]!=0) change[z]=(this.page[z]-this.options.area-pos[z])*this.options.velocity;else if(this.page[z]+this.options.area>(el.size[z]+pos[z])&&el.scroll[z]+el.size[z]!=el.scrollSize[z]) change[z]=(this.page[z]-el.size[z]+this.options.area-pos[z])*this.options.velocity;} if(change.y||change.x)this.fireEvent('onChange',[el.scroll.x+change.x,el.scroll.y+change.y]);}});Scroller.implement(new Events,new Options);var Slider=new Class({options:{onChange:Class.empty,onComplete:Class.empty,onTick:function(pos){this.knob.setStyle(this.p,pos);},mode:'horizontal',steps:100,offset:0},initialize:function(el,knob,options){this.element=$(el);this.knob=$(knob);this.setOptions(options);this.previousChange=-1;this.previousEnd=-1;this.step=-1;this.element.addEvent('mousedown',this.clickedElement.bindWithEvent(this));var mod,offset;switch(this.options.mode){case'horizontal':this.z='x';this.p='left';mod={'x':'left','y':false};offset='offsetWidth';break;case'vertical':this.z='y';this.p='top';mod={'x':false,'y':'top'};offset='offsetHeight';} this.max=this.element[offset]-this.knob[offset]+(this.options.offset*2);this.half=this.knob[offset]/2;this.getPos=this.element['get'+this.p.capitalize()].bind(this.element);this.knob.setStyle('position','relative').setStyle(this.p,-this.options.offset);var lim={};lim[this.z]=[-this.options.offset,this.max-this.options.offset];this.drag=new Drag.Base(this.knob,{limit:lim,modifiers:mod,snap:0,onStart:function(){this.draggedKnob();}.bind(this),onDrag:function(){this.draggedKnob();}.bind(this),onComplete:function(){this.draggedKnob();this.end();}.bind(this)});if(this.options.initialize)this.options.initialize.call(this);},set:function(step){this.step=step.limit(0,this.options.steps);this.checkStep();this.end();this.fireEvent('onTick',this.toPosition(this.step));return this;},clickedElement:function(event){var position=event.page[this.z]-this.getPos()-this.half;position=position.limit(-this.options.offset,this.max-this.options.offset);this.step=this.toStep(position);this.checkStep();this.end();this.fireEvent('onTick',position);},draggedKnob:function(){this.step=this.toStep(this.drag.value.now[this.z]);this.checkStep();},checkStep:function(){if(this.previousChange!=this.step){this.previousChange=this.step;this.fireEvent('onChange',this.step);}},end:function(){if(this.previousEnd!==this.step){this.previousEnd=this.step;this.fireEvent('onComplete',this.step+'');}},toStep:function(position){return Math.round((position+this.options.offset)/this.max*this.options.steps);},toPosition:function(step){return this.max*step/this.options.steps;}});Slider.implement(new Events);Slider.implement(new Options);var SmoothScroll=Fx.Scroll.extend({initialize:function(options){this.parent(window,options);this.links=(this.options.links)?$$(this.options.links):$$(document.links);var location=window.location.href.match(/^[^#]*/)[0]+'#';this.links.each(function(link){if(link.href.indexOf(location)!=0)return;var anchor=link.href.substr(location.length);if(anchor&&$(anchor))this.useLink(link,anchor);},this);if(!window.webkit419)this.addEvent('onComplete',function(){window.location.hash=this.anchor;});},useLink:function(link,anchor){link.addEvent('click',function(event){this.anchor=anchor;this.toElement(anchor);event.stop();}.bindWithEvent(this));}});var Sortables=new Class({options:{handles:false,onStart:Class.empty,onComplete:Class.empty,ghost:true,snap:3,onDragStart:function(element,ghost){ghost.setStyle('opacity',0.7);element.setStyle('opacity',0.7);},onDragComplete:function(element,ghost){element.setStyle('opacity',1);ghost.remove();this.trash.remove();}},initialize:function(list,options){this.setOptions(options);this.list=$(list);this.elements=this.list.getChildren();this.handles=(this.options.handles)?$$(this.options.handles):this.elements;this.bound={'start':[],'moveGhost':this.moveGhost.bindWithEvent(this)};for(var i=0,l=this.handles.length;i0);var prev=this.active.getPrevious();var next=this.active.getNext();if(prev&&up&&nownext.getCoordinates().top)this.active.injectAfter(next);this.previous=now;},serialize:function(converter){return this.list.getChildren().map(converter||function(el){return this.elements.indexOf(el);},this);},end:function(){this.previous=null;document.removeListener('mousemove',this.bound.move);document.removeListener('mouseup',this.bound.end);if(this.options.ghost){document.removeListener('mousemove',this.bound.moveGhost);this.fireEvent('onDragComplete',[this.active,this.ghost]);} this.fireEvent('onComplete',this.active);}});Sortables.implement(new Events,new Options);var Tips=new Class({options:{onShow:function(tip){tip.setStyle('visibility','visible');},onHide:function(tip){tip.setStyle('visibility','hidden');},maxTitleChars:30,showDelay:100,hideDelay:100,className:'tool',offsets:{'x':16,'y':16},fixed:false},initialize:function(elements,options){this.setOptions(options);this.toolTip=new Element('div',{'class':this.options.className+'-tip','styles':{'position':'absolute','top':'0','left':'0','visibility':'hidden'}}).inject(document.body);this.wrapper=new Element('div').inject(this.toolTip);$$(elements).each(this.build,this);if(this.options.initialize)this.options.initialize.call(this);},build:function(el){el.$tmp.myTitle=(el.href&&el.getTag()=='a')?el.href.replace('http://',''):(el.rel||false);if(el.title){var dual=el.title.split('::');if(dual.length>1){el.$tmp.myTitle=dual[0].trim();el.$tmp.myText=dual[1].trim();}else{el.$tmp.myText=el.title;} el.removeAttribute('title');}else{el.$tmp.myText=false;} if(el.$tmp.myTitle&&el.$tmp.myTitle.length>this.options.maxTitleChars)el.$tmp.myTitle=el.$tmp.myTitle.substr(0,this.options.maxTitleChars-1)+"…";el.addEvent('mouseenter',function(event){this.start(el);if(!this.options.fixed)this.locate(event);else this.position(el);}.bind(this));if(!this.options.fixed)el.addEvent('mousemove',this.locate.bindWithEvent(this));var end=this.end.bind(this);el.addEvent('mouseleave',end);el.addEvent('trash',end);},start:function(el){this.wrapper.empty();if(el.$tmp.myTitle){this.title=new Element('span').inject(new Element('div',{'class':this.options.className+'-title'}).inject(this.wrapper)).setHTML(el.$tmp.myTitle);} if(el.$tmp.myText){this.text=new Element('span').inject(new Element('div',{'class':this.options.className+'-text'}).inject(this.wrapper)).setHTML(el.$tmp.myText);} $clear(this.timer);this.timer=this.show.delay(this.options.showDelay,this);},end:function(event){$clear(this.timer);this.timer=this.hide.delay(this.options.hideDelay,this);},position:function(element){var pos=element.getPosition();this.toolTip.setStyles({'left':pos.x+this.options.offsets.x,'top':pos.y+this.options.offsets.y});},locate:function(event){var win={'x':window.getWidth(),'y':window.getHeight()};var scroll={'x':window.getScrollLeft(),'y':window.getScrollTop()};var tip={'x':this.toolTip.offsetWidth,'y':this.toolTip.offsetHeight};var prop={'x':'left','y':'top'};for(var z in prop){var pos=event.page[z]+this.options.offsets[z];if((pos+tip[z]-scroll[z])>win[z])pos=event.page[z]-this.options.offsets[z]-tip[z];this.toolTip.setStyle(prop[z],pos);};},show:function(){if(this.options.timeout)this.timer=this.hide.delay(this.options.timeout,this);this.fireEvent('onShow',[this.toolTip]);},hide:function(){this.fireEvent('onHide',[this.toolTip]);}});Tips.implement(new Events,new Options);var Group=new Class({initialize:function(){this.instances=$A(arguments);this.events={};this.checker={};},addEvent:function(type,fn){this.checker[type]=this.checker[type]||{};this.events[type]=this.events[type]||[];if(this.events[type].contains(fn))return false;else this.events[type].push(fn);this.instances.each(function(instance,i){instance.addEvent(type,this.check.bind(this,[type,instance,i]));},this);return this;},check:function(type,instance,i){this.checker[type][i]=true;var every=this.instances.every(function(current,j){return this.checker[type][j]||false;},this);if(!every)return;this.checker[type]={};this.events[type].each(function(event){event.call(this,this.instances,instance);},this);}});var Accordion=Fx.Elements.extend({options:{onActive:Class.empty,onBackground:Class.empty,display:0,show:false,height:true,width:false,opacity:true,fixedHeight:false,fixedWidth:false,wait:false,alwaysHide:false},initialize:function(){var options,togglers,elements,container;$each(arguments,function(argument,i){switch($type(argument)){case'object':options=argument;break;case'element':container=$(argument);break;default:var temp=$$(argument);if(!togglers)togglers=temp;else elements=temp;}});this.togglers=togglers||[];this.elements=elements||[];this.container=$(container);this.setOptions(options);this.previous=-1;if(this.options.alwaysHide)this.options.wait=true;if($chk(this.options.show)){this.options.display=false;this.previous=this.options.show;} if(this.options.start){this.options.display=false;this.options.show=false;} this.effects={};if(this.options.opacity)this.effects.opacity='fullOpacity';if(this.options.width)this.effects.width=this.options.fixedWidth?'fullWidth':'offsetWidth';if(this.options.height)this.effects.height=this.options.fixedHeight?'fullHeight':'scrollHeight';for(var i=0,l=this.togglers.length;i0));this.fireEvent(hide?'onBackground':'onActive',[this.togglers[i],el]);for(var fx in this.effects)obj[i][fx]=hide?0:el[this.effects[fx]];},this);return this.start(obj);},showThisHideOpen:function(index){return this.display(index);}});Fx.Accordion=Accordion; if(typeof deconcept=="undefined"){var deconcept=new Object();}if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="";_19+="";var _1d=this.getParams();for(var key in _1d){_19+="";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="";}_19+="";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.majorfv.major){return true;}if(this.minorfv.minor){return true;}if(this.rev=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject; function ajaxCallDivReload(pAction,pDiv){var dataSend='p='+pAction;var myAjax=new Ajax('/controller.php',{method:'post',data:dataSend,onComplete:function(response){if(pDiv!='blank'){if(response.indexOf("error")>=0){changeAlertClass(pDiv,0);$(pDiv).setHTML('

Sorry, error loading...

');}else{$(pDiv).setHTML(response);}}}}).request();} function ratingVideoXhr(querystring){querystring=querystring.replace('/controller.php?','');var myAjax=new Ajax('/controller.php',{method:'post',data:querystring,onComplete:function(response){if(response.indexOf("error")>=0){Site.log('Sorry, error loading...');}else{$('classRating').setHTML(response);}}}).request();} Element.extend({toggle:function(){var style=this.getStyle('display');(style=="none")?style="block":style="none";this.setStyle('display',style);},cleanValue:function(once){if(this.getValue()&&!(this.marked)) this.setProperty('value','');if(once)this.marked=true;},highlightValue:function(){if(!this.isTypeable())return;this.addEvent('focus',function(){if(this.marked)return false;this.focus();this.select();this.marked=true;});},highlight:function(originalColor){this.effect('background-color',{duration:1000,transition:Fx.Transitions.Cubic.easeInOut}).start('#ffff88',originalColor||'#ffffff');return this;},targetBlank:function(){if(this.href==null||!this.href.test('^http'))return;this.addEvent('click',function(e){window.open(this.href);new Event(e).stop();});},safeGetStyle:function(style){var oldDisplay=this.style.display;if(window.webkit419){this.setStyle('display','block');} var computedStyle=this.getStyle(style);if(window.webkit419){this.setStyle('display',oldDisplay);} return computedStyle;},isTypeable:function(){var tag=this.getTag();var list='input|textarea';return(tag.test(list));}});Window.extend({popup:function(url,options){return window.open(url,"",options);}});Number.extend({toPrettyMoneyValue:function(splitter){var ret=String(this).split(/[,.]/);return ret[0]+splitter+(ret[1]||'0').floatVal(2);},zeroise:function(length){var self=this;(length).times(function(){self=('0'+self);});return self;}});String.extend({repeatForMoney:function(times){return Array(times+1).join(this);},floatVal:function(length){return this+'0'.repeatForMoney(length-this.length);},parseUri:function(mode){var options={strictMode:mode||false,key:['source','protocol','authority','userInfo','user','password','host','port','relative','path','directory','file','query','anchor'],q:{name:'queryKey',parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}} var m=options.parser[options.strictMode?'strict':'loose'].exec(str),uri={},i=14;while(i--)uri[options.key[i]]=m[i]||'';uri[options.q.name]={};uri[options.key[12]].replace(options.q.parser,function($0,$1,$2){if($1)uri[options.q.name][$1]=$2;});return uri;}});var XHRsite=new Class({initialize:function(elements){this.elements=$$(elements);this.references=elements;this.updater='';if(!this.elements.length)return false;this.ajax=new Ajax('',{'autoCancel':true,'evalScripts':true,'onComplete':Site.Ajax.onComplete,'onFailure':Site.Ajax.onFailure}).addEvents({'onRequest':this.locate.bind(this),'onComplete':this.recall.bind(this)});this.elements.each(this.gearElementsUp,this);},gearElementsUp:function(el){var to,evt;if(el.getTag()=='form'){to=el.getProperty('action');evt='submit';}else{to=el.getProperty('href');evt='click';} var updater=$(el.getProperty('rel').match(/ [a-z0-9_-]+/i)[0].substr(1));el.addEvent(evt,function(e){if(!Site.Ajax.isReady)return false;this.setContainer(updater);this.ajax.url=to;this.ajax.options=$merge(this.ajax.options,{method:'post',update:this.updater,data:el.toQueryString()});this.ajax.request();e.stop();}.bindWithEvent(this));},locate:function(){var size=this.updater.getSize().size;var position=this.updater.getPosition();Site.Ajax.loader.setStyles({'width':size.x,'height':size.y,'left':position.x,'top':position.y});if(size.y<10)this.updater.effect('height',{duration:100,transition:Fx.Transitions.linear}).start(size.y,10);Site.Ajax.onRequest();},recall:function(){this.updater.setStyle('height','auto');qs=this.references.split(',');$each(qs,function(q){$$('#'+this.updater.id+' '+q).each(this.gearElementsUp,this);},this);},setContainer:function(element){this.updater=element;}});var Mootabs=new Class({initialize:function(element,options){this.options=Object.extend({width:300,height:200,changeTransition:Fx.Transitions.bounceOut},options||{});this.el=$(element);this.id=element;this.panels=this.id.getElements('.panel');this.tabs=this.id.getElements('.tab a');if(this.options.width!='auto')this.el.setStyle('width',this.options.width+'px');this.tabs.each(function(tab){tab.addEvent('click',function(e){this.activate(tab);new Event(e).stop();}.bind(this));}.bind(this));},activate:function(tab){if(tab.getParent().hasClass('active'))return;trc_selectList(tab.id);this.tabs.each(function(tab){tab.getParent().removeClass('active');});tab.getParent().addClass('active');}});var Countable=new Class({initialize:function(elm,cls){this.elm=elm;this.cls=cls+' counter';this.els=$$('textarea[rel]');if(!(this.els.length))return;else this.setMaxLength();},setMaxLength:function(){var cont=new Element(this.elm,{'class':this.cls});this.els.each(function(el){var options=Json.evaluate('{'+el.getProperty('rel')+'}');var maxLength=options.maxlength;var counter=cont.clone();counter.innerHTML=''+el.value.length+'/'+maxLength;counter.injectAfter(el);el.relatedElement=$E('span',counter);el.onkeyup=el.onchange=el.onblur=this.checkMaxLength;}.bind(this));},checkMaxLength:function(){var currentLength=this.value.length;var options=Json.evaluate('{'+this.getProperty('rel')+'}');var maxLength=options.maxlength;if(currentLength>maxLength){this.relatedElement.addClass('toomuch');this.setProperty('value',this.getProperty('value').substr(0,maxLength));}else this.relatedElement.removeClass('toomuch');this.relatedElement.firstChild.nodeValue=currentLength;}});var SclipoLiveAlert=new Class({initialize:function(interval,pingHost){this.interval=interval;this.periodical=null;this.evtStart=this.start.bind(this);this.pingHost=pingHost+'/controller.php';this.alertCall=new Ajax('/controller.php',{method:'post',data:'p=pending_master_classes',onComplete:function(response){if(response.split('##')[0]==1){$('sclipoLiveAlert').setHTML(response.split('##')[1]);this.play();}}.bind(this)});if($('sclipoLiveAlert')){this.alertCall.request();this.start();}},start:function(){$('sclipoLiveAlert').setStyle('display','none');this.cleanCover();this.periodical=function(){this.alertCall.request();}.periodical(this.interval,this);},clear:function(){this.periodical=$clear(this.periodical);},play:function(){this.clear();$('sclipoLiveAlert').toggle();this.generateCover();if(reject=$('reject')){reject.removeEvents('click');reject.addEvent('click',function(e){new Event(e).stop();var liveClassID=$('reject').getProperty('href').split('&')[1];new Ajax('/controller.php',{method:'get',data:'p=reject_sclipo_live_class&'+liveClassID+'&remote=1',onComplete:function(){this.evtStart();}.bind(this)}).request();}.bind(this));}},generateCover:function(){if(!(el=$('overlay'))){var cover=new Element('div',{'id':'overlay','styles':{'z-index':'50','width':'100%','height':'100%','background-color':'#000','position':'fixed','left':'0'}}).setStyle('opacity','0.5').injectTop(document.body);cover.effect('opacity').hide();cover.effect('opacity',{duration:500,transition:Fx.Transitions.linear}).start(0,.5);}else{this.cleanCover();} this.toggleSwiffs(0);},cleanCover:function(){if((el=$('overlay')))el.remove();this.toggleSwiffs(1);},toggleSwiffs:function(show){['player','smallPlayer'].each(function(el){if(o=$(el)){(show)?o.setStyle('visibility','visible'):o.setStyle('visibility','hidden');}});}});var UserPing=new Class({initialize:function(interval,pingHost){this.interval=interval;this.pingHost=pingHost;this.periodical=null;this.pingHost=pingHost+'/controller.php';this.pingCall=new Ajax('/controller.php',{method:'get',data:'p=user_ping_date'});if($('userLogged')){this.start();}},start:function(){this.clear();this.periodical=function(){this.pingCall.request();}.periodical(this.interval,this);},clear:function(){this.periodical=$clear(this.periodical);}});var ThumbSelection=new Class({options:{className:'',showTitles:true,onMouseOver:Class.empty,onMouseOut:Class.empty},initialize:function(elements,options){this.setOptions(options);this.thumbs=[];$$(elements).each(this.setup,this);},setup:function(el){var title,start,thumb,id=el.id;thumb=$E('.'+id);this.thumbs.push(thumb);label=$E('label[for='+id+']');start=this.start.create({'bind':this,'arguments':[el,thumb]});if(this.options.showTitles){title=label.getText();thumb.setProperty('title',title);} [el,label].each(function(el){el.setStyle('display','none');});thumb.addEvents({'mouseover':this.options.onMouseOver,'mouseout':this.options.onMouseOut,'click':start});},start:function(radio,thumb){radio.setProperty('checked','checked');this.thumbs.each(function(el){el.removeClass(this)}.bind(this.options.className));thumb.addClass(this.options.className);}});ThumbSelection.implement(new Options);var iCarousel=new Class({options:{animation:{type:"fadeNscroll",direction:"left",amount:1,transition:Fx.Transitions.Cubic.easeInOut,duration:500,rotate:{type:"manual",interval:5000,onMouseOver:"stop"}},item:{klass:"item",size:100},idPrevious:"previous",idNext:"next",idToggle:"toggle",onClickPrevious:Class.empty,onClickNext:Class.empty,onPrevious:Class.empty,onNext:Class.empty,onGoTo:Class.empty,onAdvance:Class.empty},initialize:function(container,options){this.setOptions(options);this.container=$(container);this.aItems=$A($$('.'+this.options.item.klass));this.isMouseOver=false;if(this.options.idPrevious!="undefined"&&$(this.options.idPrevious)) $(this.options.idPrevious).addEvent("click",function(event){new Event(event).stop();this._previous();this.fireEvent("onClickPrevious",this,20);}.bind(this));if(this.options.idNext!="undefined"&&$(this.options.idNext)) $(this.options.idNext).addEvent("click",function(event){new Event(event).stop();this._next();this.fireEvent("onClickNext",this,20);}.bind(this));if(this.options.idToggle!="undefined"&&$(this.options.idToggle)) $(this.options.idToggle).addEvent("click",function(event){new Event(event).stop();this._toggle()}.bind(this));var oAn=this.options.animation;switch(this.options.animation.type.toLowerCase()){case"fade":this.aItems.each(function(item){item.fx=item.effect("opacity",{duration:oAn.duration,transition:oAn.transition});item.setStyle("opacity",0);item.addEvents({"mouseenter":function(){this.isMouseOver=true;if(this.options.animation.rotate.type=="auto")this.timer=$clear(this.timer);}.bind(this),"mouseleave":function(){this.isMouseOver=false;if(this.options.animation.rotate.type=="auto")this.timer=this._autoRotate.periodical(this.options.animation.rotate.interval,this);}.bind(this)});}.bind(this));this.height=this.container.getStyle("height").toInt();this.atScreen=0;this._animate(this.atScreen);break;default:(2).times(function(){this.aItems.each(function(item){item.clone().injectInside(this.container);}.bind(this));}.bind(this));this.aItems=$A($$('.'+this.options.item.klass));this.aItems.each(function(item){item.addEvents({"mouseenter":function(){this.isMouseOver=true;if(this.options.animation.rotate.type=="auto")this.timer=$clear(this.timer);}.bind(this),"mouseleave":function(){this.isMouseOver=false;if(this.options.animation.rotate.type=="auto")this.timer=this._autoRotate.periodical(this.options.animation.rotate.interval,this);}.bind(this)});}.bind(this));this.fx=this.container.effects({duration:oAn.duration,transition:oAn.transition,wait:false});this.atScreen=this.aItems.length/3;this.container.setStyle(oAn.direction,-this.atScreen*this.options.item.size);break;} if(this.options.animation.rotate.type=="auto")this.timer=this._autoRotate.periodical(this.options.animation.rotate.interval,this);},goTo:function(n){switch(this.options.animation.type.toLowerCase()){case"fade":var lastIndex=this.atScreen;this.atScreen=Math.abs(n%(this.aItems.length/3));this._animate(this.atScreen,lastIndex);break;default:this.atScreen=Math.abs(n%(this.aItems.length/3));this.atScreen+=this.aItems.length/3;this._animate(this.atScreen);break;} this.fireEvent("onGoTo",this,20);},_previous:function(){switch(this.options.animation.type.toLowerCase()){case"fade":var lastIndex=this.atScreen;this.atScreen-=this.options.animation.amount;if(this.atScreen<0)this.atScreen=(this.aItems.length-1);this._animate(this.atScreen,lastIndex);break;default:this.atScreen-=this.options.animation.amount;if(this.atScreen=this.aItems.length)this.atScreen=0;this._animate(this.atScreen,lastIndex);break;default:this.atScreen+=this.options.animation.amount;if(this.atScreen>this.aItems.length*2/3){this.container.setStyle(this.options.animation.direction,-this.options.item.size*this.aItems.length/3);this.atScreen=this.aItems.length/3+this.options.animation.amount;} this._animate(this.atScreen);break;} this.fireEvent("onNext",this,20);},_toggle:function(){(this.container.getStyle("height").toInt()==0)?this.container.effect("height",{duration:1000,transition:Fx.Transitions.Sine.easeInOut}).start(this.height):this.container.effect("height",{duration:1000,transition:Fx.Transitions.Sine.easeInOut}).start(0);},_autoRotate:function(){if(this.options.animation.rotate.onMouseOver=="stop"&&!this.isMouseOver)this._next();this.fireEvent("onAdvance",this,20);},_animate:function(a,b){switch(this.options.animation.type){case"fade":if($defined(b)){this.aItems[b].fx.start(0).chain(function(){this.aItems[a].fx.start(1);}.bind(this));}else{this.aItems[a].fx.start(1);} break;case"scroll":var that=this;if(that.options.animation.direction=="top"){that.fx.start({"top":-a*that.options.item.size});}else{that.fx.start({"left":-a*that.options.item.size});} break;case"fadeNscroll":var that=this;if(that.options.animation.direction=="top"){that.fx.start({"opacity":0.75}).chain(function(){that.fx.start({"top":-a*that.options.item.size}).chain(function(){that.fx.start({"opacity":1});});});}else{that.fx.start({"opacity":0.75}).chain(function(){that.fx.start({"left":-a*that.options.item.size}).chain(function(){that.fx.start({"opacity":1});});});} break;}}});iCarousel.implement(new Events,new Options);var multipleSelect={start:function(){var addList=$('addLanguages');var setList=$('setLanguages');var addLink=$('addItem');var removeLink=$('removeItem');if(!addList&&!setList&&!addLink&&!removeLink)return;$E('#multiple .hidden').removeClass('hidden');$E('#multiple select[name=languages]').setProperty('name','');var language=$('selectedLang').value;addLink.addEvent('mouseup',function(){multipleSelect.copyToList(addList,setList,'add',language)});removeLink.addEvent('mouseup',function(){multipleSelect.copyToList(setList,addList,'remove',language)});var iniLang='';for(i=0;i'+Text.misc.more_info+'');result=more.clone().injectInside(li);desc=$E('.desc span',li);li.longD=desc.getText();li.shortD=li.longD;if(li.longD.length>lng)li.shortD=desc.getText().substr(0,lng)+'...';desc.setText(li.shortD);li.h=li.offsetHeight-$E('.information',li).offsetHeight-5;li.setStyle('height',li.h+'px');result.getElement('a').addEvent('click',function(e){new Event(e).stop();if(!this.txt)this.txt=1;else this.txt=0;myClasses.changeDesc(this,li);li.effect('height').start((li.offsetHeight'+word+''));});}else{holders.each(function(el){el.setHTML(el.getText().replace(''+word+'',word));});}}}} var LocationMap={init:function(container,loadLocation){if(!GBrowserIsCompatible())return;LocationMap.Map=new UserGeoLocation(container,{controls:'zoom'});LocationMap.actions();if(loadLocation)LocationMap.loadLocation();},actions:function(){LocationMap.Map.addEvent('saveLocation',function(){var point=Json.evaluate(this.getPoint());$('lat').value=point.lat;$('lng').value=point.lng;});var field=$('searchPlace');var submitImg=$E('input[type=image]','map-search');submitImg.addEvent('click',LocationMap.handleEnter.bindWithEvent(field));field.addEvent('keypress',LocationMap.handleEnter.bindWithEvent(field));},handleEnter:function(e){if(e.key=='enter'||e.type=='click'){e.stop();LocationMap.Map.findAddress(this.value);}},loadLocation:function(){if(!(latValue=$('lat').value)||!(lngValue=$('lng').value))return;var point=new GLatLng(latValue,lngValue);LocationMap.Map.fireEvent('afterLocation',point);LocationMap.Map.map.setCenter(point,LocationMap.Map.options.zoom);}};var WorldMap={init:function(container){if(!$defined(window.GBrowserIsCompatible)||!GBrowserIsCompatible()){Site.log(Text.log.unexpected_error,{hold:20000});return;} this.skillMap=new SkillMaps(container,{controls:['large','maptype','overview','scale'],zoom:2});this.skillMap.setAjax('../controller.php');this.setAjaxEvents.create({'bind':this.skillMap})();var chks=$$('.section li input');$each(chks,function(o){o.state='unchecked';});$$($A(chks).extend([$('all-skills')])).addEvent('click',function(){this.blur();});$('all-skills').addEvent('change',function(){if(this.checked){$each(chks,function(el){el.fireEvent('change',1);});}else if(!this.checked){$each(chks,function(el){el.fireEvent('change',0);});}});chks.addEvent('change',function(check){if(check==true||check==false)this.checked=check;var data=Json.evaluate('{'+this.className+'}');if(this.checked&&this.state=='unchecked'){this.state='checked';WorldMap.skillMap.addRequest(data);}else if(!this.checked){this.state='unchecked';WorldMap.skillMap.erasePoints(data.batch);}});if(form=$('findCity'))this.findCity(form);data=document.location.href.parseUri();console.log(data);return;if(data=document.location.href.split('batch=')[1]){WorldMap.skillMap.addRequest({'p':'videos_map_videoid','batch':data});}else{(this.loadAll=function(){$('all-skills').checked=true;$each(chks,function(el){el.fireEvent('change',1)});})();}},setAjaxEvents:function(){this.ajax.addEvents({'onRequest':this.onRequest.bind(this),'onRequest':WorldMap.protect.pass(1),'onComplete':this.onComplete.bind(this),'onFailure':this.onFailure.bind(this)});this.addEvent('onAllComplete',WorldMap.protect.pass(0));},protect:function(block){var chks=$$('.section input');$each(chks,function(el){el.disabled=(block)?true:false;});},findCity:function(form){var geocoder=new GClientGeocoder();form.addEvent('submit',function(e){new Event(e).stop();WorldMap.skillMap.setLoader();address=this.getElement('input[type=text]').value;if(address==''){Site.log('Please, enter a place to search.');WorldMap.skillMap.clearLoader();return;} geocoder.getLatLng(address,function(point){if(!point){options={duration:800,hold:3000};Site.log(""+address+" not found. Try searching another place.",options);}else{zoom=WorldMap.skillMap.map.getZoom();if(zoom<5)zoom=5;WorldMap.skillMap.map.setCenter(point,zoom);} WorldMap.skillMap.clearLoader();});});},onResize:function(map){}};function mailbox(){els=$$('#mailbox .actions');if(!els.length)return;els.each(function(el){var actions=$ES('a',el);actions.each(function(el){cut=el.getProperty('href').split('#')[1];if(cut){$(cut).toggle();el.addEvent('click',function(e){var linkName=this.getProperty('href').split('#')[1];$(linkName).toggle();new Event(e).stop();});}});});} function topLogin(){var sign=$('sign');var login=$('login');if((!sign)||(!login))return;var desplegate=login.effect('height',{duration:400,transition:Fx.Transitions.linear});sign.addEvent('click',function(e){if($('userEmail'))return false;new Event(e).stop();if(login.hasClass('show')){$E('input',login).focus();return true;} if(window.gecko){var h=login.getStyle('height');login.setStyle('height',0).addClass('show');}else{var h=login.addClass('show').safeGetStyle('height');login.setStyle('height',0);} login.setStyle('overflow','hidden');desplegate.start(0,h);});} function initOverLabels(){var labels,id,field;labels=$$('label.overlabel');for(var i=0;iscrTarget)document.location='#player-login';})();$E('input',el).focus();});} function cancelReply(){$E('a','reply-to').addEvent('click',function(e){new Event(e).stop();this.setStyle('outline','0');$('reply-to').setText(Text.misc.write_comment);$('id_comment_replied').value=null;$('position_comment_replied').value=null;});} function createCarousel(){var items=$$('#sclipo-ads .ad-item');var imgSize=items[0].getElement('img').getSize().size.x;var ul=new Element('ul',{'id':'ads-numbering'});var li=new Element('li');var clone=null;var adsCarousel=new iCarousel('viewport',{item:{klass:'ad-item',size:imgSize},animation:{type:'scroll',direction:'left',duration:650,rotate:{type:'auto',interval:($('player'))?10000:6000}},onAdvance:function(){if($('player'))return false;var n=this.atScreen-(items.length+1);$('slide-ad'+n).removeClass('selected');if(next=$('slide-ad'+(n+1)))next.addClass('selected');else $('slide-ad'+(n-items.length+1)).addClass('selected');}});if($('player'))return;for(var i=0;i','','','','','','','').firstChild;};Swiff.extend=$extend;Swiff.extend({count:0,callBacks:{},vars:{},nextInstance:function(){return'Swiff'+Swiff.count++;},fix:function(){Swiff.fixed=true;window.addEvent('beforeunload',function(){__flash_unloadHandler=__flash_savedUnloadHandler=Class.empty;});if(!window.ie)return;window.addEvent('unload',function(){$each(document.getElementsByTagName("object"),function(swf){swf.style.display='none';for(var p in swf){if(typeof swf[p]=='function')swf[p]=Class.empty;}});});},getVersion:function(){if(!Swiff.pluginVersion){var x;if(navigator.plugins&&navigator.mimeTypes.length){x=navigator.plugins["Shockwave Flash"];if(x&&x.description)x=x.description;}else if(window.ie){try{x=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");x=x.GetVariable("$version");}catch(e){}} Swiff.pluginVersion=($type(x)=='string')?parseInt(x.match(/\d+/)[0]):0;} return Swiff.pluginVersion;},remote:function(obj,fn){var rs=obj.CallFunction(""+__flash__argumentsToXML(arguments,2)+"");return eval(rs);}});Swiff.Uploader=new Class({options:{types:false,multiple:true,queued:true,swf:null,url:null,container:null},callBacks:{onOpen:Class.empty,onProgress:Class.empty,onSelect:Class.empty,onComplete:Class.empty,onError:Class.empty,onCancel:Class.empty},initialize:function(callBacks,onLoaded,options){if(Swiff.getVersion()<8)return false;this.setOptions(options);this.onLoaded=onLoaded;var calls=$extend($merge(this.callBacks),callBacks||{});for(p in calls)calls[p]=calls[p].bind(this);this.instance=Swiff.nextInstance();Swiff.callBacks[this.instance]=calls;this.object=Swiff.Uploader.register(this.loaded.bind(this),this.options.swf,this.options.container);return this;},loaded:function(){Swiff.remote(this.object,'create',this.instance,this.options.types,this.options.multiple,this.options.queued,this.options.url);this.onLoaded.delay(10);},browse:function(){Swiff.remote(this.object,'browse',this.instance);},send:function(url){Swiff.remote(this.object,'upload',this.instance,url);},remove:function(name,size){Swiff.remote(this.object,'remove',this.instance,name,size);},fileIndex:function(name,size){return Swiff.remote(this.object,'fileIndex',this.instance,name,size);},fileList:function(){return Swiff.remote(this.object,'filelist',this.instance);}});Swiff.Uploader.implement(new Options);Swiff.Uploader.extend=$extend;Swiff.Uploader.extend({swf:'Swiff.Uploader.swf',callBacks:[],register:function(callBack,url,container){if(!Swiff.Uploader.object||!Swiff.Uploader.loaded){Swiff.Uploader.callBacks.push(callBack);if(!Swiff.Uploader.object){Swiff.Uploader.object=new Swiff(url||Swiff.Uploader.swf,{callBacks:{'onLoad':Swiff.Uploader.onLoad}});(container||document.body).appendChild(Swiff.Uploader.object);}} else callBack.delay(10);return Swiff.Uploader.object;},onLoad:function(){Swiff.Uploader.loaded=true;Swiff.Uploader.callBacks.each(function(fn){fn.delay(10);});Swiff.Uploader.callBacks.length=0;}});var FancyUpload=new Class({options:{url:false,swf:'Swiff.Uploader.swf',multiple:true,queued:true,types:{'Images (*.jpg, *.jpeg, *.gif, *.png)':'*.jpg; *.jpeg; *.gif; *.png'},limitSize:false,limitFiles:false,createReplacement:null,instantStart:false,allowDuplicates:false,optionFxDuration:250,container:null,queueList:'photoupload-queue',onComplete:Class.empty,onError:Class.empty,onCancel:Class.empty,onAllComplete:Class.empty},initialize:function(el,options){this.element=$(el);this.setOptions(options);this.options.url=this.options.url||this.element.form.action||location.href;this.fileList=[];this.uploader=new Swiff.Uploader({onOpen:this.onOpen.bind(this),onProgress:this.onProgress.bind(this),onComplete:this.onComplete.bind(this),onError:this.onError.bind(this),onSelect:this.onSelect.bind(this)},this.initializeFlash.bind(this),{swf:this.options.swf,types:this.options.types,multiple:this.options.multiple,queued:this.options.queued,container:this.options.container});},initializeFlash:function(){this.queue=$(this.options.queueList);$(this.element.form).addEvent('submit',this.upload.bindWithEvent(this));if(this.options.createReplacement)this.options.createReplacement(this.element);else{this.button=new Element('input',{type:'button',value:Text.misc.browse_files,events:{click:this.browse.bind(this)}}).injectBefore(this.element);this.element.remove();}},browse:function(){this.uploader.browse();},upload:function(e){if(e)e.stop();this.uploader.send(this.options.url);},onSelect:function(name,size){if(this.uploadTimer)this.uploadTimer=$clear(this.uploadTimer);if((this.options.limitSize&&(size>this.options.limitSize))||(this.options.limitFiles&&(this.fileList.length>=this.options.limitFiles))||(!this.options.allowDuplicates&&this.findFile(name,size)!=-1))return false;this.addFile(name,size);if(this.options.instantStart)this.uploadTimer=this.upload.delay(250,this);return true;},onOpen:function(name,size){var index=this.findFile(name,size);this.fileList[index].status=1;if(this.fileList[index].fx)return;this.fileList[index].fx=new Element('div',{'class':'queue-subloader'}).injectInside(new Element('div',{'class':'queue-loader'}).setHTML('Uploading').injectInside(this.fileList[index].element)).effect('width',{duration:200,wait:false,unit:'%',transition:Fx.Transitions.linear}).set(0);},onProgress:function(name,bytes,total,percentage){this.uploadStatus(name,total,percentage);},onComplete:function(name,size){var index=this.uploadStatus(name,size,100);this.fileList[index].fx.element.setHTML('Completed');this.fileList[index].status=2;this.highlight(index,'e1ff80');this.checkComplete(name,size,'onComplete');},onError:function(name,size,error){var msg="Upload failed ("+error+")";switch(error.toInt()){case 500:msg="Internal server error, please contact Administrator!";break;case 400:msg="Upload failed, please check your filesize!";break;case 409:msg="Could not process the video, please choose another!";break;case 415:msg="Unsupported media type, please upload only video files!";break;} var index=this.uploadStatus(name,size,100);this.fileList[index].fx.element.setStyles({'background-color':'#ddd','color':'#3f3f3f'}).setHTML(msg);this.fileList[index].status=2;this.fileList[index].failed=1;this.highlight(index,'cc5e5e');this.checkComplete(name,size,'onError');},checkComplete:function(name,size,fire){this.fireEvent(fire,[name,size]);if(this.nextFile()==-1)this.fireEvent('onAllComplete');},addFile:function(name,size){if(!this.options.multiple&&this.fileList.length)this.remove(this.fileList[0].name,this.fileList[0].size);this.fileList.push({name:name,size:size,status:0,percentage:0,element:new Element('li').setHTML(''+name+'~'+Math.ceil(size/1000)+' kb').injectInside(this.queue)});new Element('a',{href:'javascript:void(0)','class':'input-delete',title:Text.misc.remove_from_queue,events:{click:this.cancelFile.bindWithEvent(this,[name,size])}}).injectBefore(this.fileList.getLast().element.getFirst());this.highlight(this.fileList.length-1,'e1ff80');},uploadStatus:function(name,size,percentage){var index=this.findFile(name,size);this.fileList[index].fx.start(percentage).element.setHTML(percentage+'%');this.fileList[index].percentage=percentage;return index;},uploadOverview:function(){var l=this.fileList.length,i=-1,percentage=0;while(++i