/* mootools.js */ var MooTools={version:'1.12'};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('//',''):(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; /* core.js */ function switchFontSize(ckname,val){var bd=document.getElementsByTagName('body');if(!bd||!bd.length)return;bd=bd[0];var oldclass='fs'+CurrentFontSize;switch(val){case'inc':if(CurrentFontSize+1<7){CurrentFontSize++;} break;case'dec':if(CurrentFontSize-1>0){CurrentFontSize--;} break;case'reset':default:CurrentFontSize=DefaultFontSize;} var newclass='fs'+CurrentFontSize;bd.className=bd.className.replace(new RegExp('fs.?','g'),'');bd.className=trim(bd.className);bd.className+=(bd.className?' ':'')+newclass;createCookie(ckname,CurrentFontSize,365);} function switchTool(ckname,val){createCookie(ckname,val,365);window.location.reload();} function cpanel_reset(){var matches=document.cookie.match('(?:^|;)\\s*'+tmpl_name.escapeRegExp()+'_([^=]*)=([^;]*)','g');if(!matches)return;for(i=0;i-1)window.location.href=window.location.href.substr(0,window.location.href.indexOf('?'));else window.location.reload();} function cpanel_apply(){var elems=document.getElementById('ja-cpanel-main').getElementsByTagName('*');var usersetting={};for(i=0;i-1)window.location.href=window.location.href.substr(0,window.location.href.indexOf('?'));else window.location.reload();} function createCookie(name,value,days){if(days){var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));var expires="; expires="+date.toGMTString();} else expires="";document.cookie=name+"="+value+expires+"; path=/";} function trim(str,chars){return ltrim(rtrim(str,chars),chars);} function ltrim(str,chars){chars=chars||"\\s";return str.replace(new RegExp("^["+chars+"]+","g"),"");} function rtrim(str,chars){chars=chars||"\\s";return str.replace(new RegExp("["+chars+"]+$","g"),"");} function getScreenWidth(){var x=0;if(self.innerHeight){x=self.innerWidth;}else if(document.documentElement&&document.documentElement.clientHeight){x=document.documentElement.clientWidth;}else if(document.body){x=document.body.clientWidth;} return x;} function equalHeight(els){els=$$_(els);if(!els||els.length<2)return;var maxh=0;var els_=[];els.each(function(el,i){if(!el)return;els_[i]=el;var ch=els_[i].getCoordinates().height;maxh=(maxhwin.x){size.y*=win.x/size.x;size.x=win.x;}else if(size.y>win.y){size.x*=win.y/size.y;size.y=win.y;} size={x:parseInt(size.x),y:parseInt(size.y)};if(window.webkit419)this.image=new Element('img',{'src':this.image.src});else $(this.image);this.image.setProperties({'width':size.x,'height':size.y});this.applyContent(this.image,size);}.bind(this),failed:this.onError.bind(this)};(function(){this.src=url;}).delay(10,this.image);this.image.onload=events.loaded;this.image.onerror=this.image.onabort=events.failed;},'adopt':function(el){return el.clone();},'url':function(url){this.ajax=new Ajax(url,this.options.ajaxOptions);this.ajax.addEvent('onSuccess',function(resp){this.applyContent(resp);this.ajax=null;}.bind(this));this.ajax.addEvent('onFailure',this.onError.bind(this));this.ajax.request.delay(10,this.ajax);},'iframe':function(url){return new Element('iframe',{'src':url,'frameBorder':0,'width':this.options.size.x,'height':this.options.size.y});},'string':function(str){return str;}},extend:$extend};SqueezeBox.extend(SqueezeBox,Events.prototype);SqueezeBox.extend(SqueezeBox,Options.prototype);SqueezeBox.extend(SqueezeBox,Chain.prototype); /* k2.js */ /* caption.js */ var JCaption=new Class({initialize:function(selector) {this.selector=selector;var images=$$(selector);images.each(function(image){this.createCaption(image);},this);},createCaption:function(element) {var caption=document.createTextNode(element.title);var container=document.createElement("div");var text=document.createElement("p");var width=element.getAttribute("width");var align=element.getAttribute("align");if(!width){width=element.width;} if(!align) align=element.getStyle("float");if(!align) align=element.style.styleFloat;if(align==""){align="none";} text.appendChild(caption);text.className=this.selector.replace('.','_');element.parentNode.insertBefore(container,element);container.appendChild(element);if(element.title!=""){container.appendChild(text);} container.className=this.selector.replace('.','_');container.className=container.className+" "+align;container.setAttribute("style","float:"+align);container.style.width=width+"px";}});document.caption=null;window.addEvent('load',function(){var caption=new JCaption('img.caption') document.caption=caption}); /* swfobject.js */ var swfobject=function(){var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;if(typeof t.plugins!=D&&typeof t.plugins[S]==r){ab=t.plugins[S].description;if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){T=true;X=false;ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof O.ActiveXObject!=D){try{var ad=new ActiveXObject(W);if(ad){ab=ad.GetVariable("$version");if(ab){X=true;ab=ab.split(" ")[1].split(",");ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}}catch(Z){}}}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}}(),k=function(){if(!M.w3){return}if((typeof j.readyState!=D&&j.readyState=="complete")||(typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))){f()}if(!J){if(typeof j.addEventListener!=D){j.addEventListener("DOMContentLoaded",f,false)}if(M.ie&&M.win){j.attachEvent(x,function(){if(j.readyState=="complete"){j.detachEvent(x,arguments.callee);f()}});if(O==top){(function(){if(J){return}try{j.documentElement.doScroll("left")}catch(X){setTimeout(arguments.callee,0);return}f()})()}}if(M.wk){(function(){if(J){return}if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}f()})()}s(f)}}();function f(){if(J){return}try{var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));Z.parentNode.removeChild(Z)}catch(aa){return}J=true;var X=U.length;for(var Y=0;Y0){for(var af=0;af0){var ae=c(Y);if(ae){if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){w(Y,true);if(ab){aa.success=true;aa.ref=z(Y);ab(aa)}}else{if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall;ai.width=ae.getAttribute("width")||"0";ai.height=ae.getAttribute("height")||"0";if(ae.getAttribute("class")){ai.styleclass=ae.getAttribute("class")}if(ae.getAttribute("align")){ai.align=ae.getAttribute("align")}var ah={};var X=ae.getElementsByTagName("param");var ac=X.length;for(var ad=0;ad'}}aa.outerHTML='"+af+"";N[N.length]=ai.id;X=c(ai.id)}else{var Z=C(r);Z.setAttribute("type",q);for(var ac in ai){if(ai[ac]!=Object.prototype[ac]){if(ac.toLowerCase()=="styleclass"){Z.setAttribute("class",ai[ac])}else{if(ac.toLowerCase()!="classid"){Z.setAttribute(ac,ai[ac])}}}}for(var ab in ag){if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){e(Z,ab,ag[ab])}}aa.parentNode.replaceChild(Z,aa);X=Z}}return X}function e(Z,X,Y){var aa=C("param");aa.setAttribute("name",X);aa.setAttribute("value",Y);Z.appendChild(aa)}function y(Y){var X=c(Y);if(X&&X.nodeName=="OBJECT"){if(M.ie&&M.win){X.style.display="none";(function(){if(X.readyState==4){b(Y)}else{setTimeout(arguments.callee,10)}})()}else{X.parentNode.removeChild(X)}}}function b(Z){var Y=c(Z);if(Y){for(var X in Y){if(typeof Y[X]=="function"){Y[X]=null}}Y.parentNode.removeChild(Y)}}function c(Z){var X=null;try{X=j.getElementById(Z)}catch(Y){}return X}function C(X){return j.createElement(X)}function i(Z,X,Y){Z.attachEvent(X,Y);I[I.length]=[Z,X,Y]}function F(Z){var Y=M.pv,X=Z.split(".");X[0]=parseInt(X[0],10);X[1]=parseInt(X[1],10)||0;X[2]=parseInt(X[2],10)||0;return(Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false}function v(ac,Y,ad,ab){if(M.ie&&M.mac){return}var aa=j.getElementsByTagName("head")[0];if(!aa){return}var X=(ad&&typeof ad=="string")?ad:"screen";if(ab){n=null;G=null}if(!n||G!=X){var Z=C("style");Z.setAttribute("type","text/css");Z.setAttribute("media",X);n=aa.appendChild(Z);if(M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0){n=j.styleSheets[j.styleSheets.length-1]}G=X}if(M.ie&&M.win){if(n&&typeof n.addRule==r){n.addRule(ac,Y)}}else{if(n&&typeof j.createTextNode!=D){n.appendChild(j.createTextNode(ac+" {"+Y+"}"))}}}function w(Z,X){if(!m){return}var Y=X?"visible":"hidden";if(J&&c(Z)){c(Z).style.visibility=Y}else{v("#"+Z,"visibility:"+Y)}}function L(Y){var Z=/[\\\"<>\.;]/;var X=Z.exec(Y)!=null;return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y}var d=function(){if(M.ie&&M.win){window.attachEvent("onunload",function(){var ac=I.length;for(var ab=0;ab1){for(var e=1;e-1){return c.substr(c.lastIndexOf(".")+1,c.length).toLowerCase()}return};b.utils.html=function(c,d){c.innerHTML=d};b.utils.wrap=function(c,d){c.parentNode.replaceChild(d,c);d.appendChild(c)};b.utils.ajax=function(g,f,c){var e;if(window.XMLHttpRequest){e=new XMLHttpRequest()}else{e=new ActiveXObject("Microsoft.XMLHTTP")}e.onreadystatechange=function(){if(e.readyState===4){if(e.status===200){if(f){f(e)}}else{if(c){c(g)}}}};try{e.open("GET",g,true);e.send(null)}catch(d){if(c){c(g)}}return e};b.utils.load=function(d,e,c){d.onreadystatechange=function(){if(d.readyState===4){if(d.status===200){if(e){e()}}else{if(c){c()}}}}};b.utils.find=function(d,c){return d.getElementsByTagName(c)};b.utils.append=function(c,d){c.appendChild(d)};b.utils.isIE=function(){return((!+"\v1")||(typeof window.ActiveXObject!="undefined"))};b.utils.isLegacyAndroid=function(){var c=navigator.userAgent.toLowerCase();return(c.match(/android 2.[012]/i)!==null)};b.utils.isIOS=function(){var c=navigator.userAgent.toLowerCase();return(c.match(/iP(hone|ad)/i)!==null)};b.utils.getFirstPlaylistItemFromConfig=function(c){var d={};var e;if(c.playlist&&c.playlist.length){e=c.playlist[0]}else{e=c}d.file=e.file;d.levels=e.levels;d.streamer=e.streamer;d.playlistfile=e.playlistfile;d.provider=e.provider;if(!d.provider){if(d.file&&(d.file.toLowerCase().indexOf("youtube.com")>-1||d.file.toLowerCase().indexOf("youtu.be")>-1)){d.provider="youtube"}if(d.streamer&&d.streamer.toLowerCase().indexOf("rtmp://")==0){d.provider="rtmp"}if(e.type){d.provider=e.type.toLowerCase()}}return d};b.utils.getOuterHTML=function(d){if(d.outerHTML){return d.outerHTML}else{var e=d.parentNode;var c=document.createElement(e.tagName);var g=document.createElement(d.tagName);e.replaceChild(g,d);c.appendChild(d);var f=c.innerHTML;e.replaceChild(d,g);return f}};b.utils.setOuterHTML=function(f,e){if(f.outerHTML){f.outerHTML=e}else{var g=document.createElement("div");g.innerHTML=e;var c=document.createRange();c.selectNodeContents(g);var d=c.extractContents();f.parentNode.insertBefore(d,f);f.parentNode.removeChild(f)}};b.utils.hasFlash=function(){if(typeof navigator.plugins!="undefined"&&typeof navigator.plugins["Shockwave Flash"]!="undefined"){return true}if(typeof window.ActiveXObject!="undefined"){try{new ActiveXObject("ShockwaveFlash.ShockwaveFlash");return true}catch(c){}}return false};b.utils.getPluginName=function(c){if(c.lastIndexOf("/")>=0){c=c.substring(c.lastIndexOf("/")+1,c.length)}if(c.lastIndexOf("-")>=0){c=c.substring(0,c.lastIndexOf("-"))}if(c.lastIndexOf(".swf")>=0){c=c.substring(0,c.lastIndexOf(".swf"))}if(c.lastIndexOf(".js")>=0){c=c.substring(0,c.lastIndexOf(".js"))}return c};b.utils.getPluginVersion=function(c){if(c.lastIndexOf("-")>=0){if(c.lastIndexOf(".js")>=0){return c.substring(c.lastIndexOf("-")+1,c.lastIndexOf(".js"))}else{if(c.lastIndexOf(".swf")>=0){return c.substring(c.lastIndexOf("-")+1,c.lastIndexOf(".swf"))}else{return c.substring(c.lastIndexOf("-")+1)}}}return""};b.utils.getAbsolutePath=function(j,h){if(h===undefined){h=document.location.href}if(j===undefined){return undefined}if(a(j)){return j}var k=h.substring(0,h.indexOf("://")+3);var g=h.substring(k.length,h.indexOf("/",k.length+1));var d;if(j.indexOf("/")===0){d=j.split("/")}else{var e=h.split("?")[0];e=e.substring(k.length+g.length+1,e.lastIndexOf("/"));d=e.split("/").concat(j.split("/"))}var c=[];for(var f=0;f0&&(c<0||(c>e)))}b.utils.pluginPathType={ABSOLUTE:"ABSOLUTE",RELATIVE:"RELATIVE",CDN:"CDN"};b.utils.getPluginPathType=function(d){if(typeof d!="string"){return}d=d.split("?")[0];var e=d.indexOf("://");if(e>0){return b.utils.pluginPathType.ABSOLUTE}var c=d.indexOf("/");var f=b.utils.extension(d);if(e<0&&c<0&&(!f||!isNaN(f))){return b.utils.pluginPathType.CDN}return b.utils.pluginPathType.RELATIVE};b.utils.mapEmpty=function(c){for(var d in c){return false}return true};b.utils.mapLength=function(d){var c=0;for(var e in d){c++}return c};b.utils.log=function(d,c){if(typeof console!="undefined"&&typeof console.log!="undefined"){if(c){console.log(d,c)}else{console.log(d)}}};b.utils.css=function(d,g,c){if(d!==undefined){for(var e in g){try{if(typeof g[e]==="undefined"){continue}else{if(typeof g[e]=="number"&&!(e=="zIndex"||e=="opacity")){if(isNaN(g[e])){continue}if(e.match(/color/i)){g[e]="#"+b.utils.strings.pad(g[e].toString(16),6)}else{g[e]=Math.ceil(g[e])+"px"}}}d.style[e]=g[e]}catch(f){}}}};b.utils.isYouTube=function(c){return(c.indexOf("youtube.com")>-1||c.indexOf("youtu.be")>-1)};b.utils.transform=function(c,d){c.style.webkitTransform=d;c.style.MozTransform=d;c.style.OTransform=d};b.utils.stretch=function(h,m,l,f,k,g){if(typeof l=="undefined"||typeof f=="undefined"||typeof k=="undefined"||typeof g=="undefined"){return}var d=l/k;var e=f/g;var j=0;var i=0;m.style.overflow="hidden";b.utils.transform(m,"");var c={};switch(h.toUpperCase()){case b.utils.stretching.NONE:c.width=k;c.height=g;break;case b.utils.stretching.UNIFORM:if(d>e){c.width=k*e;c.height=g*e}else{c.width=k*d;c.height=g*d}break;case b.utils.stretching.FILL:if(d>e){c.width=k*d;c.height=g*d}else{c.width=k*e;c.height=g*e}break;case b.utils.stretching.EXACTFIT:b.utils.transform(m,["scale(",d,",",e,")"," translate(0px,0px)"].join(""));c.width=k;c.height=g;break;default:break}c.top=(f-c.height)/2;c.left=(l-c.width)/2;b.utils.css(m,c)};b.utils.stretching={NONE:"NONE",FILL:"FILL",UNIFORM:"UNIFORM",EXACTFIT:"EXACTFIT"};b.utils.deepReplaceKeyName=function(h,e,c){switch(b.utils.typeOf(h)){case"array":for(var g=0;g0){_listeners[type][listenerIndex].count=_listeners[type][listenerIndex].count-1}}}}}for(var globalListenerIndex=0;globalListenerIndex<_globallisteners.length;globalListenerIndex++){try{_globallisteners[globalListenerIndex].listener(data)}catch(err){jwplayer.utils.log("There was an error while handling a listener: "+err.toString(),_globallisteners[globalListenerIndex].listener)}if(_globallisteners[globalListenerIndex]){if(_globallisteners[globalListenerIndex].count===1){delete _globallisteners[globalListenerIndex]}else{if(_globallisteners[globalListenerIndex].count>0){_globallisteners[globalListenerIndex].count=_globallisteners[globalListenerIndex].count-1}}}}}}})(jwplayer);(function(a){var b={};a.utils.animations=function(){};a.utils.animations.transform=function(c,d){c.style.webkitTransform=d;c.style.MozTransform=d;c.style.OTransform=d;c.style.msTransform=d};a.utils.animations.transformOrigin=function(c,d){c.style.webkitTransformOrigin=d;c.style.MozTransformOrigin=d;c.style.OTransformOrigin=d;c.style.msTransformOrigin=d};a.utils.animations.rotate=function(c,d){a.utils.animations.transform(c,["rotate(",d,"deg)"].join(""))};a.utils.cancelAnimation=function(c){delete b[c.id]};a.utils.fadeTo=function(l,f,e,i,h,d){if(b[l.id]!=d&&d!==undefined){return}var c=new Date().getTime();if(d>c){setTimeout(function(){a.utils.fadeTo(l,f,e,i,0,d)},d-c)}l.style.display="block";if(i===undefined){i=l.style.opacity===""?1:l.style.opacity}if(l.style.opacity==f&&l.style.opacity!==""&&d!==undefined){if(f===0){l.style.display="none"}return}if(d===undefined){d=c;b[l.id]=d}if(h===undefined){h=0}var j=(c-d)/(e*1000);j=j>1?1:j;var k=f-i;var g=i+(j*k);if(g>1){g=1}else{if(g<0){g=0}}l.style.opacity=g;if(h>0){b[l.id]=d+h*1000;a.utils.fadeTo(l,f,e,i,0,b[l.id]);return}setTimeout(function(){a.utils.fadeTo(l,f,e,i,0,d)},10)}})(jwplayer);(function(a){a.utils.arrays=function(){};a.utils.arrays.indexOf=function(c,d){for(var b=0;b-1){c.splice(b,1)}}})(jwplayer);(function(a){a.utils.extensionmap={"3gp":{html5:"video/3gpp",flash:"video"},"3gpp":{html5:"video/3gpp"},"3g2":{html5:"video/3gpp2",flash:"video"},"3gpp2":{html5:"video/3gpp2"},flv:{flash:"video"},f4a:{html5:"audio/mp4"},f4b:{html5:"audio/mp4",flash:"video"},f4v:{html5:"video/mp4",flash:"video"},mov:{html5:"video/quicktime",flash:"video"},m4a:{html5:"audio/mp4",flash:"video"},m4b:{html5:"audio/mp4"},m4p:{html5:"audio/mp4"},m4v:{html5:"video/mp4",flash:"video"},mp4:{html5:"video/mp4",flash:"video"},rbs:{flash:"sound"},aac:{html5:"audio/aac",flash:"video"},mp3:{html5:"audio/mp3",flash:"sound"},ogg:{html5:"audio/ogg"},ogv:{html5:"video/ogg"},webm:{html5:"video/webm"},m3u8:{html5:"audio/x-mpegurl"},gif:{flash:"image"},jpeg:{flash:"image"},jpg:{flash:"image"},swf:{flash:"image"},png:{flash:"image"},wav:{html5:"audio/x-wav"}}})(jwplayer);(function(e){e.utils.mediaparser=function(){};var g={element:{width:"width",height:"height",id:"id","class":"className",name:"name"},media:{src:"file",preload:"preload",autoplay:"autostart",loop:"repeat",controls:"controls"},source:{src:"file",type:"type",media:"media","data-jw-width":"width","data-jw-bitrate":"bitrate"},video:{poster:"image"}};var f={};e.utils.mediaparser.parseMedia=function(i){return d(i)};function c(j,i){if(i===undefined){i=g[j]}else{e.utils.extend(i,g[j])}return i}function d(m,i){if(f[m.tagName.toLowerCase()]&&(i===undefined)){return f[m.tagName.toLowerCase()](m)}else{i=c("element",i);var n={};for(var j in i){if(j!="length"){var l=m.getAttribute(j);if(!(l===""||l===undefined||l===null)){n[i[j]]=m.getAttribute(j)}}}var k=m.style["#background-color"];if(k&&!(k=="transparent"||k=="rgba(0, 0, 0, 0)")){n.screencolor=k}return n}}function h(n,k){k=c("media",k);var l=[];var j=e.utils.selectors("source",n);for(var m in j){if(!isNaN(m)){l.push(a(j[m]))}}var o=d(n,k);if(o.file!==undefined){l[0]={file:o.file}}o.levels=l;return o}function a(k,j){j=c("source",j);var i=d(k,j);i.width=i.width?i.width:0;i.bitrate=i.bitrate?i.bitrate:0;return i}function b(k,j){j=c("video",j);var i=h(k,j);return i}f.media=h;f.audio=h;f.source=a;f.video=b})(jwplayer);(function(a){a.utils.loaderstatus={NEW:"NEW",LOADING:"LOADING",ERROR:"ERROR",COMPLETE:"COMPLETE"};a.utils.scriptloader=function(c){var d=a.utils.loaderstatus.NEW;var b=new a.events.eventdispatcher();a.utils.extend(this,b);this.load=function(){if(d==a.utils.loaderstatus.NEW){d=a.utils.loaderstatus.LOADING;var e=document.createElement("script");e.onload=function(f){d=a.utils.loaderstatus.COMPLETE;b.sendEvent(a.events.COMPLETE)};e.onerror=function(f){d=a.utils.loaderstatus.ERROR;b.sendEvent(a.events.ERROR)};e.onreadystatechange=function(){if(e.readyState=="loaded"||e.readyState=="complete"){d=a.utils.loaderstatus.COMPLETE;b.sendEvent(a.events.COMPLETE)}};document.getElementsByTagName("head")[0].appendChild(e);e.src=c}};this.getStatus=function(){return d}}})(jwplayer);(function(a){a.utils.selectors=function(b,d){if(d===undefined){d=document}b=a.utils.strings.trim(b);var c=b.charAt(0);if(c=="#"){return d.getElementById(b.substr(1))}else{if(c=="."){if(d.getElementsByClassName){return d.getElementsByClassName(b.substr(1))}else{return a.utils.selectors.getElementsByTagAndClass("*",b.substr(1))}}else{if(b.indexOf(".")>0){selectors=b.split(".");return a.utils.selectors.getElementsByTagAndClass(selectors[0],selectors[1])}else{return d.getElementsByTagName(b)}}}return null};a.utils.selectors.getElementsByTagAndClass=function(e,h,g){elements=[];if(g===undefined){g=document}var f=g.getElementsByTagName(e);for(var d=0;d5||b.length==0){return b}else{return Number(b)}}}}};a.utils.strings.seconds=function(d){d=d.replace(",",".");var b=d.split(":");var c=0;if(d.substr(-1)=="s"){c=Number(d.substr(0,d.length-1))}else{if(d.substr(-1)=="m"){c=Number(d.substr(0,d.length-1))*60}else{if(d.substr(-1)=="h"){c=Number(d.substr(0,d.length-1))*3600}else{if(b.length>1){c=Number(b[b.length-1]);c+=Number(b[b.length-2])*60;if(b.length==3){c+=Number(b[b.length-3])*3600}}else{c=Number(d)}}}}return c};a.utils.strings.xmlAttribute=function(b,c){for(var d in b.attributes){if(b.attributes[d].name&&b.attributes[d].name.toLowerCase()==c.toLowerCase()){return b.attributes[d].value.toString()}}return""};a.utils.strings.jsonToString=function(f){var h=h||{};if(h&&h.stringify){return h.stringify(f)}var c=typeof(f);if(c!="object"||f===null){if(c=="string"){f='"'+f+'"'}else{return String(f)}}else{var g=[],b=(f&&f.constructor==Array);for(var d in f){var e=f[d];switch(typeof(e)){case"string":e='"'+e+'"';break;case"object":if(e!==null){e=a.utils.strings.jsonToString(e)}break}if(b){if(typeof(e)!="function"){g.push(String(e))}}else{if(typeof(e)!="function"){g.push('"'+d+'":'+String(e))}}}if(b){return"["+String(g)+"]"}else{return"{"+String(g)+"}"}}}})(jwplayer);(function(c){var d=new RegExp(/^(#|0x)[0-9a-fA-F]{3,6}/);c.utils.typechecker=function(g,f){f=f===null?b(g):f;return e(g,f)};function b(f){var g=["true","false","t","f"];if(g.toString().indexOf(f.toLowerCase().replace(" ",""))>=0){return"boolean"}else{if(d.test(f)){return"color"}else{if(!isNaN(parseInt(f,10))&&parseInt(f,10).toString().length==f.length){return"integer"}else{if(!isNaN(parseFloat(f))&&parseFloat(f).toString().length==f.length){return"float"}}}}return"string"}function e(g,f){if(f===null){return g}switch(f){case"color":if(g.length>0){return a(g)}return null;case"integer":return parseInt(g,10);case"float":return parseFloat(g);case"boolean":if(g.toLowerCase()=="true"){return true}else{if(g=="1"){return true}}return false}return g}function a(f){switch(f.toLowerCase()){case"blue":return parseInt("0000FF",16);case"green":return parseInt("00FF00",16);case"red":return parseInt("FF0000",16);case"cyan":return parseInt("00FFFF",16);case"magenta":return parseInt("FF00FF",16);case"yellow":return parseInt("FFFF00",16);case"black":return parseInt("000000",16);case"white":return parseInt("FFFFFF",16);default:f=f.replace(/(#|0x)?([0-9A-F]{3,6})$/gi,"$2");if(f.length==3){f=f.charAt(0)+f.charAt(0)+f.charAt(1)+f.charAt(1)+f.charAt(2)+f.charAt(2)}return parseInt(f,16)}return parseInt("000000",16)}})(jwplayer);(function(a){var c={};var b={};a.plugins=function(){};a.plugins.loadPlugins=function(e,d){b[e]=new a.plugins.pluginloader(new a.plugins.model(c),d);return b[e]};a.plugins.registerPlugin=function(h,f,e){var d=a.utils.getPluginName(h);if(c[d]){c[d].registerPlugin(h,f,e)}else{a.utils.log("A plugin ("+h+") was registered with the player that was not loaded. Please check your configuration.");for(var g in b){b[g].pluginFailed()}}}})(jwplayer);(function(a){a.plugins.model=function(b){this.addPlugin=function(c){var d=a.utils.getPluginName(c);if(!b[d]){b[d]=new a.plugins.plugin(c)}return b[d]}}})(jwplayer);(function(a){a.plugins.pluginmodes={FLASH:"FLASH",JAVASCRIPT:"JAVASCRIPT",HYBRID:"HYBRID"};a.plugins.plugin=function(b){var d="//plugins.longtailvideo.com";var i=a.utils.loaderstatus.NEW;var j;var h;var k;var c=new a.events.eventdispatcher();a.utils.extend(this,c);function e(){switch(a.utils.getPluginPathType(b)){case a.utils.pluginPathType.ABSOLUTE:return b;case a.utils.pluginPathType.RELATIVE:return a.utils.getAbsolutePath(b,window.location.href);case a.utils.pluginPathType.CDN:var m=a.utils.getPluginName(b);var l=a.utils.getPluginVersion(b);return d+"/"+a.version.split(".")[0]+"/"+m+"/"+m+(l!==""?("-"+l):"")+".js"}}function g(l){k=setTimeout(function(){i=a.utils.loaderstatus.COMPLETE;c.sendEvent(a.events.COMPLETE)},1000)}function f(l){i=a.utils.loaderstatus.ERROR;c.sendEvent(a.events.ERROR)}this.load=function(){if(i==a.utils.loaderstatus.NEW){if(b.lastIndexOf(".swf")>0){j=b;i=a.utils.loaderstatus.COMPLETE;c.sendEvent(a.events.COMPLETE);return}i=a.utils.loaderstatus.LOADING;var l=new a.utils.scriptloader(e());l.addEventListener(a.events.COMPLETE,g);l.addEventListener(a.events.ERROR,f);l.load()}};this.registerPlugin=function(n,m,l){if(k){clearTimeout(k);k=undefined}if(m&&l){j=l;h=m}else{if(typeof m=="string"){j=m}else{if(typeof m=="function"){h=m}else{if(!m&&!l){j=n}}}}i=a.utils.loaderstatus.COMPLETE;c.sendEvent(a.events.COMPLETE)};this.getStatus=function(){return i};this.getPluginName=function(){return a.utils.getPluginName(b)};this.getFlashPath=function(){if(j){switch(a.utils.getPluginPathType(j)){case a.utils.pluginPathType.ABSOLUTE:return j;case a.utils.pluginPathType.RELATIVE:if(b.lastIndexOf(".swf")>0){return a.utils.getAbsolutePath(j,window.location.href)}return a.utils.getAbsolutePath(j,e());case a.utils.pluginPathType.CDN:if(j.indexOf("-")>-1){return j+"h"}return j+"-h"}}return null};this.getJS=function(){return h};this.getPluginmode=function(){if(typeof j!="undefined"&&typeof h!="undefined"){return a.plugins.pluginmodes.HYBRID}else{if(typeof j!="undefined"){return a.plugins.pluginmodes.FLASH}else{if(typeof h!="undefined"){return a.plugins.pluginmodes.JAVASCRIPT}}}};this.getNewInstance=function(m,l,n){return new h(m,l,n)};this.getURL=function(){return b}}})(jwplayer);(function(a){a.plugins.pluginloader=function(h,e){var g={};var j=a.utils.loaderstatus.NEW;var d=false;var b=false;var c=new a.events.eventdispatcher();a.utils.extend(this,c);function f(){if(!b){b=true;j=a.utils.loaderstatus.COMPLETE;c.sendEvent(a.events.COMPLETE)}}function i(){if(!b){var l=0;for(plugin in g){var k=g[plugin].getStatus();if(k==a.utils.loaderstatus.LOADING||k==a.utils.loaderstatus.NEW){l++}}if(l==0){f()}}}this.setupPlugins=function(m,k,r){var l={length:0,plugins:{}};var o={length:0,plugins:{}};for(var n in g){var p=g[n].getPluginName();if(g[n].getFlashPath()){l.plugins[g[n].getFlashPath()]=k.plugins[n];l.plugins[g[n].getFlashPath()].pluginmode=g[n].getPluginmode();l.length++}if(g[n].getJS()){var q=document.createElement("div");q.id=m.id+"_"+p;q.style.position="absolute";q.style.zIndex=o.length+10;o.plugins[p]=g[n].getNewInstance(m,k.plugins[n],q);o.length++;if(typeof o.plugins[p].resize!="undefined"){m.onReady(r(o.plugins[p],q,true));m.onResize(r(o.plugins[p],q))}}}m.plugins=o.plugins;return l};this.load=function(){j=a.utils.loaderstatus.LOADING;d=true;for(var k in e){g[k]=h.addPlugin(k);g[k].addEventListener(a.events.COMPLETE,i);g[k].addEventListener(a.events.ERROR,i)}for(k in e){g[k].load()}d=false;i()};this.pluginFailed=function(){f()};this.getStatus=function(){return j}}})(jwplayer);(function(b){var a=[];b.api=function(d){this.container=d;this.id=d.id;var l={};var p={};var c=[];var h=undefined;var k=false;var i=[];var n=b.utils.getOuterHTML(d);var o={};var j={};this.getBuffer=function(){return this.callInternal("jwGetBuffer")};this.getContainer=function(){return this.container};function e(q){return function(v,r,s,t){var u;if(r){j[v]=r;u="jwplayer('"+q+"').callback('"+v+"')"}else{if(!r&&j[v]){delete j[v]}}h.jwDockSetButton(v,u,s,t)}}this.getPlugin=function(r){var q=this.callInternal;if(r=="dock"){return{setButton:e(this.id),show:function(){return q("jwShowDock")},hide:function(){return q("jwHideDock")}}}else{if(r=="controlbar"){return{show:function(){return q("jwShowControlbar")},hide:function(){return q("jwHideControlbar")}}}else{if(r=="display"){return{show:function(){return q("jwShowDisplay")},hide:function(){return q("jwHideDisplay")}}}}}return this.plugins[r]};this.callback=function(q){if(j[q]){return j[q]()}};this.getDuration=function(){return this.callInternal("jwGetDuration")};this.getFullscreen=function(){return this.callInternal("jwGetFullscreen")};this.getHeight=function(){return this.callInternal("jwGetHeight")};this.getLockState=function(){return this.callInternal("jwGetLockState")};this.getMeta=function(){return this.getItemMeta()};this.getMute=function(){return this.callInternal("jwGetMute")};this.getPlaylist=function(){var r=this.callInternal("jwGetPlaylist");if(this.renderingMode=="flash"){b.utils.deepReplaceKeyName(r,"__dot__",".")}for(var q=0;q0){var r=i.shift();this.callInternal(r.method,r.parameters)}};this.getItemMeta=function(){return o};this.getCurrentItem=function(){return this.callInternal("jwGetPlaylistIndex")};function m(s,u,t){var q=[];if(!u){u=0}if(!t){t=s.length-1}for(var r=u;r<=t;r++){q.push(s[r])}return q}return this};b.api.selectPlayer=function(d){var c;if(d===undefined){d=0}if(d.nodeType){c=d}else{if(typeof d=="string"){c=document.getElementById(d)}}if(c){var e=b.api.playerById(c.id);if(e){return e}else{return b.api.addPlayer(new b.api(c))}}else{if(typeof d=="number"){return b.getPlayers()[d]}}return null};b.api.events={API_READY:"jwplayerAPIReady",JWPLAYER_READY:"jwplayerReady",JWPLAYER_FULLSCREEN:"jwplayerFullscreen",JWPLAYER_RESIZE:"jwplayerResize",JWPLAYER_ERROR:"jwplayerError",JWPLAYER_MEDIA_BUFFER:"jwplayerMediaBuffer",JWPLAYER_MEDIA_BUFFER_FULL:"jwplayerMediaBufferFull",JWPLAYER_MEDIA_ERROR:"jwplayerMediaError",JWPLAYER_MEDIA_LOADED:"jwplayerMediaLoaded",JWPLAYER_MEDIA_COMPLETE:"jwplayerMediaComplete",JWPLAYER_MEDIA_SEEK:"jwplayerMediaSeek",JWPLAYER_MEDIA_TIME:"jwplayerMediaTime",JWPLAYER_MEDIA_VOLUME:"jwplayerMediaVolume",JWPLAYER_MEDIA_META:"jwplayerMediaMeta",JWPLAYER_MEDIA_MUTE:"jwplayerMediaMute",JWPLAYER_PLAYER_STATE:"jwplayerPlayerState",JWPLAYER_PLAYLIST_LOADED:"jwplayerPlaylistLoaded",JWPLAYER_PLAYLIST_ITEM:"jwplayerPlaylistItem"};b.api.events.state={BUFFERING:"BUFFERING",IDLE:"IDLE",PAUSED:"PAUSED",PLAYING:"PLAYING"};b.api.playerById=function(d){for(var c=0;c=0){var c=document.getElementById(a[f].id);if(document.getElementById(a[f].id+"_wrapper")){c=document.getElementById(a[f].id+"_wrapper")}if(c){if(d){b.utils.setOuterHTML(c,d)}else{var h=document.createElement("div");var e=c.id;if(c.id.indexOf("_wrapper")==c.id.length-8){newID=c.id.substring(0,c.id.length-8)}h.setAttribute("id",e);c.parentNode.replaceChild(h,c)}}a.splice(f,1)}return null};b.getPlayers=function(){return a.slice(0)}})(jwplayer);var _userPlayerReady=(typeof playerReady=="function")?playerReady:undefined;playerReady=function(b){var a=jwplayer.api.playerById(b.id);if(a){a.playerReady(b)}if(_userPlayerReady){_userPlayerReady.call(this,b)}};(function(a){a.embed=function(g){var i={width:400,height:300,components:{controlbar:{position:"over"}}};var f=a.utils.mediaparser.parseMedia(g.container);var e=new a.embed.config(a.utils.extend(i,f,g.config),this);var h=a.plugins.loadPlugins(g.id,e.plugins);function c(l,k){for(var j in k){if(typeof l[j]=="function"){(l[j]).call(l,k[j])}}}function d(){if(h.getStatus()==a.utils.loaderstatus.COMPLETE){for(var l=0;l-1){return parseInt(i)}}return i}var f=["playlist","dock","controlbar","logo"];function g(j){var m={};switch(a.utils.typeOf(j.plugins)){case"object":for(var l in j.plugins){m[a.utils.getPluginName(l)]=l}break;case"string":var n=j.plugins.split(",");for(var k=0;k-1){var l=m.split(".");var k=l[0];var m=l[1];if(a.utils.isInArray(f,k)){b(i,"components",k,m)}else{if(j[k]){b(i,"plugins",j[k],m)}}}}return i};a.embed.config=function(i,q){var p=a.utils.extend({},i);var n;if(d(p.playlist)){n=p.playlist;delete p.playlist}p=a.embed.deserialize(p);p.height=h(p.height);p.width=h(p.width);if(typeof p.plugins=="string"){var j=p.plugins.split(",");if(typeof p.plugins!="object"){p.plugins={}}for(var l=0;l-1)){return true}if(!k||(k&&k=="video")){var l=a.utils.extension(i);if(l&&a.utils.extensionmap[l]){return true}}return false}}})(jwplayer);(function(a){a.embed.flash=function(f,g,k,e,i){function l(n,m,o){var p=document.createElement("param");p.setAttribute("name",m);p.setAttribute("value",o);n.appendChild(p)}function j(n,o,m){return function(p){if(m){document.getElementById(i.id+"_wrapper").appendChild(o)}var r=document.getElementById(i.id).getPluginConfig("display");n.resize(r.width,r.height);var q={left:r.x,top:r.y};a.utils.css(o,q)}}function d(o){if(!o){return{}}var q={};for(var n in o){var m=o[n];for(var p in m){q[n+"."+p]=m[p]}}return q}function h(p,o){if(p[o]){var r=p[o];for(var n in r){var m=r[n];if(typeof m=="string"){if(!p[n]){p[n]=m}}else{for(var q in m){if(!p[n+"."+q]){p[n+"."+q]=m[q]}}}}delete p[o]}}function b(p){if(!p){return{}}var s={},r=[];for(var m in p){var o=a.utils.getPluginName(m);var n=p[m];r.push(m);for(var q in n){s[o+"."+q]=n[q]}}s.plugins=r.join(",");return s}function c(o){var m=o.netstreambasepath?"":"netstreambasepath="+encodeURIComponent(window.location.href)+"&";for(var n in o){if(typeof(o[n])=="object"){m+=n+"="+encodeURIComponent("[[JSON]]"+a.utils.strings.jsonToString(o[n]))+"&"}else{m+=n+"="+encodeURIComponent(o[n])+"&"}}return m.substring(0,m.length-1)}this.embed=function(){k.id=i.id;var x;var p=a.utils.extend({},k);var m=p.width;var v=p.height;if(f.id+"_wrapper"==f.parentNode.id){x=document.getElementById(f.id+"_wrapper")}else{x=document.createElement("div");x.id=f.id+"_wrapper";a.utils.wrap(f,x);a.utils.css(x,{position:"relative",width:m,height:v})}var n=e.setupPlugins(i,p,j);if(n.length>0){a.utils.extend(p,b(n.plugins))}else{delete p.plugins}var q=["height","width","modes","events"];for(var t=0;t';u+='';u+='';u+='';u+='';u+='';u+='';u+="";a.utils.setOuterHTML(f,u);s=document.getElementById(f.id)}else{var r=document.createElement("object");r.setAttribute("type","application/x-shockwave-flash");r.setAttribute("data",g.src);r.setAttribute("width","100%");r.setAttribute("height","100%");r.setAttribute("bgcolor","#000000");r.setAttribute("id",f.id);r.setAttribute("name",f.id);r.setAttribute("tabindex",0);l(r,"allowfullscreen","true");l(r,"allowscriptaccess","always");l(r,"seamlesstabbing","true");l(r,"wmode",o);l(r,"flashvars",c(p));f.parentNode.replaceChild(r,f);s=r}i.container=s;i.setPlayer(s,"flash")};this.supportsConfig=function(){if(a.utils.hasFlash()){if(k){var n=a.utils.getFirstPlaylistItemFromConfig(k);if(typeof n.file=="undefined"&&typeof n.levels=="undefined"){return true}else{if(n.file){return flashCanPlay(n.file,n.provider)}else{if(n.levels&&n.levels.length){for(var m=0;m0){j.skin=j.skin.replace(/\.zip/i,".xml")}var l=new(a.html5(c)).setup(j);f.container=document.getElementById(f.id);f.setPlayer(l,"html5")}else{return null}};this.supportsConfig=function(){var h=document.createElement("video");if(!!h.canPlayType){if(b){var k=a.utils.getFirstPlaylistItemFromConfig(b);if(typeof k.file=="undefined"&&typeof k.levels=="undefined"){return true}else{if(k.file){return html5CanPlay(h,k.file,k.provider,k.playlistfile)}else{if(k.levels&&k.levels.length){for(var j=0;j-1){return B}else{return parseInt(B.replace("px",""),10)}}}return B}this.setup=function(B){l=B;x();j();s.jwAddEventListener(b.api.events.JWPLAYER_MEDIA_LOADED,t);s.jwAddEventListener(b.api.events.JWPLAYER_MEDIA_META,function(){w()});var C;if(window.onresize!==null){C=window.onresize}window.onresize=function(D){if(C!==undefined){try{C(D)}catch(F){}}if(s.jwGetFullscreen()){var E=document.body.getBoundingClientRect();v.width=Math.abs(E.left)+Math.abs(E.right);v.height=window.innerHeight}i(v.width,v.height)}};function g(B){switch(B.keyCode){case 27:if(s.jwGetFullscreen()){s.jwSetFullscreen(false)}break;case 32:if(s.jwGetState()!=b.api.events.state.IDLE&&s.jwGetState()!=b.api.events.state.PAUSED){s.jwPause()}else{s.jwPlay()}break}}function i(E,B){if(u.style.display=="none"){return}var D=[].concat(v.plugins.order);D.reverse();A=D.length+2;if(!v.fullscreen){v.width=E;v.height=B;f=E;z=B;c(q,{top:0,bottom:0,left:0,right:0,width:E,height:B});c(u,{height:z,width:f});var C=m(r,D);if(C.length>0){A+=C.length;m(k,C,true)}}else{if(navigator.vendor.indexOf("Apple")!==0){m(y,D,true)}}w()}function m(G,D,E){var C=[];for(var B=0;B-1){percentage=parseFloat(v.width.substring(0,v.width.lastIndexOf("%")))/100;B=Math.round(window.innerWidth*percentage)}if(typeof v.height=="string"&&v.height.lastIndexOf("%")>-1){percentage=parseFloat(v.height.substring(0,v.height.lastIndexOf("%")))/100;C=Math.round(window.innerHeight*percentage)}return{position:"absolute",width:(B-h(q.style.left)-h(q.style.right)),height:(C-h(q.style.top)-h(q.style.bottom)),zIndex:E}}function y(B,C){return{position:"fixed",width:v.width,height:v.height,zIndex:C}}function w(){q.style.position="absolute";v.getMedia().getDisplayElement().style.position="absolute";if(v.getMedia().getDisplayElement().videoWidth==0||v.getMedia().getDisplayElement().videoHeight==0){return}var B,D;if(q.style.width.toString().lastIndexOf("%")>-1||q.style.width.toString().lastIndexOf("%")>-1){var C=q.getBoundingClientRect();B=Math.abs(C.left)+Math.abs(C.right);D=Math.abs(C.top)+Math.abs(C.bottom)}else{B=h(q.style.width);D=h(q.style.height)}b.utils.stretch(s.jwGetStretching(),v.getMedia().getDisplayElement(),B,D,v.getMedia().getDisplayElement().videoWidth,v.getMedia().getDisplayElement().videoHeight)}function d(C){var D={position:"absolute",margin:0,padding:0,top:null};var B=v.plugins.config[C].currentPosition.toLowerCase();switch(B.toUpperCase()){case b.html5.view.positions.TOP:D.top=h(q.style.top);D.left=h(q.style.left);D.width=f-h(q.style.left)-h(q.style.right);D.height=v.plugins.object[C].height;q.style[B]=h(q.style[B])+v.plugins.object[C].height+"px";q.style.height=h(q.style.height)-D.height+"px";break;case b.html5.view.positions.RIGHT:D.top=h(q.style.top);D.right=h(q.style.right);D.width=D.width=v.plugins.object[C].width;D.height=z-h(q.style.top)-h(q.style.bottom);q.style[B]=h(q.style[B])+v.plugins.object[C].width+"px";q.style.width=h(q.style.width)-D.width+"px";break;case b.html5.view.positions.BOTTOM:D.bottom=h(q.style.bottom);D.left=h(q.style.left);D.width=f-h(q.style.left)-h(q.style.right);D.height=v.plugins.object[C].height;q.style[B]=h(q.style[B])+v.plugins.object[C].height+"px";q.style.height=h(q.style.height)-D.height+"px";break;case b.html5.view.positions.LEFT:D.top=h(q.style.top);D.left=h(q.style.left);D.width=v.plugins.object[C].width;D.height=z-h(q.style.top)-h(q.style.bottom);q.style[B]=h(q.style[B])+v.plugins.object[C].width+"px";q.style.width=h(q.style.width)-D.width+"px";break;default:break}return D}this.resize=i;this.fullscreen=function(E){if(navigator.vendor.indexOf("Apple")===0){if(v.getMedia().getDisplayElement().webkitSupportsFullscreen){if(E){try{v.getMedia().getDisplayElement().webkitEnterFullscreen()}catch(D){}}else{try{v.getMedia().getDisplayElement().webkitExitFullscreen()}catch(D){}}}}else{if(E){document.onkeydown=g;clearInterval(n);var C=document.body.getBoundingClientRect();v.width=Math.abs(C.left)+Math.abs(C.right);v.height=window.innerHeight;var B={position:"fixed",width:"100%",height:"100%",top:0,left:0,zIndex:2147483000};c(u,B);B.zIndex=1;c(v.getMedia().getDisplayElement(),B);B.zIndex=2;c(q,B)}else{document.onkeydown="";v.width=f;v.height=z;c(u,{position:"relative",height:v.height,width:v.width,zIndex:0})}i(v.width,v.height)}}};function a(d){return([b.html5.view.positions.TOP,b.html5.view.positions.RIGHT,b.html5.view.positions.BOTTOM,b.html5.view.positions.LEFT].toString().indexOf(d.toUpperCase())>-1)}b.html5.view.positions={TOP:"TOP",RIGHT:"RIGHT",BOTTOM:"BOTTOM",LEFT:"LEFT",OVER:"OVER",NONE:"NONE"}})(jwplayer);(function(a){var b={backgroundcolor:"",margin:10,font:"Arial,sans-serif",fontsize:10,fontcolor:parseInt("000000",16),fontstyle:"normal",fontweight:"bold",buttoncolor:parseInt("ffffff",16),position:a.html5.view.positions.BOTTOM,idlehide:false,layout:{left:{position:"left",elements:[{name:"play",type:"button"},{name:"divider",type:"divider"},{name:"prev",type:"button"},{name:"divider",type:"divider"},{name:"next",type:"button"},{name:"divider",type:"divider"},{name:"elapsed",type:"text"}]},center:{position:"center",elements:[{name:"time",type:"slider"}]},right:{position:"right",elements:[{name:"duration",type:"text"},{name:"blank",type:"button"},{name:"divider",type:"divider"},{name:"mute",type:"button"},{name:"volume",type:"slider"},{name:"divider",type:"divider"},{name:"fullscreen",type:"button"}]}}};_css=a.utils.css;_hide=function(c){_css(c,{display:"none"})};_show=function(c){_css(c,{display:"block"})};a.html5.controlbar=function(k,M){var j=k;var A=a.utils.extend({},b,j.skin.getComponentSettings("controlbar"),M);if(A.position==a.html5.view.positions.NONE||typeof a.html5.view.positions[A.position]=="undefined"){return}if(a.utils.mapLength(j.skin.getComponentLayout("controlbar"))>0){A.layout=j.skin.getComponentLayout("controlbar")}var R;var J;var Q;var B;var t="none";var f;var i;var S;var e;var d;var w;var K={};var o=false;var c={};var O;var h=false;function E(){if(!O){O=j.skin.getSkinElement("controlbar","background");if(!O){O={width:0,height:0,src:null}}}return O}function I(){Q=0;B=0;J=0;if(!o){var Z={height:E().height,backgroundColor:A.backgroundcolor};R=document.createElement("div");R.id=j.id+"_jwplayer_controlbar";_css(R,Z)}var Y=(j.skin.getSkinElement("controlbar","capLeft"));var X=(j.skin.getSkinElement("controlbar","capRight"));if(Y){v("capLeft","left",false,R)}var aa={position:"absolute",height:E().height,left:(Y?Y.width:0),zIndex:0};P("background",R,aa,"img");if(E().src){K.background.src=E().src}aa.zIndex=1;P("elements",R,aa);if(X){v("capRight","right",false,R)}}this.getDisplayElement=function(){return R};this.resize=function(Z,X){a.utils.cancelAnimation(R);document.getElementById(j.id).onmousemove=x;d=Z;w=X;x();var Y=u();D({id:j.id,duration:S,position:i});s({id:j.id,bufferPercent:e});return Y};this.show=function(){h=false;_show(R)};this.hide=function(){h=true;_hide(R)};function p(){var Y=["timeSlider","volumeSlider","timeSliderRail","volumeSliderRail"];for(var Z in Y){var X=Y[Z];if(typeof K[X]!="undefined"){c[X]=K[X].getBoundingClientRect()}}}function x(){if(h){return}a.utils.cancelAnimation(R);if(g()){a.utils.fadeTo(R,1,0,1,0)}else{a.utils.fadeTo(R,0,0.1,1,2)}}function g(){if(h){return false}if(j.jwGetState()==a.api.events.state.IDLE||j.jwGetState()==a.api.events.state.PAUSED){if(A.idlehide){return false}return true}if(j.jwGetFullscreen()){return false}if(A.position==a.html5.view.positions.OVER){return false}return true}function P(ab,aa,Z,X){var Y;if(!o){if(!X){X="div"}Y=document.createElement(X);K[ab]=Y;Y.id=R.id+"_"+ab;aa.appendChild(Y)}else{Y=document.getElementById(R.id+"_"+ab)}if(Z!==undefined){_css(Y,Z)}return Y}function H(){W(A.layout.left);W(A.layout.right,-1);W(A.layout.center)}function W(aa,X){var ab=aa.position=="right"?"right":"left";var Z=a.utils.extend([],aa.elements);if(X!==undefined){Z.reverse()}for(var Y=0;Y0||aa.indexOf("divider")===0){var ac={height:E().height,position:"absolute",display:"block",top:0};if((aa.indexOf("next")===0||aa.indexOf("prev")===0)&&j.jwGetPlaylist().length<2){Y=false;ac.display="none"}var ah;if(aa.indexOf("Text")>0){aa.innerhtml="00:00";ac.font=A.fontsize+"px/"+(E().height+1)+"px "+A.font;ac.color=A.fontcolor;ac.textAlign="center";ac.fontWeight=A.fontweight;ac.fontStyle=A.fontstyle;ac.cursor="default";ah=14+3*A.fontsize}else{if(aa.indexOf("divider")===0){if(X){if(!isNaN(parseInt(X))){ah=parseInt(X)}}else{if(Z){var ae=j.skin.getSkinElement("controlbar",Z);if(ae){ac.background="url("+ae.src+") repeat-x center left";ah=ae.width}}else{ac.background="url("+j.skin.getSkinElement("controlbar","divider").src+") repeat-x center left";ah=j.skin.getSkinElement("controlbar","divider").width}}}else{ac.background="url("+j.skin.getSkinElement("controlbar",aa).src+") repeat-x center left";ah=j.skin.getSkinElement("controlbar",aa).width}}if(ad=="left"){ac.left=isNaN(ab)?Q:ab;if(Y){Q+=ah}}else{if(ad=="right"){ac.right=isNaN(ab)?B:ab;if(Y){B+=ah}}}if(a.utils.typeOf(ag)=="undefined"){ag=K.elements}ac.width=ah;if(o){_css(K[aa],ac)}else{var af=P(aa,ag,ac);if(j.skin.getSkinElement("controlbar",aa+"Over")!==undefined){af.onmouseover=function(ai){af.style.backgroundImage=["url(",j.skin.getSkinElement("controlbar",aa+"Over").src,")"].join("")};af.onmouseout=function(ai){af.style.backgroundImage=["url(",j.skin.getSkinElement("controlbar",aa).src,")"].join("")}}}}}function C(){j.jwAddEventListener(a.api.events.JWPLAYER_PLAYLIST_LOADED,y);j.jwAddEventListener(a.api.events.JWPLAYER_MEDIA_BUFFER,s);j.jwAddEventListener(a.api.events.JWPLAYER_PLAYER_STATE,q);j.jwAddEventListener(a.api.events.JWPLAYER_MEDIA_TIME,D);j.jwAddEventListener(a.api.events.JWPLAYER_MEDIA_MUTE,V);j.jwAddEventListener(a.api.events.JWPLAYER_MEDIA_VOLUME,l);j.jwAddEventListener(a.api.events.JWPLAYER_MEDIA_COMPLETE,G)}function y(){I();H();u();T()}function T(){D({id:j.id,duration:j.jwGetDuration(),position:0});s({id:j.id,bufferProgress:0});V({id:j.id,mute:j.jwGetMute()});q({id:j.id,newstate:a.api.events.state.IDLE});l({id:j.id,volume:j.jwGetVolume()})}function L(Z,aa,Y){if(o){return}if(j.skin.getSkinElement("controlbar",Z)!==undefined){var X=K[Z];if(X!==null){_css(X,{cursor:"pointer"});if(aa=="fullscreen"){X.onmouseup=function(ab){ab.stopPropagation();j.jwSetFullscreen(!j.jwGetFullscreen())}}else{X.onmouseup=function(ab){ab.stopPropagation();if(Y!==null){j[aa](Y)}else{j[aa]()}}}}}}function N(X){if(o){return}var Y=K[X+"Slider"];_css(K.elements,{cursor:"pointer"});_css(Y,{cursor:"pointer"});Y.onmousedown=function(Z){t=X};Y.onmouseup=function(Z){Z.stopPropagation();U(Z.pageX)};Y.onmousemove=function(Z){if(t=="time"){f=true;var aa=Z.pageX-c[X+"Slider"].left-window.pageXOffset;_css(K.timeSliderThumb,{left:aa})}}}function U(Y){f=false;var X;if(t=="time"){X=Y-c.timeSliderRail.left+window.pageXOffset;var aa=X/c.timeSliderRail.width*S;if(aa<0){aa=0}else{if(aa>S){aa=S-3}}if(j.jwGetState()==a.api.events.state.PAUSED||j.jwGetState()==a.api.events.state.IDLE){j.jwPlay()}j.jwSeek(aa)}else{if(t=="volume"){X=Y-c.volumeSliderRail.left-window.pageXOffset;var Z=Math.round(X/c.volumeSliderRail.width*100);if(Z<0){Z=0}else{if(Z>100){Z=100}}if(j.jwGetMute()){j.jwSetMute(false)}j.jwSetVolume(Z)}}t="none"}function s(Y){if(Y.bufferPercent!==null){e=Y.bufferPercent}if(c.timeSliderRail){var Z=c.timeSliderRail.width;var X=isNaN(Math.round(Z*e/100))?0:Math.round(Z*e/100);_css(K.timeSliderBuffer,{width:X})}}function V(X){if(X.mute){_hide(K.muteButton);_show(K.unmuteButton);_hide(K.volumeSliderProgress)}else{_show(K.muteButton);_hide(K.unmuteButton);_show(K.volumeSliderProgress)}}function q(X){if(X.newstate==a.api.events.state.BUFFERING||X.newstate==a.api.events.state.PLAYING){_show(K.pauseButton);_hide(K.playButton)}else{_hide(K.pauseButton);_show(K.playButton)}x();if(X.newstate==a.api.events.state.IDLE){_hide(K.timeSliderBuffer);_hide(K.timeSliderProgress);_hide(K.timeSliderThumb);D({id:j.id,duration:j.jwGetDuration(),position:0})}else{_show(K.timeSliderBuffer);if(X.newstate!=a.api.events.state.BUFFERING){_show(K.timeSliderProgress);_show(K.timeSliderThumb)}}}function G(X){s({bufferPercent:0});D(a.utils.extend(X,{position:0,duration:S}))}function D(aa){if(aa.position!==null){i=aa.position}if(aa.duration!==null){S=aa.duration}var Y=(i===S===0)?0:i/S;var ab=c.timeSliderRail;if(ab){var X=isNaN(Math.round(ab.width*Y))?0:Math.round(ab.width*Y);var Z=X;if(K.timeSliderProgress){K.timeSliderProgress.style.width=X+"px";if(!f){if(K.timeSliderThumb){K.timeSliderThumb.style.left=Z+"px"}}}}if(K.durationText){K.durationText.innerHTML=n(S)}if(K.elapsedText){K.elapsedText.innerHTML=n(i)}}function n(X){str="00:00";if(X>0){str=Math.floor(X/60)<10?"0"+Math.floor(X/60)+":":Math.floor(X/60)+":";str+=Math.floor(X%60)<10?"0"+Math.floor(X%60):Math.floor(X%60)}return str}function m(){var aa,Y;var Z=document.getElementById(R.id+"_elements").childNodes;for(var X in document.getElementById(R.id+"_elements").childNodes){if(isNaN(parseInt(X,10))){continue}if(Z[X].id.indexOf(R.id+"_divider")===0&&Y&&Y.id.indexOf(R.id+"_divider")===0&&Z[X].style.backgroundImage==Y.style.backgroundImage){Z[X].style.display="none"}else{if(Z[X].id.indexOf(R.id+"_divider")===0&&aa&&aa.style.display!="none"){Z[X].style.display="block"}}if(Z[X].style.display!="none"){Y=Z[X]}aa=Z[X]}}function u(){m();if(j.jwGetFullscreen()){_show(K.normalscreenButton);_hide(K.fullscreenButton)}else{_hide(K.normalscreenButton);_show(K.fullscreenButton)}var Y={width:d};var X={};if(A.position==a.html5.view.positions.OVER||j.jwGetFullscreen()){Y.left=A.margin;Y.width-=2*A.margin;Y.top=w-E().height-A.margin;Y.height=E().height}else{Y.left=0}var aa=j.skin.getSkinElement("controlbar","capLeft");var Z=j.skin.getSkinElement("controlbar","capRight");X.left=aa?aa.width:0;X.width=Y.width-X.left-(Z?Z.width:0);var ab=j.skin.getSkinElement("controlbar","timeSliderCapLeft")===undefined?0:j.skin.getSkinElement("controlbar","timeSliderCapLeft").width;_css(K.timeSliderRail,{width:(X.width-Q-B),left:ab});if(K.timeSliderCapRight!==undefined){_css(K.timeSliderCapRight,{left:ab+(X.width-Q-B)})}_css(R,Y);_css(K.elements,X);_css(K.background,X);p();return Y}function l(ab){if(K.volumeSliderRail!==undefined){var Z=isNaN(ab.volume/100)?1:ab.volume/100;var aa=parseInt(K.volumeSliderRail.style.width.replace("px",""),10);var X=isNaN(Math.round(aa*Z))?0:Math.round(aa*Z);var ac=parseInt(K.volumeSliderRail.style.right.replace("px",""),10);var Y=j.skin.getSkinElement("controlbar","volumeSliderCapLeft")===undefined?0:j.skin.getSkinElement("controlbar","volumeSliderCapLeft").width;_css(K.volumeSliderProgress,{width:X,left:Y});if(K.volumeSliderCapLeft!==undefined){_css(K.volumeSliderCapLeft,{left:0})}}}function r(){I();H();p();o=true;C();T();R.style.opacity=A.idlehide?0:1}r();return this}})(jwplayer);(function(b){var a=["width","height","state","playlist","item","position","buffer","duration","volume","mute","fullscreen"];b.html5.controller=function(t,r,e,q){var w=t;var y=e;var d=q;var k=r;var A=true;var c=-1;var u=(y.config.debug!==undefined)&&(y.config.debug.toString().toLowerCase()=="console");var i=new b.html5.eventdispatcher(k.id,u);b.utils.extend(this,i);function m(D){i.sendEvent(D.type,D)}y.addGlobalListener(m);function p(){try{if(y.playlist[y.item].levels[0].file.length>0){if(A||y.state==b.api.events.state.IDLE){y.addEventListener(b.api.events.JWPLAYER_MEDIA_BUFFER_FULL,function(){y.getMedia().play()});y.addEventListener(b.api.events.JWPLAYER_MEDIA_TIME,function(E){if(E.position>=y.playlist[y.item].start&&c>=0){y.playlist[y.item].start=c;c=-1}});if(y.config.repeat){y.addEventListener(b.api.events.JWPLAYER_MEDIA_COMPLETE,function(E){setTimeout(n,25)})}y.getMedia().load(y.playlist[y.item]);A=false}else{if(y.state==b.api.events.state.PAUSED){y.getMedia().play()}}}return true}catch(D){i.sendEvent(b.api.events.JWPLAYER_ERROR,D)}return false}function B(){try{if(y.playlist[y.item].levels[0].file.length>0){switch(y.state){case b.api.events.state.PLAYING:case b.api.events.state.BUFFERING:y.getMedia().pause();break}}return true}catch(D){i.sendEvent(b.api.events.JWPLAYER_ERROR,D)}return false}function x(D){try{if(y.playlist[y.item].levels[0].file.length>0){if(typeof D!="number"){D=parseFloat(D)}switch(y.state){case b.api.events.state.IDLE:if(c<0){c=y.playlist[y.item].start;y.playlist[y.item].start=D}p();break;case b.api.events.state.PLAYING:case b.api.events.state.PAUSED:case b.api.events.state.BUFFERING:y.seek(D);break}}return true}catch(E){i.sendEvent(b.api.events.JWPLAYER_ERROR,E)}return false}function j(){try{if(y.playlist[y.item].levels[0].file.length>0&&y.state!=b.api.events.state.IDLE){y.getMedia().stop()}return true}catch(D){i.sendEvent(b.api.events.JWPLAYER_ERROR,D)}return false}function g(){try{if(y.playlist[y.item].levels[0].file.length>0){if(y.config.shuffle){o(s())}else{if(y.item+1==y.playlist.length){o(0)}else{o(y.item+1)}}}if(y.state!=b.api.events.state.PLAYING&&y.state!=b.api.events.state.BUFFERING){p()}return true}catch(D){i.sendEvent(b.api.events.JWPLAYER_ERROR,D)}return false}function f(){try{if(y.playlist[y.item].levels[0].file.length>0){if(y.config.shuffle){o(s())}else{if(y.item===0){o(y.playlist.length-1)}else{o(y.item-1)}}}if(y.state!=b.api.events.state.PLAYING&&y.state!=b.api.events.state.BUFFERING){p()}return true}catch(D){i.sendEvent(b.api.events.JWPLAYER_ERROR,D)}return false}function s(){var D=null;if(y.playlist.length>1){while(D===null){D=Math.floor(Math.random()*y.playlist.length);if(D==y.item){D=null}}}else{D=0}return D}function o(E){y.resetEventListeners();y.addGlobalListener(m);try{if(y.playlist[E].levels[0].file.length>0){var F=y.state;if(F!==b.api.events.state.IDLE){j()}y.item=E;A=true;y.setActiveMediaProvider(y.playlist[y.item]);i.sendEvent(b.api.events.JWPLAYER_PLAYLIST_ITEM,{index:E});if(F==b.api.events.state.PLAYING||F==b.api.events.state.BUFFERING||y.config.chromeless||e.config.autostart===true){p()}}return true}catch(D){i.sendEvent(b.api.events.JWPLAYER_ERROR,D)}return false}function z(E){try{switch(typeof(E)){case"number":y.getMedia().volume(E);break;case"string":y.getMedia().volume(parseInt(E,10));break}return true}catch(D){i.sendEvent(b.api.events.JWPLAYER_ERROR,D)}return false}function l(E){try{if(typeof E=="undefined"){y.getMedia().mute(!y.mute)}else{if(E.toString().toLowerCase()=="true"){y.getMedia().mute(true)}else{y.getMedia().mute(false)}}return true}catch(D){i.sendEvent(b.api.events.JWPLAYER_ERROR,D)}return false}function h(E,D){try{y.width=E;y.height=D;d.resize(E,D);i.sendEvent(b.api.events.JWPLAYER_RESIZE,{width:y.width,height:y.height});return true}catch(F){i.sendEvent(b.api.events.JWPLAYER_ERROR,F)}return false}function v(E){try{if(typeof E=="undefined"){y.fullscreen=!y.fullscreen;d.fullscreen(!y.fullscreen)}else{if(E.toString().toLowerCase()=="true"){y.fullscreen=true;d.fullscreen(true)}else{y.fullscreen=false;d.fullscreen(false)}}i.sendEvent(b.api.events.JWPLAYER_RESIZE,{width:y.width,height:y.height});i.sendEvent(b.api.events.JWPLAYER_FULLSCREEN,{fullscreen:E});return true}catch(D){i.sendEvent(b.api.events.JWPLAYER_ERROR,D)}return false}function C(D){try{j();y.loadPlaylist(D);o(y.item);return true}catch(E){i.sendEvent(b.api.events.JWPLAYER_ERROR,E)}return false}b.html5.controller.repeatoptions={LIST:"LIST",ALWAYS:"ALWAYS",SINGLE:"SINGLE",NONE:"NONE"};function n(){y.resetEventListeners();y.addGlobalListener(m);switch(y.config.repeat.toUpperCase()){case b.html5.controller.repeatoptions.SINGLE:p();break;case b.html5.controller.repeatoptions.ALWAYS:if(y.item==y.playlist.length-1&&!y.config.shuffle){o(0);p()}else{g()}break;case b.html5.controller.repeatoptions.LIST:if(y.item==y.playlist.length-1&&!y.config.shuffle){o(0)}else{g()}break}}this.play=p;this.pause=B;this.seek=x;this.stop=j;this.next=g;this.prev=f;this.item=o;this.setVolume=z;this.setMute=l;this.resize=h;this.setFullscreen=v;this.load=C}})(jwplayer);(function(a){a.html5.defaultSkin=function(){this.text='';this.xml=null;if(window.DOMParser){parser=new DOMParser();this.xml=parser.parseFromString(this.text,"text/xml")}else{this.xml=new ActiveXObject("Microsoft.XMLDOM");this.xml.async="false";this.xml.loadXML(this.text)}return this}})(jwplayer);(function(a){_css=a.utils.css;_hide=function(b){_css(b,{display:"none"})};_show=function(b){_css(b,{display:"block"})};a.html5.display=function(o,z){var r={icons:true};var j=a.utils.extend({},r,z);var w=o;var d={};var f;var A;var k;var x;var y;var p;var i;var n=w.skin.getComponentSettings("display").bufferrotation===undefined?15:parseInt(w.skin.getComponentSettings("display").bufferrotation,10);var e=w.skin.getComponentSettings("display").bufferinterval===undefined?100:parseInt(w.skin.getComponentSettings("display").bufferinterval,10);var c={display:{style:{cursor:"pointer",top:0,left:0,overflow:"hidden"},click:u},display_icon:{style:{cursor:"pointer",position:"absolute",top:((w.skin.getSkinElement("display","background").height-w.skin.getSkinElement("display","playIcon").height)/2),left:((w.skin.getSkinElement("display","background").width-w.skin.getSkinElement("display","playIcon").width)/2),border:0,margin:0,padding:0,zIndex:3}},display_iconBackground:{style:{cursor:"pointer",position:"absolute",top:((A-w.skin.getSkinElement("display","background").height)/2),left:((f-w.skin.getSkinElement("display","background").width)/2),border:0,backgroundImage:(["url(",w.skin.getSkinElement("display","background").src,")"]).join(""),width:w.skin.getSkinElement("display","background").width,height:w.skin.getSkinElement("display","background").height,margin:0,padding:0,zIndex:2}},display_image:{style:{display:"none",width:f,height:A,position:"absolute",cursor:"pointer",left:0,top:0,margin:0,padding:0,textDecoration:"none",zIndex:1}},display_text:{style:{zIndex:4,position:"relative",opacity:0.8,backgroundColor:parseInt("000000",16),color:parseInt("ffffff",16),textAlign:"center",fontFamily:"Arial,sans-serif",padding:"0 5px",fontSize:14}}};w.jwAddEventListener(a.api.events.JWPLAYER_PLAYER_STATE,l);w.jwAddEventListener(a.api.events.JWPLAYER_MEDIA_MUTE,l);w.jwAddEventListener(a.api.events.JWPLAYER_PLAYLIST_ITEM,l);w.jwAddEventListener(a.api.events.JWPLAYER_ERROR,t);B();function B(){d.display=s("div","display");d.display_text=s("div","display_text");d.display.appendChild(d.display_text);d.display_image=s("img","display_image");d.display_image.onerror=function(C){_hide(d.display_image)};d.display_image.onload=m;d.display_icon=s("div","display_icon");d.display_iconBackground=s("div","display_iconBackground");d.display.appendChild(d.display_image);d.display_iconBackground.appendChild(d.display_icon);d.display.appendChild(d.display_iconBackground);b()}this.getDisplayElement=function(){return d.display};this.resize=function(D,C){f=D;A=C;_css(d.display,{width:D,height:C});_css(d.display_text,{width:(D-10),top:((A-d.display_text.getBoundingClientRect().height)/2)});_css(d.display_iconBackground,{top:((A-w.skin.getSkinElement("display","background").height)/2),left:((f-w.skin.getSkinElement("display","background").width)/2)});h();l({})};this.show=function(){_show(d.display_icon);_show(d.display_iconBackground)};this.hide=function(){q()};function m(C){k=d.display_image.naturalWidth;x=d.display_image.naturalHeight;h()}function h(){a.utils.stretch(w.jwGetStretching(),d.display_image,f,A,k,x)}function s(C,E){var D=document.createElement(C);D.id=w.id+"_jwplayer_"+E;_css(D,c[E].style);return D}function b(){for(var C in d){if(c[C].click!==undefined){d[C].onclick=c[C].click}}}function u(C){if(typeof C.preventDefault!="undefined"){C.preventDefault()}else{C.returnValue=false}if(w.jwGetState()!=a.api.events.state.PLAYING){w.jwPlay()}else{w.jwPause()}}function g(C){if(i||!j.icons){q();return}_show(d.display_iconBackground);d.display_icon.style.backgroundImage=(["url(",w.skin.getSkinElement("display",C).src,")"]).join("");_css(d.display_icon,{display:"block",width:w.skin.getSkinElement("display",C).width,height:w.skin.getSkinElement("display",C).height,top:(w.skin.getSkinElement("display","background").height-w.skin.getSkinElement("display",C).height)/2,left:(w.skin.getSkinElement("display","background").width-w.skin.getSkinElement("display",C).width)/2});if(w.skin.getSkinElement("display",C+"Over")!==undefined){d.display_icon.onmouseover=function(D){d.display_icon.style.backgroundImage=["url(",w.skin.getSkinElement("display",C+"Over").src,")"].join("")};d.display_icon.onmouseout=function(D){d.display_icon.style.backgroundImage=["url(",w.skin.getSkinElement("display",C).src,")"].join("")}}else{d.display_icon.onmouseover=null;d.display_icon.onmouseout=null}}function q(){_hide(d.display_icon);_hide(d.display_iconBackground)}function t(C){i=true;q();d.display_text.innerHTML=C.error;_show(d.display_text);d.display_text.style.top=((A-d.display_text.getBoundingClientRect().height)/2)+"px"}function v(){var C=d.display_image;d.display_image=s("img","display_image");d.display_image.onerror=function(D){_hide(d.display_image)};d.display_image.onload=m;d.display.replaceChild(d.display_image,C)}function l(C){if((C.type==a.api.events.JWPLAYER_PLAYER_STATE||C.type==a.api.events.JWPLAYER_PLAYLIST_ITEM)&&i){i=false;_hide(d.display_text)}if(p!==undefined){clearInterval(p);p=null;a.utils.animations.rotate(d.display_icon,0)}switch(w.jwGetState()){case a.api.events.state.BUFFERING:g("bufferIcon");y=0;p=setInterval(function(){y+=n;a.utils.animations.rotate(d.display_icon,y%360)},e);g("bufferIcon");break;case a.api.events.state.PAUSED:if(w.jwGetPlaylist()[w.jwGetItem()].provider!="sound"){_css(d.display_image,{background:"transparent no-repeat center center"})}g("playIcon");break;case a.api.events.state.IDLE:if(w.jwGetPlaylist()[w.jwGetItem()].image){_css(d.display_image,{display:"block"});d.display_image.src=a.utils.getAbsolutePath(w.jwGetPlaylist()[w.jwGetItem()].image)}else{v()}g("playIcon");break;default:if(w.jwGetMute()&&j.showmute){if(w.jwGetPlaylist()[w.jwGetItem()].provider!="sound"){v()}g("muteIcon")}else{if(w.jwGetPlaylist()[w.jwGetItem()].provider!="sound"){v()}_hide(d.display_iconBackground);_hide(d.display_icon)}break}}return this}})(jwplayer);(function(a){_css=a.utils.css;a.html5.dock=function(g,c){function f(){return{align:a.html5.view.positions.RIGHT}}var k=a.utils.extend({},f(),c);if(k.align=="FALSE"){return}var h={};var b=[];var d;var e;var j=document.createElement("div");j.id=g.id+"_jwplayer_dock";this.getDisplayElement=function(){return j};this.setButton=function(o,l,m,n){if(!l&&h[o]){a.utils.arrays.remove(b,o);j.removeChild(h[o].div);delete h[o]}else{if(l){if(!h[o]){h[o]={}}h[o].handler=l;h[o].outGraphic=m;h[o].overGraphic=n;if(!h[o].div){b.push(o);h[o].div=document.createElement("div");h[o].div.style.position="relative";j.appendChild(h[o].div);h[o].div.appendChild(document.createElement("img"));h[o].div.childNodes[0].style.position="absolute";h[o].div.childNodes[0].style.left=0;h[o].div.childNodes[0].style.top=0;h[o].div.childNodes[0].style.zIndex=10;h[o].div.childNodes[0].style.cursor="pointer";h[o].div.appendChild(document.createElement("img"));h[o].div.childNodes[1].style.position="absolute";h[o].div.childNodes[1].style.left=0;h[o].div.childNodes[1].style.top=0;if(g.skin.getSkinElement("dock","button")){h[o].div.childNodes[1].src=g.skin.getSkinElement("dock","button").src}h[o].div.childNodes[1].style.zIndex=9;h[o].div.childNodes[1].style.cursor="pointer";h[o].div.onmouseover=function(){if(h[o].overGraphic){h[o].div.childNodes[0].src=h[o].overGraphic}if(g.skin.getSkinElement("dock","buttonOver")){h[o].div.childNodes[1].src=g.skin.getSkinElement("dock","buttonOver").src}};h[o].div.onmouseout=function(){if(h[o].outGraphic){h[o].div.childNodes[0].src=h[o].outGraphic}if(g.skin.getSkinElement("dock","button")){h[o].div.childNodes[1].src=g.skin.getSkinElement("dock","button").src}};if(h[o].overGraphic){h[o].div.childNodes[0].src=h[o].overGraphic}if(h[o].outGraphic){h[o].div.childNodes[0].src=h[o].outGraphic}if(g.skin.getSkinElement("dock","button")){h[o].div.childNodes[1].src=g.skin.getSkinElement("dock","button").src}}if(l){h[o].div.onclick=function(p){p.preventDefault();a(g.id).callback(o);if(h[o].overGraphic){h[o].div.childNodes[0].src=h[o].overGraphic}if(g.skin.getSkinElement("dock","button")){h[o].div.childNodes[1].src=g.skin.getSkinElement("dock","button").src}}}}}i(d,e)};function i(n,l){d=n;e=l;if(b.length>0){var p=10;var r=n-g.skin.getSkinElement("dock","button").width-p;var o=p;var q=-1;if(k.align==a.html5.view.positions.LEFT){q=1;r=p}for(var m=0;m((s+1)*l)){o=((s+1)*l)+p;s=Math.floor(o/l)}h[b[m]].div.style.top=(o%l)+"px";h[b[m]].div.style.left=(r+(g.skin.getSkinElement("dock","button").width+p)*s*q)+"px";o+=g.skin.getSkinElement("dock","button").height+p}}}this.resize=i;this.show=function(){_css(j,{display:"block"})};this.hide=function(){_css(j,{display:"none"})};return this}})(jwplayer);(function(a){a.html5.eventdispatcher=function(d,b){var c=new a.events.eventdispatcher(b);a.utils.extend(this,c);this.sendEvent=function(e,f){if(f===undefined){f={}}a.utils.extend(f,{id:d,version:a.version,type:e});c.sendEvent(e,f)}}})(jwplayer);(function(a){var b={prefix:"//l.longtailvideo.com/html5/",file:"logo.png",link:"//www.longtailvideo.com/players/jw-flv-player/",margin:8,out:0.5,over:1,timeout:3,hide:true,position:"bottom-left"};_css=a.utils.css;a.html5.logo=function(l,m){var r=l;var n;var i;var c;j();function j(){p();d();f()}function p(){if(b.prefix){var t=l.version.split(/\W/).splice(0,2).join("/");if(b.prefix.indexOf(t)<0){b.prefix+=t+"/"}}if(m.position==a.html5.view.positions.OVER){m.position=b.position}i=a.utils.extend({},b)}function d(){c=document.createElement("img");c.id=r.id+"_jwplayer_logo";c.style.display="none";c.onload=function(t){_css(c,q());r.jwAddEventListener(a.api.events.JWPLAYER_PLAYER_STATE,s);e()};if(!i.file){return}if(i.file.indexOf("//")===0){c.src=i.file}else{c.src=i.prefix+i.file}}if(!i.file){return}this.resize=function(u,t){};this.getDisplayElement=function(){return c};function f(){if(i.link){c.onmouseover=h;c.onmouseout=e;c.onclick=o}else{this.mouseEnabled=false}}function o(t){if(typeof t!="undefined"){t.stopPropagation()}r.jwPause();r.jwSetFullscreen(false);if(i.link){window.open(i.link,"_blank")}return}function e(t){if(i.link){c.style.opacity=i.out}return}function h(t){if(i.hide){c.style.opacity=i.over}return}function q(){var v={textDecoration:"none",position:"absolute",cursor:"pointer"};v.display=i.hide?"none":"block";var u=i.position.toLowerCase().split("-");for(var t in u){v[u[t]]=i.margin}return v}function k(){if(i.hide){c.style.display="block";c.style.opacity=0;a.utils.fadeTo(c,i.out,0.1,parseFloat(c.style.opacity));n=setTimeout(function(){g()},i.timeout*1000)}}function g(){if(i.hide){a.utils.fadeTo(c,0,0.1,parseFloat(c.style.opacity))}}function s(t){if(t.newstate==a.api.events.state.BUFFERING){clearTimeout(n);k()}}return this}})(jwplayer);(function(a){var c={ended:a.api.events.state.IDLE,playing:a.api.events.state.PLAYING,pause:a.api.events.state.PAUSED,buffering:a.api.events.state.BUFFERING};var b=a.utils.css;a.html5.mediavideo=function(f,F){var J={abort:t,canplay:m,canplaythrough:m,durationchange:q,emptied:t,ended:m,error:l,loadeddata:q,loadedmetadata:q,loadstart:m,pause:m,play:M,playing:m,progress:B,ratechange:t,seeked:m,seeking:m,stalled:m,suspend:m,timeupdate:M,volumechange:t,waiting:m,canshowcurrentframe:t,dataunavailable:t,empty:t,load:e,loadedfirstframe:t};var K=new a.html5.eventdispatcher();a.utils.extend(this,K);var h=f;var x=F;var G;var I;var d=a.api.events.state.IDLE;var C=null;var n;var g=0;var A=false;var r=false;var O;var N;var i=[];var P;var E=false;function v(){return d}function e(Q){}function t(Q){}function m(Q){if(c[Q.type]){s(c[Q.type])}}function s(Q){if(E){return}if(n){Q=a.api.events.state.IDLE}if(Q==a.api.events.state.PAUSED&&d==a.api.events.state.IDLE){return}if(Q==a.api.events.state.PLAYING&&d==a.api.events.state.IDLE){s(a.api.events.state.BUFFERING);K.sendEvent(a.api.events.JWPLAYER_MEDIA_BUFFER,{bufferPercent:h.buffer});z();return}if(d!=Q){var R=d;h.state=Q;d=Q;var S=false;if(Q==a.api.events.state.IDLE){p();if(h.position>=h.duration&&(h.position>0||h.duration>0)){S=true}if(x.style.display!="none"&&!h.config.chromeless){x.style.display="none"}}K.sendEvent(a.api.events.JWPLAYER_PLAYER_STATE,{oldstate:R,newstate:Q});if(S){K.sendEvent(a.api.events.JWPLAYER_MEDIA_COMPLETE)}}n=false}function q(Q){var R={height:Q.target.videoHeight,width:Q.target.videoWidth,duration:Math.round(Q.target.duration*10)/10};if(h.duration===0||isNaN(h.duration)){h.duration=Math.round(Q.target.duration*10)/10}h.playlist[h.item]=a.utils.extend(h.playlist[h.item],R);K.sendEvent(a.api.events.JWPLAYER_MEDIA_META,{metadata:R})}function M(R){if(n){return}if(R!==undefined&&R.target!==undefined){if(h.duration===0||isNaN(h.duration)){h.duration=Math.round(R.target.duration*10)/10}if(!A&&x.readyState>0){s(a.api.events.state.PLAYING)}if(d==a.api.events.state.PLAYING){if(!A&&x.readyState>0){A=true;try{x.currentTime=h.playlist[h.item].start}catch(Q){}x.volume=h.volume/100;x.muted=h.mute}h.position=Math.round(R.target.currentTime*10)/10;K.sendEvent(a.api.events.JWPLAYER_MEDIA_TIME,{position:R.target.currentTime,duration:R.target.duration})}}B(R)}function z(){if(G===false&&d==a.api.events.state.BUFFERING){K.sendEvent(a.api.events.JWPLAYER_MEDIA_BUFFER_FULL);G=true}}function H(){var Q=(i[i.length-1]-i[0])/i.length;P=setTimeout(function(){if(!I){B({lengthComputable:true,loaded:1,total:1})}},Q*10)}function B(S){var R,Q;if(S!==undefined&&S.lengthComputable&&S.total){o();R=S.loaded/S.total*100;Q=R/100*(h.duration-x.currentTime);if(500)){maxBufferIndex=0;if(maxBufferIndex>=0){R=x.buffered.end(maxBufferIndex)/x.duration*100;Q=x.buffered.end(maxBufferIndex)-x.currentTime}}}z();if(!I){if(R==100&&I===false){I=true}if(R!==null&&(R>h.buffer)){h.buffer=Math.round(R);K.sendEvent(a.api.events.JWPLAYER_MEDIA_BUFFER,{bufferPercent:Math.round(R)})}}}function w(){if(C===null){C=setInterval(function(){M()},100)}}function p(){clearInterval(C);C=null}function l(S){var R="There was an error: ";if((S.target.error&&S.target.tagName.toLowerCase()=="video")||S.target.parentNode.error&&S.target.parentNode.tagName.toLowerCase()=="video"){var Q=S.target.error===undefined?S.target.parentNode.error:S.target.error;switch(Q.code){case Q.MEDIA_ERR_ABORTED:R="You aborted the video playback: ";break;case Q.MEDIA_ERR_NETWORK:R="A network error caused the video download to fail part-way: ";break;case Q.MEDIA_ERR_DECODE:R="The video playback was aborted due to a corruption problem or because the video used features your browser did not support: ";break;case Q.MEDIA_ERR_SRC_NOT_SUPPORTED:R="The video could not be loaded, either because the server or network failed or because the format is not supported: ";break;default:R="An unknown error occurred: ";break}}else{if(S.target.tagName.toLowerCase()=="source"){N--;if(N>0){return}R="The video could not be loaded, either because the server or network failed or because the format is not supported: "}else{a.utils.log("Erroneous error received. Continuing...");return}}u();R+=j();E=true;K.sendEvent(a.api.events.JWPLAYER_ERROR,{error:R});return}function j(){var S="";for(var R in O.levels){var Q=O.levels[R];var T=x.ownerDocument.createElement("source");S+=a.utils.getAbsolutePath(Q.file);if(R<(O.levels.length-1)){S+=", "}}return S}this.getDisplayElement=function(){return x};this.play=function(){if(d!=a.api.events.state.PLAYING){if(x.style.display!="block"){x.style.display="block"}x.play();w();if(G){s(a.api.events.state.PLAYING)}}};this.pause=function(){x.pause();s(a.api.events.state.PAUSED)};this.seek=function(Q){if(!(h.duration===0||isNaN(h.duration))&&!(h.position===0||isNaN(h.position))){x.currentTime=Q;x.play()}};function u(){x.pause();x.removeAttribute("src");var Q=x.getElementsByTagName("source");for(var R=0;R=0){T=R.substr(R.indexOf("/v/")+3)}else{if(R.indexOf("youtu.be")>=0){T=R.substr(R.indexOf("youtu.be/")+9)}else{T=R}}}if(T.indexOf("?")>-1){T=T.substr(0,T.indexOf("?"))}if(T.indexOf("&")>-1){T=T.substr(0,T.indexOf("&"))}return T}this.embed=L;return this}})(jwplayer);(function(jwplayer){var _configurableStateVariables=["width","height","start","duration","volume","mute","fullscreen","item","plugins","stretching"];jwplayer.html5.model=function(api,container,options){var _api=api;var _container=container;var _model={id:_container.id,playlist:[],state:jwplayer.api.events.state.IDLE,position:0,buffer:0,config:{width:480,height:320,item:-1,skin:undefined,file:undefined,image:undefined,start:0,duration:0,bufferlength:5,volume:90,mute:false,fullscreen:false,repeat:"none",stretching:jwplayer.utils.stretching.UNIFORM,autostart:false,debug:undefined,screencolor:undefined}};var _media;var _eventDispatcher=new jwplayer.html5.eventdispatcher();var _components=["display","logo","controlbar","dock"];jwplayer.utils.extend(_model,_eventDispatcher);for(var option in options){if(typeof options[option]=="string"){var type=/color$/.test(option)?"color":null;options[option]=jwplayer.utils.typechecker(options[option],type)}var config=_model.config;var path=option.split(".");for(var edge in path){if(edge==path.length-1){config[path[edge]]=options[option]}else{if(config[path[edge]]===undefined){config[path[edge]]={}}config=config[path[edge]]}}}for(var index in _configurableStateVariables){var configurableStateVariable=_configurableStateVariables[index];_model[configurableStateVariable]=_model.config[configurableStateVariable]}var pluginorder=_components.concat([]);if(_model.plugins!==undefined){if(typeof _model.plugins=="string"){var userplugins=_model.plugins.split(",");for(var userplugin in userplugins){if(typeof userplugins[userplugin]=="string"){pluginorder.push(userplugins[userplugin].replace(/^\s+|\s+$/g,""))}}}}if(typeof _model.config.chromeless=="undefined"&&jwplayer.utils.isIOS()){_model.config.chromeless=true}if(_model.config.chromeless){pluginorder=["logo"];if(_model.config.repeat===undefined||_model.config.repeat=="none"){_model.config.repeat="list"}}_model.plugins={order:pluginorder,config:{},object:{}};if(typeof _model.config.components!="undefined"){for(var component in _model.config.components){_model.plugins.config[component]=_model.config.components[component]}}for(var pluginIndex in _model.plugins.order){var pluginName=_model.plugins.order[pluginIndex];var pluginConfig=_model.config[pluginName]===undefined?{}:_model.config[pluginName];_model.plugins.config[pluginName]=_model.plugins.config[pluginName]===undefined?pluginConfig:jwplayer.utils.extend(_model.plugins.config[pluginName],pluginConfig);if(typeof _model.plugins.config[pluginName].position=="undefined"){_model.plugins.config[pluginName].position=jwplayer.html5.view.positions.OVER}else{_model.plugins.config[pluginName].position=_model.plugins.config[pluginName].position.toString().toUpperCase()}}if(typeof _model.plugins.config.dock!="undefined"){if(typeof _model.plugins.config.dock!="object"){var position=_model.plugins.config.dock.toString().toUpperCase();_model.plugins.config.dock={position:position}}if(typeof _model.plugins.config.dock.position!="undefined"){_model.plugins.config.dock.align=_model.plugins.config.dock.position;_model.plugins.config.dock.position=jwplayer.html5.view.positions.OVER}}_model.loadPlaylist=function(arg,ready){var input;if(typeof arg=="string"){try{input=eval(arg)}catch(err){input=arg}}else{input=arg}var config;switch(jwplayer.utils.typeOf(input)){case"object":config=input;break;case"array":config={playlist:input};break;default:config={file:input};break}_model.playlist=new jwplayer.html5.playlist(config);if(_model.config.shuffle){_model.item=_getShuffleItem()}else{if(_model.config.item>=_model.playlist.length){_model.config.item=_model.playlist.length-1}else{if(_model.config.item<0){_model.config.item=0}}_model.item=_model.config.item}if(!ready){_eventDispatcher.sendEvent(jwplayer.api.events.JWPLAYER_PLAYLIST_LOADED,{playlist:_model.playlist})}_model.setActiveMediaProvider(_model.playlist[_model.item])};function _getShuffleItem(){var result=null;if(_model.playlist.length>1){while(result===null){result=Math.floor(Math.random()*_model.playlist.length);if(result==_model.item){result=null}}}else{result=0}return result}function forward(evt){if(evt.type==jwplayer.api.events.JWPLAYER_MEDIA_LOADED){_container=_media.getDisplayElement()}_eventDispatcher.sendEvent(evt.type,evt)}_model.setActiveMediaProvider=function(playlistItem){if(_media!==undefined){_media.resetEventListeners()}_media=new jwplayer.html5.mediavideo(_model,_container);_media.addGlobalListener(forward);if(_model.config.chromeless){_media.load(playlistItem)}return true};_model.getMedia=function(){return _media};_model.seek=function(pos){_eventDispatcher.sendEvent(jwplayer.api.events.JWPLAYER_MEDIA_SEEK,{position:_model.position,offset:pos});return _media.seek(pos)};_model.setupPlugins=function(){for(var plugin in _model.plugins.order){try{var pluginName=_model.plugins.order[plugin];if(jwplayer.html5[pluginName]!==undefined){_model.plugins.object[pluginName]=new jwplayer.html5[pluginName](_api,_model.plugins.config[pluginName])}else{_model.plugins.order.splice(plugin,plugin+1)}}catch(err){jwplayer.utils.log("Could not setup "+pluginName)}}};return _model}})(jwplayer);(function(a){a.html5.playlist=function(b){var d=[];if(b.playlist&&b.playlist instanceof Array&&b.playlist.length>0){for(var c in b.playlist){if(!isNaN(parseInt(c))){d.push(new a.html5.playlistitem(b.playlist[c]))}}}else{d.push(new a.html5.playlistitem(b))}return d}})(jwplayer);(function(b){b.html5.playlistitem=function(d){var e={author:"",date:"",description:"",image:"",link:"",mediaid:"",tags:"",title:"",provider:"",file:"",streamer:"",duration:-1,start:0,currentLevel:-1,levels:[]};var c=b.utils.extend({},e,d);if(c.type){c.provider=c.type;delete c.type}if(c.levels.length===0){c.levels[0]=new b.html5.playlistitemlevel(c)}if(!c.provider){c.provider=a(c.levels[0])}else{c.provider=c.provider.toLowerCase()}return c};function a(e){if(b.utils.isYouTube(e.file)){return"youtube"}else{var f=b.utils.extension(e.file);var c;if(f&&b.utils.extensionmap[f]){c=b.utils.extensionmap[f].html5}else{if(e.type){c=e.type}}if(c){var d=c.split("/")[0];if(d=="audio"){return"sound"}else{if(d=="video"){return d}}}}return""}})(jwplayer);(function(a){a.html5.playlistitemlevel=function(b){var d={file:"",streamer:"",bitrate:0,width:0};for(var c in d){if(b[c]!==undefined){d[c]=b[c]}}return d}})(jwplayer);(function(a){a.html5.skin=function(){var b={};var c=false;this.load=function(d,e){new a.html5.skinloader(d,function(f){c=true;b=f;e()},function(){new a.html5.skinloader("",function(f){c=true;b=f;e()})})};this.getSkinElement=function(d,e){if(c){try{return b[d].elements[e]}catch(f){a.utils.log("No such skin component / element: ",[d,e])}}return null};this.getComponentSettings=function(d){if(c){return b[d].settings}return null};this.getComponentLayout=function(d){if(c){return b[d].layout}return null}}})(jwplayer);(function(a){a.html5.skinloader=function(f,n,i){var m={};var c=n;var j=i;var e=true;var h;var l=f;var q=false;function k(){if(typeof l!="string"||l===""){d(a.html5.defaultSkin().xml)}else{a.utils.ajax(a.utils.getAbsolutePath(l),function(r){try{if(r.responseXML!==null){d(r.responseXML);return}}catch(s){}d(a.html5.defaultSkin().xml)},function(r){d(a.html5.defaultSkin().xml)})}}function d(w){var C=w.getElementsByTagName("component");if(C.length===0){return}for(var F=0;F0){var I=x.getElementsByTagName("setting");for(var N=0;N0){var K=J.getElementsByTagName("group");for(var u=0;u=0;i--){this.tabwrap.panels[i].setStyle('opacity',0);} for(i=this.tabwrap.activePanel._idx+1;i=0;i--){left-=this.tabwrap.panels[i].offsetWidth;this.tabwrap.panels[i].setStyle('left',left);} var left=this.tabwrap.activePanel.offsetLeft;for(i=this.tabwrap.activePanel._idx+1;i=0;i--){top-=this.tabwrap.panels[i].offsetHeight;this.tabwrap.panels[i].setStyle('top',top-10);} var top=this.tabwrap.activePanel.offsetTop;for(i=this.tabwrap.activePanel._idx+1;i0?this._current-1:this.options.total-1;},next:function(){this._next=this.getNext();this.swap();},prev:function(){this._next=this.getPrev();this.swap();},toogle:function(){clearTimeout(this.timer);this.options.autoroll=this.options.autoroll?0:1;Cookie.set('JAHL-AUTOROLL',this.options.autoroll);if($('jahl-switcher')){$('jahl-switcher').src=this.options.autoroll?$('jahl-switcher').src.replace('play','pause'):$('jahl-switcher').src.replace('pause','play');$('jahl-switcher').title=this.options.autoroll?'Pause':'Play';} this.run();},swap:function(){if(!this.elements.length)return;clearTimeout(this.timer);this.animrun();},animfirst:function(){this._current=0;var el2=this.elements[this._current];new Fx.Style(el2,'opacity').start(0,1);new Fx.Style(this.container,'height').start(0,el2.offsetHeight);if($('jahl-prev'))$('jahl-prev').setProperty('title',this.elements[this.getPrev()]._title);if($('jahl-next'))$('jahl-next').setProperty('title',this.elements[this.getNext()]._title);if($('jahl-prev-title')){if($('jahl-prev-title').getChildren())$('jahl-prev-title').getChildren().each(function(el){el.remove();});this.elements[this.getPrev()].getElement('.ja-newstitle').clone().inject($('jahl-prev-title'));} if($('jahl-next-title')){if($('jahl-next-title').getChildren())$('jahl-next-title').getChildren().each(function(el){el.remove();});this.elements[this.getNext()].getElement('.ja-newstitle').clone().inject($('jahl-next-title'));} if($('ja-zinhl-counter'))$('ja-zinhl-counter').innerHTML=(this._current+1)+"/"+this.options.total;this.run();},animrun:function(){var el1=this.elements[this._current];this._current=this._next;var el2=this.elements[this._current];new Fx.Style(el1,'opacity').start(1,0);new Fx.Style(el2,'opacity').start(0,1);new Fx.Style(this.container,'height').start(el1.offsetHeight,el2.offsetHeight);if($('jahl-prev'))$('jahl-prev').setProperty('title',this.elements[this.getPrev()]._title);if($('jahl-next'))$('jahl-next').setProperty('title',this.elements[this.getNext()]._title);if($('jahl-prev-title')){if($('jahl-prev-title').getChildren())$('jahl-prev-title').getChildren().each(function(el){el.remove();});this.elements[this.getPrev()].getElement('.ja-newstitle').clone().inject($('jahl-prev-title'));} if($('jahl-next-title')){if($('jahl-next-title').getChildren())$('jahl-next-title').getChildren().each(function(el){el.remove();});this.elements[this.getNext()].getElement('.ja-newstitle').clone().inject($('jahl-next-title'));} if($('ja-zinhl-counter'))$('ja-zinhl-counter').innerHTML=(this._current+1)+"/"+this.options.total;this.run();}}); /* script.js */ Element.Events.extend({'wheelup':{type:Element.Events.mousewheel.type,map:function(event){event=new Event(event);if(event.wheel>=0)this.fireEvent('wheelup',event)}},'wheeldown':{type:Element.Events.mousewheel.type,map:function(event){event=new Event(event);if(event.wheel<=0)this.fireEvent('wheeldown',event)}}});var JASlideshowThree=new Class({initialize:function(options){this.options=$extend({buttons:{},interval:5000,handle_event:'click',button_event:'click',box:{},size:240,mode:'horizontal',items:[],handles:[],onWalk:{},handlerBox:null,animation:'fade',animationRepeat:'true',autoPlay:false,languageDirection:null},options||{});this.items=this.options.items;if(this.options.languageDirection=='rtl'){this.modes={horizontal:['right','width'],vertical:['top','height']};}else{this.modes={horizontal:['left','width'],vertical:['top','height']};} this.box=$(this.options.box);this.buttons={previous:[],next:[],play:[],playback:[],stop:[]};this.allbuttons=[];if(this.options.buttons){for(var action in this.options.buttons){this.addActionButtons(action,$type(this.options.buttons[action])=='array'?this.options.buttons[action]:[this.options.buttons[action]]);}} this.handles=this.options.handles;if(this.handles){this.addHandleButtons(this.handles);} if(this.options.handlerBox!=null){this.options.handlerBox.addEvents({'wheelup':function(e){e=new Event(e).stop();this.previous(true);}.bind(this),'wheeldown':function(e){e=new Event(e).stop();this.next(true);}.bind(this)});} this.allbuttons.each(function(button){button.addEvent('mouseover',function(){this.addClass('hover');});button.addEvent('mouseout',function(){this.removeClass('hover');});});this.currentIndex=this.options.startItem||0;this.previousIndex=null;this.nextIndex=null;this._auto=null;this.initFx();if(this.options.autoPlay)this.play(this.options.interval,'next',true);this.walk(this.currentIndex);},previous:function(manual){this.lastIndex=this.currentIndex;this.currentIndex+=this.currentIndex>0?-1:this.items.length-1;this.walk(null,manual);},next:function(manual){this.lastIndex=this.currentIndex;this.currentIndex+=this.currentIndex0?-1:this.items.length-1);this.nextIndex=this.currentIndex+(this.currentIndex=this.options.showItem-1){this.options.startItem=currentIndex-this.options.showItem+2;if(this.options.startItem<0)this.options.startItem=0;if(this.options.startItem>this.els.length-this.options.showItem)this.options.startItem=this.els.length-this.options.showItem;} thumbsFx_mask.start((currentIndex-this.options.startItem)*this.options.itemHeight-2000);thumbsFx_thumbs.start(-this.options.startItem*this.options.itemHeight);thumbsFx_handles.start(-this.options.startItem*this.options.itemHeight);if($defined(hander)){thumbs_handles.getElements('span').removeClass('active');hander.addClass('active');navItems.removeClass('active');navItems[currentIndex].addClass('active');}} if(this.options.descMode.test(/load/)&&this.options.showDesc){this.hideDesc();}} this.maskDesc=this.el.getElement('.'+this.options.maskDesc);this.maskDesc.setStyles({'display':'block','position':'absolute','width':this.options.maskWidth,'height':this.options.maskHeigth});if(this.options.showDesc){if(this.options.animation.test(/move/)&&this.options.overlap){this.options.maskAlignment='left';this.options.maskerTransStyle='opacity';} this.maskDesc.setStyle(this.options.maskAlignment,this.options.rearWidth+this.options.mainSpace);this.maskDesc.setStyle('opacity',0);if(this.options.maskerTransStyle=='opacity'){this.descFx=new Fx.Style(this.maskDesc,'opacity',{duration:400,transition:this.options.maskerTrans});this.descs=this.el.getElements('.ja-slide-desc');this.showDesc=function(){this.descFx.stop();this.descFx.start(this.options.maskOpacity);};this.hideDesc=function(){this.descFx.stop();this.descFx.start(0.01);};}else{sizeOff=this.options.maskAlignment=='top'||this.options.maskAlignment=='bottom'?this.options.maskHeigth:this.options.maskWidth;this.maskDesc.setStyle('opacity',this.options.maskOpacity);this.maskDesc.setStyle(this.options.maskAlignment,-this.options.mainWidth);this.descFx=new Fx.Style(this.maskDesc,this.options.maskAlignment,{duration:400,transition:this.options.maskerTrans});this.descs=this.el.getElements('.ja-slide-desc');this.showDesc=function(){this.descFx.stop();this.descFx.start(0);};this.hideDesc=function(){this.descFx.stop();this.descFx.start(-sizeOff);};} this.swapDesc=function(currentIndex){if(this.maskDesc.currentIndex==currentIndex)return;if(this.maskDesc.desc){this.maskDesc.desc.remove();this.maskDesc.desc=null;if(!$defined(this.maskDesc.getElement('.inner .readon'))){this.maskDesc.setHTML('');}} if(this.descs[currentIndex]&&this.descs[currentIndex].innerHTML)this.maskDesc.desc=this.descs[currentIndex].inject(this.maskDesc);this.maskDesc.currentIndex=currentIndex;} if(this.options.descMode.test(/mouseover/)){var childs=this.el.getElements('.ja-slide-item');childs.each(function(itm,index){itm.addEvent('mouseover',this.showDesc.bind(this));itm.addEvent('mouseout',this.hideDesc.bind(this));}.bind(this)) this.maskDesc.addEvent('mouseover',this.showDesc.bind(this));this.maskDesc.addEvent('mouseout',this.hideDesc.bind(this));}else{this.maskDesc.setStyle('opacity',this.options.maskOpacity);}}else{this.maskDesc.setStyle('opacity',0);} this.fxOptions.onComplete=function(){if(this.options.showDesc){this.swapDesc(this.hs.currentIndex);if(this.options.descMode.test(/load/)){this.showDesc();}}}.bind(this);if(this.options.urls){this.maskDesc.addEvent('click',function(){var url=this.options.urls[this.hs.currentIndex];if(url){var target=this.options.targets[this.hs.currentIndex];switch(target){case"_blank":{window.open(url,"newWindow");break;} default:{window.location.href=url;break;}}}}.bind(this));} this.hs=new JASlideshowThree({box:this.el.getElement('.ja-slide-main'),languageDirection:this.options.languageDirection,items:this.els,handlerBox:thumbs_handles,handles:thumbs_handles?thumbs_handles.getChildren():[],fxOptions:this.fxOptions,interval:this.options.interval,onWalk:this.onWalk.bind(this),size:this.options.mainWidth+this.options.mainSpace,animation:this.options.animation,animationRepeat:this.options.animationRepeat,buttons:{previous:this.el.getElements('.ja-slide-prev'),play:this.el.getElements('.ja-slide-play'),stop:this.el.getElements('.ja-slide-stop'),playback:this.el.getElements('.ja-slide-playback'),next:this.el.getElements('.ja-slide-next')},startItem:this.options.startItem,offset:this.options.overlap?this.options.rearWidth-this.options.mainWidth:0,autoPlay:this.options.autoPlay});if(this.options.overlap){var childs=this.hs.box.getChildren();childs[0].clone().inject(this.hs.box);childs[this.hs.items.length-1].clone().injectTop(this.hs.box);this.hs.box.setStyle(this.hs.modes[this.hs.options.mode][1],(this.hs.options.size*(this.hs.items.length+2)+200)+'px');} this.el.setStyle('visibility','visible');},getFxObjectByMode:function(mode,start,end){switch(mode){case'sideright':return{'left':[start,-end]};break;case'sideleft':return{'left':[start,end]};break;case'sidetop':return{'top':[start,end]};break;case'sidedown':return{'top':[start,-end]};break;case'botleft':return{'top':start,'left':end};break;default:return{'height':[start,end]};break;}},controlMark:function(){}});