;jQuery.ui||(function($){var _remove=$.fn.remove,isFF2=$.browser.mozilla&&(parseFloat($.browser.version)<1.9);$.ui={version:"1.7.2",plugin:{add:function(module,option,set){var proto=$.ui[module].prototype;for(var i in set){proto.plugins[i]=proto.plugins[i]||[];proto.plugins[i].push([option,set[i]])}},call:function(instance,name,args){var set=instance.plugins[name];if(!set||!instance.element[0].parentNode){return}for(var i=0;i<set.length;i++){if(instance.options[set[i][0]]){set[i][1].apply(instance.element,args)}}}},contains:function(a,b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&16:a!==b&&a.contains(b)},hasScroll:function(el,a){if($(el).css('overflow')=='hidden'){return false}var scroll=(a&&a=='left')?'scrollLeft':'scrollTop',has=false;if(el[scroll]>0){return true}el[scroll]=1;has=(el[scroll]>0);el[scroll]=0;return has},isOverAxis:function(x,reference,size){return(x>reference)&&(x<(reference+size))},isOver:function(y,x,top,left,height,width){return $.ui.isOverAxis(y,top,height)&&$.ui.isOverAxis(x,left,width)},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38}};if(isFF2){var attr=$.attr,removeAttr=$.fn.removeAttr,ariaNS="http://www.w3.org/2005/07/aaa",ariaState=/^aria-/,ariaRole=/^wairole:/;$.attr=function(elem,name,value){var set=value!==undefined;return(name=='role'?(set?attr.call(this,elem,name,"wairole:"+value):(attr.apply(this,arguments)||"").replace(ariaRole,"")):(ariaState.test(name)?(set?elem.setAttributeNS(ariaNS,name.replace(ariaState,"aaa:"),value):attr.call(this,elem,name.replace(ariaState,"aaa:"))):attr.apply(this,arguments)))};$.fn.removeAttr=function(name){return(ariaState.test(name)?this.each(function(){this.removeAttributeNS(ariaNS,name.replace(ariaState,""))}):removeAttr.call(this,name))}}$.fn.extend({remove:function(){$("*",this).add(this).each(function(){$(this).triggerHandler("remove")});return _remove.apply(this,arguments)},enableSelection:function(){return this.attr('unselectable','off').css('MozUserSelect','').unbind('selectstart.ui')},disableSelection:function(){return this.attr('unselectable','on').css('MozUserSelect','none').bind('selectstart.ui',function(){return false})},scrollParent:function(){var scrollParent;if(($.browser.msie&&(/(static|relative)/).test(this.css('position')))||(/absolute/).test(this.css('position'))){scrollParent=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test($.curCSS(this,'position',1))&&(/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1))}).eq(0)}else{scrollParent=this.parents().filter(function(){return(/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1))}).eq(0)}return(/fixed/).test(this.css('position'))||!scrollParent.length?$(document):scrollParent}});$.extend($.expr[':'],{data:function(elem,i,match){return!!$.data(elem,match[3])},focusable:function(element){var nodeName=element.nodeName.toLowerCase(),tabIndex=$.attr(element,'tabindex');return(/input|select|textarea|button|object/.test(nodeName)?!element.disabled:'a'==nodeName||'area'==nodeName?element.href||!isNaN(tabIndex):!isNaN(tabIndex))&&!$(element)['area'==nodeName?'parents':'closest'](':hidden').length},tabbable:function(element){var tabIndex=$.attr(element,'tabindex');return(isNaN(tabIndex)||tabIndex>=0)&&$(element).is(':focusable')}});function getter(namespace,plugin,method,args){function getMethods(type){var methods=$[namespace][plugin][type]||[];return(typeof methods=='string'?methods.split(/,?\s+/):methods)}var methods=getMethods('getter');if(args.length==1&&typeof args[0]=='string'){methods=methods.concat(getMethods('getterSetter'))}return($.inArray(method,methods)!=-1)}$.widget=function(name,prototype){var namespace=name.split(".")[0];name=name.split(".")[1];$.fn[name]=function(options){var isMethodCall=(typeof options=='string'),args=Array.prototype.slice.call(arguments,1);if(isMethodCall&&options.substring(0,1)=='_'){return this}if(isMethodCall&&getter(namespace,name,options,args)){var instance=$.data(this[0],name);return(instance?instance[options].apply(instance,args):undefined)}return this.each(function(){var instance=$.data(this,name);(!instance&&!isMethodCall&&$.data(this,name,new $[namespace][name](this,options))._init());(instance&&isMethodCall&&$.isFunction(instance[options])&&instance[options].apply(instance,args))})};$[namespace]=$[namespace]||{};$[namespace][name]=function(element,options){var self=this;this.namespace=namespace;this.widgetName=name;this.widgetEventPrefix=$[namespace][name].eventPrefix||name;this.widgetBaseClass=namespace+'-'+name;this.options=$.extend({},$.widget.defaults,$[namespace][name].defaults,$.metadata&&$.metadata.get(element)[name],options);this.element=$(element).bind('setData.'+name,function(event,key,value){if(event.target==element){return self._setData(key,value)}}).bind('getData.'+name,function(event,key){if(event.target==element){return self._getData(key)}}).bind('remove',function(){return self.destroy()})};$[namespace][name].prototype=$.extend({},$.widget.prototype,prototype);$[namespace][name].getterSetter='option'};$.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+'-disabled'+' '+this.namespace+'-state-disabled').removeAttr('aria-disabled')},option:function(key,value){var options=key,self=this;if(typeof key=="string"){if(value===undefined){return this._getData(key)}options={};options[key]=value}$.each(options,function(key,value){self._setData(key,value)})},_getData:function(key){return this.options[key]},_setData:function(key,value){this.options[key]=value;if(key=='disabled'){this.element[value?'addClass':'removeClass'](this.widgetBaseClass+'-disabled'+' '+this.namespace+'-state-disabled').attr("aria-disabled",value)}},enable:function(){this._setData('disabled',false)},disable:function(){this._setData('disabled',true)},_trigger:function(type,event,data){var callback=this.options[type],eventName=(type==this.widgetEventPrefix?type:this.widgetEventPrefix+type);event=$.Event(event);event.type=eventName;if(event.originalEvent){for(var i=$.event.props.length,prop;i;){prop=$.event.props[--i];event[prop]=event.originalEvent[prop]}}this.element.trigger(event,data);return!($.isFunction(callback)&&callback.call(this.element[0],event,data)===false||event.isDefaultPrevented())}};$.widget.defaults={disabled:false};$.ui.mouse={_mouseInit:function(){var self=this;this.element.bind('mousedown.'+this.widgetName,function(event){return self._mouseDown(event)}).bind('click.'+this.widgetName,function(event){if(self._preventClickEvent){self._preventClickEvent=false;event.stopImmediatePropagation();return false}});if($.browser.msie){this._mouseUnselectable=this.element.attr('unselectable');this.element.attr('unselectable','on')}this.started=false},_mouseDestroy:function(){this.element.unbind('.'+this.widgetName);($.browser.msie&&this.element.attr('unselectable',this._mouseUnselectable))},_mouseDown:function(event){event.originalEvent=event.originalEvent||{};if(event.originalEvent.mouseHandled){return}(this._mouseStarted&&this._mouseUp(event));this._mouseDownEvent=event;var self=this,btnIsLeft=(event.which==1),elIsCancel=(typeof this.options.cancel=="string"?$(event.target).parents().add(event.target).filter(this.options.cancel).length:false);if(!btnIsLeft||elIsCancel||!this._mouseCapture(event)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){self.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(event)&&this._mouseDelayMet(event)){this._mouseStarted=(this._mouseStart(event)!==false);if(!this._mouseStarted){event.preventDefault();return true}}this._mouseMoveDelegate=function(event){return self._mouseMove(event)};this._mouseUpDelegate=function(event){return self._mouseUp(event)};$(document).bind('mousemove.'+this.widgetName,this._mouseMoveDelegate).bind('mouseup.'+this.widgetName,this._mouseUpDelegate);($.browser.safari||event.preventDefault());event.originalEvent.mouseHandled=true;return true},_mouseMove:function(event){if($.browser.msie&&!event.button){return this._mouseUp(event)}if(this._mouseStarted){this._mouseDrag(event);return event.preventDefault()}if(this._mouseDistanceMet(event)&&this._mouseDelayMet(event)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,event)!==false);(this._mouseStarted?this._mouseDrag(event):this._mouseUp(event))}return!this._mouseStarted},_mouseUp:function(event){$(document).unbind('mousemove.'+this.widgetName,this._mouseMoveDelegate).unbind('mouseup.'+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=(event.target==this._mouseDownEvent.target);this._mouseStop(event)}return false},_mouseDistanceMet:function(event){return(Math.max(Math.abs(this._mouseDownEvent.pageX-event.pageX),Math.abs(this._mouseDownEvent.pageY-event.pageY))>=this.options.distance)},_mouseDelayMet:function(event){return this.mouseDelayMet},_mouseStart:function(event){},_mouseDrag:function(event){},_mouseStop:function(event){},_mouseCapture:function(event){return true}};$.ui.mouse.defaults={cancel:null,distance:1,delay:0}})(jQuery);

(function($){$.widget("ui.progressbar",{_init:function(){this.element.addClass("ui-progressbar"+" ui-widget"+" ui-widget-content"+" ui-corner-all").attr({role:"progressbar","aria-valuemin":this._valueMin(),"aria-valuemax":this._valueMax(),"aria-valuenow":this._value()});this.valueDiv=$('<div class="ui-progressbar-value ui-widget-header ui-corner-left"></div>').appendTo(this.element);this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar"+" ui-widget"+" ui-widget-content"+" ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow").removeData("progressbar").unbind(".progressbar");this.valueDiv.remove();$.widget.prototype.destroy.apply(this,arguments)},value:function(newValue){if(newValue===undefined){return this._value()}this._setData('value',newValue);return this},_setData:function(key,value){switch(key){case'value':this.options.value=value;this._refreshValue();this._trigger('change',null,{});break}$.widget.prototype._setData.apply(this,arguments)},_value:function(){var val=this.options.value;if(val<this._valueMin())val=this._valueMin();if(val>this._valueMax())val=this._valueMax();return val},_valueMin:function(){var valueMin=0;return valueMin},_valueMax:function(){var valueMax=100;return valueMax},_refreshValue:function(){var value=this.value();this.valueDiv[value==this._valueMax()?'addClass':'removeClass']("ui-corner-right");this.valueDiv.width(value+'%');this.element.attr("aria-valuenow",value)}});$.extend($.ui.progressbar,{version:"1.7.2",defaults:{value:0}})})(jQuery);

(function($){$.widget("ui.slider",$.extend({},$.ui.mouse,{_init:function(){var self=this,o=this.options;this._keySliding=false;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui2-slider"+" ui2-slider-"+this.orientation+" ui2-widget"+" ui2-widget-content"+" ui2-corner-all");this.range=$([]);if(o.range){if(o.range===true){this.range=$('<div></div>');if(!o.values)o.values=[this._valueMin(),this._valueMin()];if(o.values.length&&o.values.length!=2){o.values=[o.values[0],o.values[0]]}}else{this.range=$('<div></div>')}$("#def-range").remove();this.range.appendTo(this.element).addClass("ui2-slider-range");if(o.range=="min"||o.range=="max"){this.range.addClass("ui2-slider-range-"+o.range)}this.range.addClass("ui2-widget-header")}if($(".ui2-slider-handle",this.element).length==0)$('<a style="display: none;"></a>').appendTo(this.element).addClass("ui2-slider-handle");if(o.values&&o.values.length){while($(".ui2-slider-handle",this.element).length<o.values.length)$('<a style="display: none;"></a>').appendTo(this.element).addClass("ui2-slider-handle")}this.handles=$(".ui2-slider-handle",this.element).addClass("ui2-state-default");this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(event){event.preventDefault()}).hover(function(){if(!o.disabled){$(this).addClass('ui2-state-hover')}},function(){$(this).removeClass('ui2-state-hover')}).focus(function(){if(!o.disabled){$(".ui2-slider .ui2-state-focus").removeClass('ui2-state-focus');$(this).addClass('ui2-state-focus')}else{$(this).blur()}}).blur(function(){$(this).removeClass('ui2-state-focus')});this.handles.each(function(i){$(this).data("index.ui2-slider-handle",i)});this.handles.keydown(function(event){var ret=true;var index=$(this).data("index.ui2-slider-handle");if(self.options.disabled)return;switch(event.keyCode){case $.ui.keyCode.HOME:case $.ui.keyCode.END:case $.ui.keyCode.UP:case $.ui.keyCode.RIGHT:case $.ui.keyCode.DOWN:case $.ui.keyCode.LEFT:ret=false;if(!self._keySliding){self._keySliding=true;$(this).addClass("ui2-state-active");self._start(event,index)}break}var curVal,newVal,step=self._step();if(self.options.values&&self.options.values.length){curVal=newVal=self.values(index)}else{curVal=newVal=self.value()}switch(event.keyCode){case $.ui.keyCode.HOME:newVal=self._valueMin();break;case $.ui.keyCode.END:newVal=self._valueMax();break;case $.ui.keyCode.UP:case $.ui.keyCode.RIGHT:if(curVal==self._valueMax())return;newVal=curVal+step;break;case $.ui.keyCode.DOWN:case $.ui.keyCode.LEFT:if(curVal==self._valueMin())return;newVal=curVal-step;break}self._slide(event,index,newVal);seekToStartPoint();return ret}).keyup(function(event){var index=$(this).data("index.ui2-slider-handle");if(self._keySliding){self._stop(event,index);self._change(event,index);self._keySliding=false;$(this).removeClass("ui2-state-active")}});this._refreshValue()},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui2-slider"+" ui2-slider-horizontal"+" ui2-slider-vertical"+" ui2-slider-disabled"+" ui2-widget"+" ui2-widget-content"+" ui2-corner-all").removeData("slider").unbind(".slider");this._mouseDestroy()},_mouseCapture:function(event){var o=this.options;if(o.disabled)return false;this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();var position={x:event.pageX,y:event.pageY};var normValue=this._normValueFromMouse(position);var distance=this._valueMax()-this._valueMin()+1,closestHandle;var self=this,index;this.handles.each(function(i){var thisDistance=Math.abs(normValue-self.values(i));if(distance>thisDistance){distance=thisDistance;closestHandle=$(this);index=i}});if(o.range==true&&this.values(1)==o.min){closestHandle=$(this.handles[++index])}this._start(event,index);self._handleIndex=index;closestHandle.addClass("ui2-state-active").focus();var offset=closestHandle.offset();var mouseOverHandle=!$(event.target).parents().andSelf().is('.ui2-slider-handle');this._clickOffset=mouseOverHandle?{left:0,top:0}:{left:event.pageX-offset.left-(closestHandle.width()/2),top:event.pageY-offset.top-(closestHandle.height()/2)-(parseInt(closestHandle.css('borderTopWidth'),10)||0)-(parseInt(closestHandle.css('borderBottomWidth'),10)||0)+(parseInt(closestHandle.css('marginTop'),10)||0)};normValue=this._normValueFromMouse(position);this._slide(event,index,normValue);return true},_mouseStart:function(event){return true},_mouseDrag:function(event){var position={x:event.pageX,y:event.pageY};var normValue=this._normValueFromMouse(position);this._slide(event,this._handleIndex,normValue);return false},_mouseStop:function(event){this.handles.removeClass("ui2-state-active");this._stop(event,this._handleIndex);this._change(event,this._handleIndex);this._handleIndex=null;this._clickOffset=null;return false},_detectOrientation:function(){this.orientation=this.options.orientation=='vertical'?'vertical':'horizontal'},_normValueFromMouse:function(position){var pixelTotal,pixelMouse;if('horizontal'==this.orientation){pixelTotal=this.elementSize.width;pixelMouse=position.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{pixelTotal=this.elementSize.height;pixelMouse=position.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}var percentMouse=(pixelMouse/pixelTotal);if(percentMouse>1)percentMouse=1;if(percentMouse<0)percentMouse=0;if('vertical'==this.orientation)percentMouse=1-percentMouse;var valueTotal=this._valueMax()-this._valueMin(),valueMouse=percentMouse*valueTotal,valueMouseModStep=valueMouse%this.options.step,normValue=this._valueMin()+valueMouse-valueMouseModStep;if(valueMouseModStep>(this.options.step/2))normValue+=this.options.step;return parseFloat(normValue.toFixed(5))},_start:function(event,index){var uiHash={handle:this.handles[index],value:this.value()};if(this.options.values&&this.options.values.length){uiHash.value=this.values(index);uiHash.values=this.values()}this._trigger("start",event,uiHash)},_slide:function(event,index,newVal){var handle=this.handles[index];if(this.options.values&&this.options.values.length){var otherVal=this.values(index?0:1);if((this.options.values.length==2&&this.options.range===true)&&((index==0&&newVal>otherVal)||(index==1&&newVal<otherVal))){newVal=otherVal}if(newVal!=this.values(index)){var newValues=this.values();newValues[index]=newVal;var allowed=this._trigger("slide",event,{handle:this.handles[index],value:newVal,values:newValues});var otherVal=this.values(index?0:1);if(allowed!==false){this.values(index,newVal,(event.type=='mousedown'&&this.options.animate),true)}}}else{if(newVal!=this.value()){var allowed=this._trigger("slide",event,{handle:this.handles[index],value:newVal});if(allowed!==false){this._setData('value',newVal,(event.type=='mousedown'&&this.options.animate))}}}},_stop:function(event,index){var uiHash={handle:this.handles[index],value:this.value()};if(this.options.values&&this.options.values.length){uiHash.value=this.values(index);uiHash.values=this.values()}this._trigger("stop",event,uiHash)},_change:function(event,index){var uiHash={handle:this.handles[index],value:this.value()};if(this.options.values&&this.options.values.length){uiHash.value=this.values(index);uiHash.values=this.values()}this._trigger("change",event,uiHash)},value:function(newValue){if(arguments.length){this._setData("value",newValue);this._change(null,0)}return this._value()},values:function(index,newValue,animated,noPropagation){if(arguments.length>1){this.options.values[index]=newValue;this._refreshValue(animated);if(!noPropagation)this._change(null,index)}if(arguments.length){if(this.options.values&&this.options.values.length){return this._values(index)}else{return this.value()}}else{return this._values()}},_setData:function(key,value,animated){$.widget.prototype._setData.apply(this,arguments);switch(key){case'disabled':if(value){this.handles.filter(".ui2-state-focus").blur();this.handles.removeClass("ui2-state-hover");this.handles.attr("disabled","disabled")}else{this.handles.removeAttr("disabled")}case'orientation':this._detectOrientation();this.element.removeClass("ui2-slider-horizontal ui2-slider-vertical").addClass("ui2-slider-"+this.orientation);this._refreshValue(animated);break;case'value':this._refreshValue(animated);break}},_step:function(){var step=this.options.step;return step},_value:function(){var val=this.options.value;if(val<this._valueMin())val=this._valueMin();if(val>this._valueMax())val=this._valueMax();return val},_values:function(index){if(arguments.length){var val=this.options.values[index];if(val<this._valueMin())val=this._valueMin();if(val>this._valueMax())val=this._valueMax();return val}else{return this.options.values}},_valueMin:function(){var valueMin=this.options.min;return valueMin},_valueMax:function(){var valueMax=this.options.max;return valueMax},_refreshValue:function(animate){var oRange=this.options.range,o=this.options,self=this;if(this.options.values&&this.options.values.length){var vp0,vp1;this.handles.each(function(i,j){var valPercent=(self.values(i)-self._valueMin())/(self._valueMax()-self._valueMin())*100;var _set={};_set[self.orientation=='horizontal'?'left':'bottom']=valPercent+'%';var operaFix;$(this).stop(1,1)[animate?'animate':'css'](_set,o.animate);if(self.options.range===true){operaFix=0;if($.browser.opera)operaFix=0.5;if(self.orientation=='horizontal'){(i==0)&&self.range.stop(1,1)[animate?'animate':'css']({left:valPercent+'%'},o.animate);(i==1)&&self.range[animate?'animate':'css']({width:(valPercent-lastValPercent+operaFix)+'%'},{queue:false,duration:o.animate})}else{(i==0)&&self.range.stop(1,1)[animate?'animate':'css']({bottom:(valPercent)+'%'},o.animate);(i==1)&&self.range[animate?'animate':'css']({height:(valPercent-lastValPercent+operaFix)+'%'},{queue:false,duration:o.animate})}}lastValPercent=valPercent})}else{var value=this.value(),valueMin=this._valueMin(),valueMax=this._valueMax(),valPercent=valueMax!=valueMin?(value-valueMin)/(valueMax-valueMin)*100:0;var _set={};_set[self.orientation=='horizontal'?'left':'bottom']=valPercent+'%';this.handle.stop(1,1)[animate?'animate':'css'](_set,o.animate);(oRange=="min")&&(this.orientation=="horizontal")&&this.range.stop(1,1)[animate?'animate':'css']({width:valPercent+'%'},o.animate);(oRange=="max")&&(this.orientation=="horizontal")&&this.range[animate?'animate':'css']({width:(100-valPercent)+'%'},{queue:false,duration:o.animate});(oRange=="min")&&(this.orientation=="vertical")&&this.range.stop(1,1)[animate?'animate':'css']({height:valPercent+'%'},o.animate);(oRange=="max")&&(this.orientation=="vertical")&&this.range[animate?'animate':'css']({height:(100-valPercent)+'%'},{queue:false,duration:o.animate})}}}));$.extend($.ui.slider,{getter:"value values",version:"1.7.2",eventPrefix:"slide",defaults:{animate:false,delay:0,distance:0,max:100,min:0,orientation:'horizontal',range:false,step:1,value:0,values:null}})})(jQuery);

;(function($){var ua=navigator.userAgent;var moz=$.browser.mozilla&&/gecko/i.test(ua);var webkit=$.browser.safari&&/Safari\/[5-9]/.test(ua);var expr=$.browser.msie&&(function(){var div=document.createElement('div');try{div.style.setExpression('width','0+0');div.style.removeExpression('width')}catch(e){return false}return true})();function sz(el,p){return parseInt($.css(el,p))||0};function hex2(s){var s=parseInt(s).toString(16);return(s.length<2)?'0'+s:s};function gpc(node){for(;node&&node.nodeName.toLowerCase()!='html';node=node.parentNode){var v=$.css(node,'backgroundColor');if(v=='rgba(0, 0, 0, 0)')continue;if(v.indexOf('rgb')>=0){var rgb=v.match(/\d+/g);return'#'+hex2(rgb[0])+hex2(rgb[1])+hex2(rgb[2])}if(v&&v!='transparent')return v}return'#ffffff'};function getWidth(fx,i,width){switch(fx){case'round':return Math.round(width*(1-Math.cos(Math.asin(i/width))));case'cool':return Math.round(width*(1+Math.cos(Math.asin(i/width))));case'sharp':return Math.round(width*(1-Math.cos(Math.acos(i/width))));case'bite':return Math.round(width*(Math.cos(Math.asin((width-i-1)/width))));case'slide':return Math.round(width*(Math.atan2(i,width/i)));case'jut':return Math.round(width*(Math.atan2(width,(width-i-1))));case'curl':return Math.round(width*(Math.atan(i)));case'tear':return Math.round(width*(Math.cos(i)));case'wicked':return Math.round(width*(Math.tan(i)));case'long':return Math.round(width*(Math.sqrt(i)));case'sculpt':return Math.round(width*(Math.log((width-i-1),width)));case'dog':return(i&1)?(i+1):width;case'dog2':return(i&2)?(i+1):width;case'dog3':return(i&3)?(i+1):width;case'fray':return(i%2)*width;case'notch':return width;case'bevel':return i+1}};$.fn.corner=function(options){if(this.length==0){if(!$.isReady&&this.selector){var s=this.selector,c=this.context;$(function(){$(s,c).corner(options)})}return this}return this.each(function(index){var $this=$(this);var o=[options||'',$this.attr($.fn.corner.defaults.metaAttr)||''].join(' ').toLowerCase();var keep=/keep/.test(o);var cc=((o.match(/cc:(#[0-9a-f]+)/)||[])[1]);var sc=((o.match(/sc:(#[0-9a-f]+)/)||[])[1]);var width=parseInt((o.match(/(\d+)px/)||[])[1])||10;var re=/round|bevel|notch|bite|cool|sharp|slide|jut|curl|tear|fray|wicked|sculpt|long|dog3|dog2|dog/;var fx=((o.match(re)||['round'])[0]);var edges={T:0,B:1};var opts={TL:/top|tl|left/.test(o),TR:/top|tr|right/.test(o),BL:/bottom|bl|left/.test(o),BR:/bottom|br|right/.test(o)};if(!opts.TL&&!opts.TR&&!opts.BL&&!opts.BR)opts={TL:1,TR:1,BL:1,BR:1};if($.fn.corner.defaults.useNative&&fx=='round'&&(moz||webkit)&&!cc&&!sc){if(opts.TL)$this.css(moz?'-moz-border-radius-topleft':'-webkit-border-top-left-radius',width+'px');if(opts.TR)$this.css(moz?'-moz-border-radius-topright':'-webkit-border-top-right-radius',width+'px');if(opts.BL)$this.css(moz?'-moz-border-radius-bottomleft':'-webkit-border-bottom-left-radius',width+'px');if(opts.BR)$this.css(moz?'-moz-border-radius-bottomright':'-webkit-border-bottom-right-radius',width+'px');return}var strip=document.createElement('div');strip.style.overflow='hidden';strip.style.height='1px';strip.style.backgroundColor=sc||'transparent';strip.style.borderStyle='solid';var pad={T:parseInt($.css(this,'paddingTop'))||0,R:parseInt($.css(this,'paddingRight'))||0,B:parseInt($.css(this,'paddingBottom'))||0,L:parseInt($.css(this,'paddingLeft'))||0};if(typeof this.style.zoom!=undefined)this.style.zoom=1;if(!keep)this.style.border='none';strip.style.borderColor=cc||gpc(this.parentNode);var cssHeight=$.curCSS(this,'height');for(var j in edges){var bot=edges[j];if((bot&&(opts.BL||opts.BR))||(!bot&&(opts.TL||opts.TR))){strip.style.borderStyle='none '+(opts[j+'R']?'solid':'none')+' none '+(opts[j+'L']?'solid':'none');var d=document.createElement('div');$(d).addClass('jquery-corner');var ds=d.style;bot?this.appendChild(d):this.insertBefore(d,this.firstChild);if(bot&&cssHeight!='auto'){if($.css(this,'position')=='static')this.style.position='relative';ds.position='absolute';ds.bottom=ds.left=ds.padding=ds.margin='0';if(expr)ds.setExpression('width','this.parentNode.offsetWidth');else ds.width='100%'}else if(!bot&&$.browser.msie){if($.css(this,'position')=='static')this.style.position='relative';ds.position='absolute';ds.top=ds.left=ds.right=ds.padding=ds.margin='0';if(expr){var bw=sz(this,'borderLeftWidth')+sz(this,'borderRightWidth');ds.setExpression('width','this.parentNode.offsetWidth - '+bw+'+ "px"')}else ds.width='100%'}else{ds.position='relative';ds.margin=!bot?'-'+pad.T+'px -'+pad.R+'px '+(pad.T-width)+'px -'+pad.L+'px':(pad.B-width)+'px -'+pad.R+'px -'+pad.B+'px -'+pad.L+'px'}for(var i=0;i<width;i++){var w=Math.max(0,getWidth(fx,i,width));var e=strip.cloneNode(false);e.style.borderWidth='0 '+(opts[j+'R']?w:0)+'px 0 '+(opts[j+'L']?w:0)+'px';bot?d.appendChild(e):d.insertBefore(e,d.firstChild)}}}})};$.fn.uncorner=function(){if(moz||webkit)this.css(moz?'-moz-border-radius':'-webkit-border-radius',0);$('div.jquery-corner',this).remove();return this};$.fn.corner.defaults={useNative:true,metaAttr:'data-corner'}})(jQuery);

(function(A){A.fn.example=function(E,C){var D=A.isFunction(E);var B=A.extend({},C,{example:E});return this.each(function(){var F=A(this);if(A.metadata){var G=A.extend({},A.fn.example.defaults,F.metadata(),B)}else{var G=A.extend({},A.fn.example.defaults,B)}if(!A.fn.example.boundClassNames[G.className]){A(window).unload(function(){A("."+G.className).val("")});A("form").submit(function(){A(this).find("."+G.className).val("")});A.fn.example.boundClassNames[G.className]=true}if(A.browser.msie&&!F.attr("defaultValue")&&(D||F.val()==G.example)){F.val("")}if(F.val()==""&&this!=document.activeElement){F.addClass(G.className);F.val(D?G.example.call(this):G.example)}F.focus(function(){if(A(this).is("."+G.className)){A(this).val("");A(this).removeClass(G.className)}});F.blur(function(){if(A(this).val()==""){A(this).addClass(G.className);A(this).val(D?G.example.call(this):G.example)}})})};A.fn.example.defaults={className:"example"};A.fn.example.boundClassNames=[]})(jQuery);

(function($){$.fn.ajaxSubmit=function(options){if(!this.length){log('ajaxSubmit: skipping submit process - no element selected');return this}if(typeof options=='function')options={success:options};var url=$.trim(this.attr('action'));if(url){url=(url.match(/^([^#]+)/)||[])[1]}url=url||window.location.href||'';options=$.extend({url:url,type:this.attr('method')||'GET',iframeSrc:/^https/i.test(window.location.href||'')?'javascript:false':'about:blank'},options||{});var veto={};this.trigger('form-pre-serialize',[this,options,veto]);if(veto.veto){log('ajaxSubmit: submit vetoed via form-pre-serialize trigger');return this}if(options.beforeSerialize&&options.beforeSerialize(this,options)===false){log('ajaxSubmit: submit aborted via beforeSerialize callback');return this}var a=this.formToArray(options.semantic);if(options.data){options.extraData=options.data;for(var n in options.data){if(options.data[n]instanceof Array){for(var k in options.data[n])a.push({name:n,value:options.data[n][k]})}else a.push({name:n,value:options.data[n]})}}if(options.beforeSubmit&&options.beforeSubmit(a,this,options)===false){log('ajaxSubmit: submit aborted via beforeSubmit callback');return this}this.trigger('form-submit-validate',[a,this,options,veto]);if(veto.veto){log('ajaxSubmit: submit vetoed via form-submit-validate trigger');return this}var q=$.param(a);if(options.type.toUpperCase()=='GET'){options.url+=(options.url.indexOf('?')>=0?'&':'?')+q;options.data=null}else options.data=q;var $form=this,callbacks=[];if(options.resetForm)callbacks.push(function(){$form.resetForm()});if(options.clearForm)callbacks.push(function(){$form.clearForm()});if(!options.dataType&&options.target){var oldSuccess=options.success||function(){};callbacks.push(function(data){$(options.target).html(data).each(oldSuccess,arguments)})}else if(options.success)callbacks.push(options.success);options.success=function(data,status){for(var i=0,max=callbacks.length;i<max;i++)callbacks[i].apply(options,[data,status,$form])};var files=$('input:file',this).fieldValue();var found=false;for(var j=0;j<files.length;j++)if(files[j])found=true;var multipart=false;if((files.length&&options.iframe!==false)||options.iframe||found||multipart){if(options.closeKeepAlive)$.get(options.closeKeepAlive,fileUpload);else fileUpload()}else $.ajax(options);this.trigger('form-submit-notify',[this,options]);return this;function fileUpload(){var form=$form[0];if($(':input[name=submit]',form).length){alert('Error: Form elements must not be named "submit".');return}var opts=$.extend({},$.ajaxSettings,options);var s=$.extend(true,{},$.extend(true,{},$.ajaxSettings),opts);var id='jqFormIO'+(new Date().getTime());var $io=$('<iframe id="'+id+'" name="'+id+'" src="'+opts.iframeSrc+'" />');var io=$io[0];$io.css({position:'absolute',top:'-1000px',left:'-1000px'});var xhr={aborted:0,responseText:null,responseXML:null,status:0,statusText:'n/a',getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(){this.aborted=1;$io.attr('src',opts.iframeSrc)}};var g=opts.global;if(g&&!$.active++)$.event.trigger("ajaxStart");if(g)$.event.trigger("ajaxSend",[xhr,opts]);if(s.beforeSend&&s.beforeSend(xhr,s)===false){s.global&&$.active--;return}if(xhr.aborted)return;var cbInvoked=0;var timedOut=0;var sub=form.clk;if(sub){var n=sub.name;if(n&&!sub.disabled){options.extraData=options.extraData||{};options.extraData[n]=sub.value;if(sub.type=="image"){options.extraData[name+'.x']=form.clk_x;options.extraData[name+'.y']=form.clk_y}}}setTimeout(function(){var t=$form.attr('target'),a=$form.attr('action');form.setAttribute('target',id);if(form.getAttribute('method')!='POST')form.setAttribute('method','POST');if(form.getAttribute('action')!=opts.url)form.setAttribute('action',opts.url);if(!options.skipEncodingOverride){$form.attr({encoding:'multipart/form-data',enctype:'multipart/form-data'})}if(opts.timeout)setTimeout(function(){timedOut=true;cb()},opts.timeout);var extraInputs=[];try{if(options.extraData)for(var n in options.extraData)extraInputs.push($('<input type="hidden" name="'+n+'" value="'+options.extraData[n]+'" />').appendTo(form)[0]);$io.appendTo('body');io.attachEvent?io.attachEvent('onload',cb):io.addEventListener('load',cb,false);form.submit()}finally{form.setAttribute('action',a);t?form.setAttribute('target',t):$form.removeAttr('target');$(extraInputs).remove()}},10);var domCheckCount=50;function cb(){if(cbInvoked++)return;io.detachEvent?io.detachEvent('onload',cb):io.removeEventListener('load',cb,false);var ok=true;try{if(timedOut)throw'timeout';var data,doc;doc=io.contentWindow?io.contentWindow.document:io.contentDocument?io.contentDocument:io.document;var isXml=opts.dataType=='xml'||doc.XMLDocument||$.isXMLDoc(doc);log('isXml='+isXml);if(!isXml&&(doc.body==null||doc.body.innerHTML=='')){if(--domCheckCount){cbInvoked=0;setTimeout(cb,100);return}log('Could not access iframe DOM after 50 tries.');return}xhr.responseText=doc.body?doc.body.innerHTML:null;xhr.responseXML=doc.XMLDocument?doc.XMLDocument:doc;xhr.getResponseHeader=function(header){var headers={'content-type':opts.dataType};return headers[header]};if(opts.dataType=='json'||opts.dataType=='script'){var ta=doc.getElementsByTagName('textarea')[0];if(ta)xhr.responseText=ta.value;else{var pre=doc.getElementsByTagName('pre')[0];if(pre)xhr.responseText=pre.innerHTML}}else if(opts.dataType=='xml'&&!xhr.responseXML&&xhr.responseText!=null){xhr.responseXML=toXml(xhr.responseText)}data=$.httpData(xhr,opts.dataType)}catch(e){ok=false;$.handleError(opts,xhr,'error',e)}if(ok){opts.success(data,'success');if(g)$.event.trigger("ajaxSuccess",[xhr,opts])}if(g)$.event.trigger("ajaxComplete",[xhr,opts]);if(g&&!--$.active)$.event.trigger("ajaxStop");if(opts.complete)opts.complete(xhr,ok?'success':'error');setTimeout(function(){$io.remove();xhr.responseXML=null},100)};function toXml(s,doc){if(window.ActiveXObject){doc=new ActiveXObject('Microsoft.XMLDOM');doc.async='false';doc.loadXML(s)}else doc=(new DOMParser()).parseFromString(s,'text/xml');return(doc&&doc.documentElement&&doc.documentElement.tagName!='parsererror')?doc:null}}};$.fn.ajaxForm=function(options){return this.ajaxFormUnbind().bind('submit.form-plugin',function(){$(this).ajaxSubmit(options);return false}).bind('click.form-plugin',function(e){var target=e.target;var $el=$(target);if(!($el.is(":submit,input:image"))){var t=$el.closest(':submit');if(t.length==0)return;target=t[0]}var form=this;form.clk=target;if(target.type=='image'){if(e.offsetX!=undefined){form.clk_x=e.offsetX;form.clk_y=e.offsetY}else if(typeof $.fn.offset=='function'){var offset=$el.offset();form.clk_x=e.pageX-offset.left;form.clk_y=e.pageY-offset.top}else{form.clk_x=e.pageX-target.offsetLeft;form.clk_y=e.pageY-target.offsetTop}}setTimeout(function(){form.clk=form.clk_x=form.clk_y=null},100)})};$.fn.ajaxFormUnbind=function(){return this.unbind('submit.form-plugin click.form-plugin')};$.fn.formToArray=function(semantic){var a=[];if(this.length==0)return a;var form=this[0];var els=semantic?form.getElementsByTagName('*'):form.elements;if(!els)return a;for(var i=0,max=els.length;i<max;i++){var el=els[i];var n=el.name;if(!n)continue;if(semantic&&form.clk&&el.type=="image"){if(!el.disabled&&form.clk==el){a.push({name:n,value:$(el).val()});a.push({name:n+'.x',value:form.clk_x},{name:n+'.y',value:form.clk_y})}continue}var v=$.fieldValue(el,true);if(v&&v.constructor==Array){for(var j=0,jmax=v.length;j<jmax;j++)a.push({name:n,value:v[j]})}else if(v!==null&&typeof v!='undefined')a.push({name:n,value:v})}if(!semantic&&form.clk){var $input=$(form.clk),input=$input[0],n=input.name;if(n&&!input.disabled&&input.type=='image'){a.push({name:n,value:$input.val()});a.push({name:n+'.x',value:form.clk_x},{name:n+'.y',value:form.clk_y})}}return a};$.fn.formSerialize=function(semantic){return $.param(this.formToArray(semantic))};$.fn.fieldSerialize=function(successful){var a=[];this.each(function(){var n=this.name;if(!n)return;var v=$.fieldValue(this,successful);if(v&&v.constructor==Array){for(var i=0,max=v.length;i<max;i++)a.push({name:n,value:v[i]})}else if(v!==null&&typeof v!='undefined')a.push({name:this.name,value:v})});return $.param(a)};$.fn.fieldValue=function(successful){for(var val=[],i=0,max=this.length;i<max;i++){var el=this[i];var v=$.fieldValue(el,successful);if(v===null||typeof v=='undefined'||(v.constructor==Array&&!v.length))continue;v.constructor==Array?$.merge(val,v):val.push(v)}return val};$.fieldValue=function(el,successful){var n=el.name,t=el.type,tag=el.tagName.toLowerCase();if(typeof successful=='undefined')successful=true;if(successful&&(!n||el.disabled||t=='reset'||t=='button'||(t=='checkbox'||t=='radio')&&!el.checked||(t=='submit'||t=='image')&&el.form&&el.form.clk!=el||tag=='select'&&el.selectedIndex==-1))return null;if(tag=='select'){var index=el.selectedIndex;if(index<0)return null;var a=[],ops=el.options;var one=(t=='select-one');var max=(one?index+1:ops.length);for(var i=(one?index:0);i<max;i++){var op=ops[i];if(op.selected){var v=op.value;if(!v)v=(op.attributes&&op.attributes['value']&&!(op.attributes['value'].specified))?op.text:op.value;if(one)return v;a.push(v)}}return a}return el.value};$.fn.clearForm=function(){return this.each(function(){$('input,select,textarea',this).clearFields()})};$.fn.clearFields=$.fn.clearInputs=function(){return this.each(function(){var t=this.type,tag=this.tagName.toLowerCase();if(t=='text'||t=='password'||tag=='textarea')this.value='';else if(t=='checkbox'||t=='radio')this.checked=false;else if(tag=='select')this.selectedIndex=-1})};$.fn.resetForm=function(){return this.each(function(){if(typeof this.reset=='function'||(typeof this.reset=='object'&&!this.reset.nodeType))this.reset()})};$.fn.enable=function(b){if(b==undefined)b=true;return this.each(function(){this.disabled=!b})};$.fn.selected=function(select){if(select==undefined)select=true;return this.each(function(){var t=this.type;if(t=='checkbox'||t=='radio')this.checked=select;else if(this.tagName.toLowerCase()=='option'){var $sel=$(this).parent('select');if(select&&$sel[0]&&$sel[0].type=='select-one'){$sel.find('option').selected(false)}this.selected=select}})};function log(){if($.fn.ajaxSubmit.debug&&window.console&&window.console.log)window.console.log('[jquery.form] '+Array.prototype.join.call(arguments,''))}})(jQuery);

(function(){function log(args){console.log("$f.fireEvent",[].slice.call(args))}function clone(obj){if(!obj||typeof obj!='object'){return obj}var temp=new obj.constructor();for(var key in obj){if(obj.hasOwnProperty(key)){temp[key]=clone(obj[key])}}return temp}function each(obj,fn){if(!obj){return}var name,i=0,length=obj.length;if(length===undefined){for(name in obj){if(fn.call(obj[name],name,obj[name])===false){break}}}else{for(var value=obj[0];i<length&&fn.call(value,i,value)!==false;value=obj[++i]){}}return obj}function el(id){return document.getElementById(id)}function extend(to,from,skipFuncs){if(typeof from!='object'){return to}if(to&&from){each(from,function(name,value){if(!skipFuncs||typeof value!='function'){to[name]=value}})}return to}function select(query){var index=query.indexOf(".");if(index!=-1){var tag=query.substring(0,index)||"*";var klass=query.substring(index+1,query.length);var els=[];each(document.getElementsByTagName(tag),function(){if(this.className&&this.className.indexOf(klass)!=-1){els.push(this)}});return els}}function stopEvent(e){e=e||window.event;if(e.preventDefault){e.stopPropagation();e.preventDefault()}else{e.returnValue=false;e.cancelBubble=true}return false}function bind(to,evt,fn){to[evt]=to[evt]||[];to[evt].push(fn)}function makeId(){return"_"+(""+Math.random()).substring(2,10)}var Clip=function(json,index,player){var self=this;var cuepoints={};var listeners={};self.index=index;if(typeof json=='string'){json={url:json}}extend(this,json,true);each(("Begin*,Start,Pause*,Resume*,Seek*,Stop*,Finish*,LastSecond,Update,BufferFull,BufferEmpty,BufferStop").split(","),function(){var evt="on"+this;if(evt.indexOf("*")!=-1){evt=evt.substring(0,evt.length-1);var before="onBefore"+evt.substring(2);self[before]=function(fn){bind(listeners,before,fn);return self}}self[evt]=function(fn){bind(listeners,evt,fn);return self};if(index==-1){if(self[before]){player[before]=self[before]}if(self[evt]){player[evt]=self[evt]}}});extend(this,{onCuepoint:function(points,fn){if(arguments.length==1){cuepoints.embedded=[null,points];return self}if(typeof points=='number'){points=[points]}var fnId=makeId();cuepoints[fnId]=[points,fn];if(player.isLoaded()){player._api().fp_addCuepoints(points,index,fnId)}return self},update:function(json){extend(self,json);if(player.isLoaded()){player._api().fp_updateClip(json,index)}var conf=player.getConfig();var clip=(index==-1)?conf.clip:conf.playlist[index];extend(clip,json,true)},_fireEvent:function(evt,arg1,arg2,target){if(evt=='onLoad'){each(cuepoints,function(key,val){if(val[0]){player._api().fp_addCuepoints(val[0],index,key)}});return false}target=target||self;if(evt=='onCuepoint'){var fn=cuepoints[arg1];if(fn){return fn[1].call(player,target,arg2)}}if(arg1&&"onBeforeBegin,onMetaData,onStart,onUpdate,onResume".indexOf(evt)!=-1){extend(target,arg1);if(arg1.metaData){if(!target.duration){target.duration=arg1.metaData.duration}else{target.fullDuration=arg1.metaData.duration}}}var ret=true;each(listeners[evt],function(){ret=this.call(player,target,arg1,arg2)});return ret}});if(json.onCuepoint){var arg=json.onCuepoint;self.onCuepoint.apply(self,typeof arg=='function'?[arg]:arg);delete json.onCuepoint}each(json,function(key,val){if(typeof val=='function'){bind(listeners,key,val);delete json[key]}});if(index==-1){player.onCuepoint=this.onCuepoint}};var Plugin=function(name,json,player,fn){var listeners={};var self=this;var hasMethods=false;if(fn){extend(listeners,fn)}each(json,function(key,val){if(typeof val=='function'){listeners[key]=val;delete json[key]}});extend(this,{animate:function(props,speed,fn){if(!props){return self}if(typeof speed=='function'){fn=speed;speed=500}if(typeof props=='string'){var key=props;props={};props[key]=speed;speed=500}if(fn){var fnId=makeId();listeners[fnId]=fn}if(speed===undefined){speed=500}json=player._api().fp_animate(name,props,speed,fnId);return self},css:function(props,val){if(val!==undefined){var css={};css[props]=val;props=css}json=player._api().fp_css(name,props);extend(self,json);return self},show:function(){this.display='block';player._api().fp_showPlugin(name);return self},hide:function(){this.display='none';player._api().fp_hidePlugin(name);return self},toggle:function(){this.display=player._api().fp_togglePlugin(name);return self},fadeTo:function(o,speed,fn){if(typeof speed=='function'){fn=speed;speed=500}if(fn){var fnId=makeId();listeners[fnId]=fn}this.display=player._api().fp_fadeTo(name,o,speed,fnId);this.opacity=o;return self},fadeIn:function(speed,fn){return self.fadeTo(1,speed,fn)},fadeOut:function(speed,fn){return self.fadeTo(0,speed,fn)},getName:function(){return name},getPlayer:function(){return player},_fireEvent:function(evt,arg,arg2){if(evt=='onUpdate'){var json=player._api().fp_getPlugin(name);if(!json){return}extend(self,json);delete self.methods;if(!hasMethods){each(json.methods,function(){var method=""+this;self[method]=function(){var a=[].slice.call(arguments);var ret=player._api().fp_invoke(name,method,a);return ret==='undefined'||ret===undefined?self:ret}});hasMethods=true}}var fn=listeners[evt];if(fn){fn.apply(self,arg);if(evt.substring(0,1)=="_"){delete listeners[evt]}}}})};function Player(wrapper,params,conf){var self=this,api=null,html,commonClip,playlist=[],plugins={},listeners={},playerId,apiId,playerIndex,activeIndex,swfHeight,wrapperHeight;extend(self,{id:function(){return playerId},isLoaded:function(){return(api!==null)},getParent:function(){return wrapper},hide:function(all){if(all){wrapper.style.height="0px"}if(api){api.style.height="0px"}return self},show:function(){wrapper.style.height=wrapperHeight+"px";if(api){api.style.height=swfHeight+"px"}return self},isHidden:function(){return api&&parseInt(api.style.height,10)===0},load:function(fn){if(!api&&self._fireEvent("onBeforeLoad")!==false){each(players,function(){this.unload()});html=wrapper.innerHTML;if(html&&!flashembed.isSupported(params.version)){wrapper.innerHTML=""}flashembed(wrapper,params,{config:conf});if(fn){fn.cached=true;bind(listeners,"onLoad",fn)}}return self},unload:function(){if(html.replace(/\s/g,'')!==''){if(self._fireEvent("onBeforeUnload")===false){return self}try{if(api){api.fp_close();self._fireEvent("onUnload")}}catch(error){}api=null;wrapper.innerHTML=html}return self},getClip:function(index){if(index===undefined){index=activeIndex}return playlist[index]},getCommonClip:function(){return commonClip},getPlaylist:function(){return playlist},getPlugin:function(name){var plugin=plugins[name];if(!plugin&&self.isLoaded()){var json=self._api().fp_getPlugin(name);if(json){plugin=new Plugin(name,json,self);plugins[name]=plugin}}return plugin},getScreen:function(){return self.getPlugin("screen")},getControls:function(){return self.getPlugin("controls")},getConfig:function(copy){return copy?clone(conf):conf},getFlashParams:function(){return params},loadPlugin:function(name,url,props,fn){if(typeof props=='function'){fn=props;props={}}var fnId=fn?makeId():"_";self._api().fp_loadPlugin(name,url,props,fnId);var arg={};arg[fnId]=fn;var p=new Plugin(name,null,self,arg);plugins[name]=p;return p},getState:function(){return api?api.fp_getState():-1},play:function(clip,instream){function play(){if(clip!==undefined){self._api().fp_play(clip,instream)}else{self._api().fp_play()}}if(api){play()}else{self.load(function(){play()})}return self},getVersion:function(){var js="flowplayer.js 3.1.4";if(api){var ver=api.fp_getVersion();ver.push(js);return ver}return js},_api:function(){if(!api){throw"Flowplayer "+self.id()+" not loaded when calling an API method";}return api},setClip:function(clip){self.setPlaylist([clip]);return self},getIndex:function(){return playerIndex}});each(("Click*,Load*,Unload*,Keypress*,Volume*,Mute*,Unmute*,PlaylistReplace,ClipAdd,Fullscreen*,FullscreenExit,Error,MouseOver,MouseOut").split(","),function(){var name="on"+this;if(name.indexOf("*")!=-1){name=name.substring(0,name.length-1);var name2="onBefore"+name.substring(2);self[name2]=function(fn){bind(listeners,name2,fn);return self}}self[name]=function(fn){bind(listeners,name,fn);return self}});each(("pause,resume,mute,unmute,stop,toggle,seek,getStatus,getVolume,setVolume,getTime,isPaused,isPlaying,startBuffering,stopBuffering,isFullscreen,toggleFullscreen,reset,close,setPlaylist,addClip,playFeed").split(","),function(){var name=this;self[name]=function(a1,a2){if(!api){return self}var ret=null;if(a1!==undefined&&a2!==undefined){ret=api["fp_"+name](a1,a2)}else{ret=(a1===undefined)?api["fp_"+name]():api["fp_"+name](a1)}return ret==='undefined'||ret===undefined?self:ret}});self._fireEvent=function(a){if(typeof a=='string'){a=[a]}var evt=a[0],arg0=a[1],arg1=a[2],arg2=a[3],i=0;if(conf.debug){log(a)}if(!api&&evt=='onLoad'&&arg0=='player'){api=api||el(apiId);swfHeight=api.clientHeight;each(playlist,function(){this._fireEvent("onLoad")});each(plugins,function(name,p){p._fireEvent("onUpdate")});commonClip._fireEvent("onLoad")}if(evt=='onLoad'&&arg0!='player'){return}if(evt=='onError'){if(typeof arg0=='string'||(typeof arg0=='number'&&typeof arg1=='number')){arg0=arg1;arg1=arg2}}if(evt=='onContextMenu'){each(conf.contextMenu[arg0],function(key,fn){fn.call(self)});return}if(evt=='onPluginEvent'){var name=arg0.name||arg0;var p=plugins[name];if(p){p._fireEvent("onUpdate",arg0);p._fireEvent(arg1,a.slice(3))}return}if(evt=='onPlaylistReplace'){playlist=[];var index=0;each(arg0,function(){playlist.push(new Clip(this,index++,self))})}if(evt=='onClipAdd'){if(arg0.isInStream){return}arg0=new Clip(arg0,arg1,self);playlist.splice(arg1,0,arg0);for(i=arg1+1;i<playlist.length;i++){playlist[i].index++}}var ret=true;if(typeof arg0=='number'&&arg0<playlist.length){activeIndex=arg0;var clip=playlist[arg0];if(clip){ret=clip._fireEvent(evt,arg1,arg2)}if(!clip||ret!==false){ret=commonClip._fireEvent(evt,arg1,arg2,clip)}}each(listeners[evt],function(){ret=this.call(self,arg0,arg1);if(this.cached){listeners[evt].splice(i,1)}if(ret===false){return false}i++});return ret};function init(){if($f(wrapper)){$f(wrapper).getParent().innerHTML="";playerIndex=$f(wrapper).getIndex();players[playerIndex]=self}else{players.push(self);playerIndex=players.length-1}wrapperHeight=parseInt(wrapper.style.height,10)||wrapper.clientHeight;if(typeof params=='string'){params={src:params}}playerId=wrapper.id||"fp"+makeId();apiId=params.id||playerId+"_api";params.id=apiId;conf.playerId=playerId;if(typeof conf=='string'){conf={clip:{url:conf}}}if(typeof conf.clip=='string'){conf.clip={url:conf.clip}}conf.clip=conf.clip||{};if(wrapper.getAttribute("href",2)&&!conf.clip.url){conf.clip.url=wrapper.getAttribute("href",2)}commonClip=new Clip(conf.clip,-1,self);conf.playlist=conf.playlist||[conf.clip];var index=0;each(conf.playlist,function(){var clip=this;if(typeof clip=='object'&&clip.length){clip={url:""+clip}}each(conf.clip,function(key,val){if(val!==undefined&&clip[key]===undefined&&typeof val!='function'){clip[key]=val}});conf.playlist[index]=clip;clip=new Clip(clip,index,self);playlist.push(clip);index++});each(conf,function(key,val){if(typeof val=='function'){if(commonClip[key]){commonClip[key](val)}else{bind(listeners,key,val)}delete conf[key]}});each(conf.plugins,function(name,val){if(val){plugins[name]=new Plugin(name,val,self)}});if(!conf.plugins||conf.plugins.controls===undefined){plugins.controls=new Plugin("controls",null,self)}plugins.canvas=new Plugin("canvas",null,self);params.bgcolor=params.bgcolor||"#000000";params.version=params.version||[9,0];params.expressInstall='http://www.flowplayer.org/swf/expressinstall.swf';function doClick(e){if(!self.isLoaded()&&self._fireEvent("onBeforeClick")!==false){self.load()}return stopEvent(e)}html=wrapper.innerHTML;if(html.replace(/\s/g,'')!==''){if(wrapper.addEventListener){wrapper.addEventListener("click",doClick,false)}else if(wrapper.attachEvent){wrapper.attachEvent("onclick",doClick)}}else{if(wrapper.addEventListener){wrapper.addEventListener("click",stopEvent,false)}self.load()}}if(typeof wrapper=='string'){flashembed.domReady(function(){var node=el(wrapper);if(!node){throw"Flowplayer cannot access element: "+wrapper;}else{wrapper=node;init()}})}else{init()}}var players=[];function Iterator(arr){this.length=arr.length;this.each=function(fn){each(arr,fn)};this.size=function(){return arr.length}}window.flowplayer=window.$f=function(){var instance=null;var arg=arguments[0];if(!arguments.length){each(players,function(){if(this.isLoaded()){instance=this;return false}});return instance||players[0]}if(arguments.length==1){if(typeof arg=='number'){return players[arg]}else{if(arg=='*'){return new Iterator(players)}each(players,function(){if(this.id()==arg.id||this.id()==arg||this.getParent()==arg){instance=this;return false}});return instance}}if(arguments.length>1){var swf=arguments[1];var conf=(arguments.length==3)?arguments[2]:{};if(typeof arg=='string'){if(arg.indexOf(".")!=-1){var instances=[];each(select(arg),function(){instances.push(new Player(this,clone(swf),clone(conf)))});return new Iterator(instances)}else{var node=el(arg);return new Player(node!==null?node:arg,swf,conf)}}else if(arg){return new Player(arg,swf,conf)}}return null};extend(window.$f,{fireEvent:function(){var a=[].slice.call(arguments);var p=$f(a[0]);return p?p._fireEvent(a.slice(1)):null},addPlugin:function(name,fn){Player.prototype[name]=fn;return $f},each:each,extend:extend});if(typeof jQuery=='function'){jQuery.prototype.flowplayer=function(params,conf){if(!arguments.length||typeof arguments[0]=='number'){var arr=[];this.each(function(){var p=$f(this);if(p){arr.push(p)}});return arguments.length?arr[arguments[0]]:new Iterator(arr)}return this.each(function(){$f(this,clone(params),conf?clone(conf):{})})}}})();(function(){var jQ=typeof jQuery=='function';var options={width:'100%',height:'100%',allowfullscreen:true,allowscriptaccess:'always',quality:'high',version:null,onFail:null,expressInstall:null,w3c:false,cachebusting:false};if(jQ){jQuery.tools=jQuery.tools||{};jQuery.tools.flashembed={version:'1.0.4',conf:options}}function isDomReady(){if(domReady.done){return false}var d=document;if(d&&d.getElementsByTagName&&d.getElementById&&d.body){clearInterval(domReady.timer);domReady.timer=null;for(var i=0;i<domReady.ready.length;i++){domReady.ready[i].call()}domReady.ready=null;domReady.done=true}}var domReady=jQ?jQuery:function(f){if(domReady.done){return f()}if(domReady.timer){domReady.ready.push(f)}else{domReady.ready=[f];domReady.timer=setInterval(isDomReady,13)}};function extend(to,from){if(from){for(key in from){if(from.hasOwnProperty(key)){to[key]=from[key]}}}return to}function asString(obj){switch(typeOf(obj)){case'string':obj=obj.replace(new RegExp('(["\\\\])','g'),'\\$1');obj=obj.replace(/^\s?(\d+)%/,"$1pct");return'"'+obj+'"';case'array':return'['+map(obj,function(el){return asString(el)}).join(',')+']';case'function':return'"function()"';case'object':var str=[];for(var prop in obj){if(obj.hasOwnProperty(prop)){str.push('"'+prop+'":'+asString(obj[prop]))}}return'{'+str.join(',')+'}'}return String(obj).replace(/\s/g," ").replace(/\'/g,"\"")}function typeOf(obj){if(obj===null||obj===undefined){return false}var type=typeof obj;return(type=='object'&&obj.push)?'array':type}if(window.attachEvent){window.attachEvent("onbeforeunload",function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){}})}function map(arr,func){var newArr=[];for(var i in arr){if(arr.hasOwnProperty(i)){newArr[i]=func(arr[i])}}return newArr}function getHTML(p,c){var e=extend({},p);var ie=document.all;var html='<object width="'+e.width+'" height="'+e.height+'"';if(ie&&!e.id){e.id="_"+(""+Math.random()).substring(9)}if(e.id){html+=' id="'+e.id+'"'}if(e.cachebusting){e.src+=((e.src.indexOf("?")!=-1?"&":"?")+Math.random())}if(e.w3c||!ie){html+=' data="'+e.src+'" type="application/x-shockwave-flash"'}else{html+=' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'}html+='>';if(e.w3c||ie){html+='<param name="movie" value="'+e.src+'" />'}e.width=e.height=e.id=e.w3c=e.src=null;for(var k in e){if(e[k]!==null){html+='<param name="'+k+'" value="'+e[k]+'" />'}}var vars="";if(c){for(var key in c){if(c[key]!==null){vars+=key+'='+(typeof c[key]=='object'?asString(c[key]):c[key])+'&'}}vars=vars.substring(0,vars.length-1);html+='<param name="flashvars" value=\''+vars+'\' />'}html+="</object>";return html}function Flash(root,opts,flashvars){var version=flashembed.getVersion();extend(this,{getContainer:function(){return root},getConf:function(){return opts},getVersion:function(){return version},getFlashvars:function(){return flashvars},getApi:function(){return root.firstChild},getHTML:function(){return getHTML(opts,flashvars)}});var required=opts.version;var express=opts.expressInstall;var ok=!required||flashembed.isSupported(required);if(ok){opts.onFail=opts.version=opts.expressInstall=null;root.innerHTML=getHTML(opts,flashvars)}else if(required&&express&&flashembed.isSupported([6,65])){extend(opts,{src:express});flashvars={MMredirectURL:location.href,MMplayerType:'PlugIn',MMdoctitle:document.title};root.innerHTML=getHTML(opts,flashvars)}else{if(root.innerHTML.replace(/\s/g,'')!==''){}else{root.innerHTML="<h2>Flash version "+required+" or greater is required</h2>"+"<h3>"+(version[0]>0?"Your version is "+version:"You have no flash plugin installed")+"</h3>"+(root.tagName=='A'?"<p>Click here to download latest version</p>":"<p>Download latest version from <a href='http://www.adobe.com/go/getflashplayer'>here</a></p>");if(root.tagName=='A'){root.onclick=function(){location.href='http://www.adobe.com/go/getflashplayer'}}}}if(!ok&&opts.onFail){var ret=opts.onFail.call(this);if(typeof ret=='string'){root.innerHTML=ret}}if(document.all){window[opts.id]=document.getElementById(opts.id)}}window.flashembed=function(root,conf,flashvars){if(typeof root=='string'){var el=document.getElementById(root);if(el){root=el}else{domReady(function(){flashembed(root,conf,flashvars)});return}}if(!root){return}if(typeof conf=='string'){conf={src:conf}}var opts=extend({},options);extend(opts,conf);return new Flash(root,opts,flashvars)};extend(window.flashembed,{getVersion:function(){var version=[0,0];if(navigator.plugins&&typeof navigator.plugins["Shockwave Flash"]=="object"){var _d=navigator.plugins["Shockwave Flash"].description;if(typeof _d!="undefined"){_d=_d.replace(/^.*\s+(\S+\s+\S+$)/,"$1");var _m=parseInt(_d.replace(/^(.*)\..*$/,"$1"),10);var _r=/r/.test(_d)?parseInt(_d.replace(/^.*r(.*)$/,"$1"),10):0;version=[_m,_r]}}else if(window.ActiveXObject){try{var _a=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(e){try{_a=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");version=[6,0];_a.AllowScriptAccess="always"}catch(ee){if(version[0]==6){return version}}try{_a=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(eee){}}if(typeof _a=="object"){_d=_a.GetVariable("$version");if(typeof _d!="undefined"){_d=_d.replace(/^\S+\s+(.*)$/,"$1").split(",");version=[parseInt(_d[0],10),parseInt(_d[2],10)]}}}return version},isSupported:function(version){var now=flashembed.getVersion();var ret=(now[0]>version[0])||(now[0]==version[0]&&now[1]>=version[1]);return ret},domReady:domReady,asString:asString,getHTML:getHTML});if(jQ){jQuery.fn.flashembed=function(conf,flashvars){var el=null;this.each(function(){el=flashembed(this,conf,flashvars)});return conf.api===false?this:el}}})();

$f.addPlugin("controls",function(wrap,options){function fixE(e){if(typeof e=='undefined'){e=window.event}if(typeof e.layerX=='undefined'){e.layerX=e.offsetX}if(typeof e.layerY=='undefined'){e.layerY=e.offsetY}return e}function w(e){return e.clientWidth}function offset(e){return e.offsetLeft}function Draggable(o,min,max,offset){var dragging=false;function foo(){}o.onDragStart=o.onDragStart||foo;o.onDragEnd=o.onDragEnd||foo;o.onDrag=o.onDrag||foo;function move(x){if(x>max){return false}if(x<min){return false}o.style.left=x+"px";return true}function end(){document.onmousemove=null;document.onmouseup=null;o.onDragEnd(parseInt(o.style.left,10));dragging=false}function drag(e){e=fixE(e);var x=e.clientX-offset;if(move(x)){dragging=true;o.onDrag(x)}return false}o.onmousedown=function(e){e=fixE(e);o.onDragStart(parseInt(o.style.left,10));document.onmousemove=drag;document.onmouseup=end;return false};this.dragTo=function(x){if(move(x)){o.onDragEnd(x)}};this.setMax=function(val){max=val};this.isDragging=function(){return dragging};return this}function extend(to,from){if(from){for(key in from){if(key){to[key]=from[key]}}}}function byClass(name){var els=wrap.getElementsByTagName("*");var re=new RegExp("(^|\\s)"+name+"(\\s|$)");for(var i=0;i<els.length;i++){if(re.test(els[i].className)){return els[i]}}}function pad(val){val=parseInt(val,10);return val>=10?val:"0"+val}function toTime(sec){var h=Math.floor(sec/3600);var min=Math.floor(sec/60);sec=sec-(min*60);if(h>=1){min-=h*60;return pad(h)+":"+pad(min)+":"+pad(sec)}return pad(min)+":"+pad(sec)}function getTime(time,duration){return"<span>"+toTime(time)+"</span> <strong>"+toTime(duration)+"</strong>"}var self=this;var opts={playHeadClass:'playhead',trackClass:'track',playClass:'play',pauseClass:'pause',bufferClass:'buffer',progressClass:'progress',timeClass:'time',muteClass:'mute',unmuteClass:'unmute',duration:0,template:'<a class="play">play</a>'+'<div class="track">'+'<div class="buffer"></div>'+'<div class="progress"></div>'+'<div class="playhead"></div>'+'</div>'+'<div class="time"></div>'+'<a class="mute">mute</a>'};extend(opts,options);if(typeof wrap=='string'){wrap=document.getElementById(wrap)}if(!wrap){return}if(!wrap.innerHTML.replace(/\s/g,'')){wrap.innerHTML=opts.template}var ball=byClass(opts.playHeadClass);var bufferBar=byClass(opts.bufferClass);var progressBar=byClass(opts.progressClass);var track=byClass(opts.trackClass);var time=byClass(opts.timeClass);var mute=byClass(opts.muteClass);time.innerHTML=getTime(0,opts.duration);var trackWidth=w(track);var ballWidth=w(ball);var head=new Draggable(ball,0,0,offset(wrap)+offset(track)+(ballWidth/2));track.onclick=function(e){e=fixE(e);if(e.target==ball){return false}head.dragTo(e.layerX-ballWidth/2)};var play=byClass(opts.playClass);play.onclick=function(){if(self.isLoaded()){self.toggle()}else{self.play()}};mute.onclick=function(){if(self.getStatus().muted){self.unmute()}else{self.mute()}};var timer=null;function getMax(len,total){var x=parseInt(Math.min(len/total*trackWidth,trackWidth-ballWidth/2),10);return isNaN(x)?0:x}self.onStart(function(clip){var duration=clip.duration||0;clearInterval(timer);timer=setInterval(function(){var status=self.getStatus();if(status.time){time.innerHTML=getTime(status.time,clip.duration)}if(status.time===undefined){clearInterval(timer);return}var x=getMax(status.bufferEnd,duration);bufferBar.style.width=x+"px";head.setMax(x);if(!self.isPaused()&&!head.isDragging()){x=getMax(status.time,duration);progressBar.style.width=x+"px";ball.style.left=(x-ballWidth/2)+"px"}},500)});self.onBegin(function(){play.className=opts.pauseClass});self.onPause(function(){play.className=opts.playClass});self.onResume(function(){play.className=opts.pauseClass});self.onMute(function(){mute.className=opts.unmuteClass});self.onUnmute(function(){mute.className=opts.muteClass});self.onFinish(function(clip){clearInterval(timer)});self.onUnload(function(){time.innerHTML=getTime(0,opts.duration)});ball.onDragEnd=function(x){var to=parseInt(x/trackWidth*100,10)+"%";progressBar.style.width=x+"px";if(self.isLoaded()){self.seek(to)}};ball.onDrag=function(x){progressBar.style.width=x+"px"};return self});
