/*
 http://opensource.org/licenses/gpl-2.0.php GNU GPL 2.0
 http://opensource.org/licenses/gpl-2.0.php GNU GPL 2.0
 http://opensource.org/licenses/gpl-2.0.php GNU GPL 2.0
*/
window.addEvent("domready",function(){$$(".tab-box").tabBox();$$(".multimedia-box").slideShow({pagerContainerClass:"multimedia-pagers"});$("pow-box")&&$("pow-box").slideShow({pagerContainerClass:"pow-pagers"});var f=0;$$(".graphable-pie").each(function(b){f++;b.getElements("thead").destroy();b.get("id")||b.set("id","graphTable_"+f);var c=b.getCoordinates();(new Element("canvas",{id:"graph_"+f,styles:{height:350,width:c.width}})).inject(b,"after");b.setStyle("display","none");c=new Bluff.Pie("graph_"+
f,c.width+"x350");c.tooltips=true;c.theme_keynote();c.set_theme({colors:["#6886B4","#FDD84E","#72AE6E","#D1695E","#8A6EAF","#EFAA43"],background_colors:"#fff",font_color:"#333"});c.data_from_table(b.get("id"));c.draw()});$$("input.replace-text").each(function(b){b.store("default-text",b.value);b.addEvents({focus:function(){this.setStyle("color","#000");if(this.value==this.retrieve("default-text"))this.value=""},blur:function(){this.setStyle("color","#999");if(this.value=="")this.value=this.retrieve("default-text")}})})});
document.addEvent("domready",function(){$$(".expandable").addEvent("click",function(c){c.stop();if(!this.hasClass("expanded")){$$(".expanded").each(b);$("expanded_"+e)&&f("expanded_"+e);c=this.getElements("a").pop().get("href").replace(/multimedia/,"media").toURI();var e=c.get("file");this.get("id")||this.set("id","expandable_"+e);this.set("rel","expanded_"+e);f(this);var a=this;(new Request.HTML({url:c.toString(),onComplete:function(d){var g=a.retrieve("maxWidth");a.retrieve("startHeight");var h=
new Element("div",{id:"expanded_"+e,rel:a.get("id"),"class":"expanded_container",styles:{position:"absolute",left:-1E4,width:g,"float":"left"}});h.adopt(d);h.inject(a,"after");h.getElements(".close").addEvent("click",function(i){i.stop();b(h.get("rel"))})}})).send()}});var f=function(c){c=$(c);var e=c.getParent().getCoordinates().width,a=c.getCoordinates();c.store("origCoords",a);c.store("maxWidth",e);a=e*(a.height/a.width);c.store("startHeight",a);c.set("morph",{onComplete:function(){var d=c.get("rel");
d=$(d);$(d.get("rel")).setStyle("display","none");d.setStyles({position:"relative",left:0});(new Fx.Scroll(window,{offset:{y:-40}})).toElement(d)}});c.morph({height:a,width:e});c.getElements("img.preview").morph({height:a,width:e});c.addClass("expanded")},b=function(c){c=$(c);var e=$(c);if(e.get("rel")){var a=$(e.get("rel"));if(a){e.setStyle("display","");a.setStyles({position:"absolute",left:-1E4})}}e=c.retrieve("origCoords");c.set("morph",{onComplete:$lambda});c.morph({height:e.height,width:e.width});
c.getElements("img.preview").morph({height:e.height,width:e.width});c.removeClass("expanded")}});window.Rose||(Rose={});
(function(){var f=window.location.toString();if(f.indexOf("index.php")!=-1)f=f.substr(0,f.indexOf("index.php"));Rose.basePath=f;String.implement({unencode:function(){return decodeURIComponent(unescape(this))},encode:function(){return escape(encodeURIComponent(this))}});Element.implement({noSelect:function(){this.onselectstart=this.ondragstart=$lambda(false);this.addEvent("mousedown",$lambda(false));this.setStyle("-moz-user-select","none")},dispose:function(){this.retrieve&&this.retrieve("disposeWatchers",
[]).each(function(b){b.dispose()});return this.parentNode?this.parentNode.removeChild(this):this},disposeWith:function(b){var c=$(b).retrieve("disposeWatchers",[]);c.push(this);$(b).store("disposeWatchers",c)}})})();window.Rose||(Rose={});
(function(){var f=new Class({_container:false,_message:false,_type:false,_defaultOptions:$H({container:$(document.body),id:"rose_statusMessage"}),_options:$H({}),initialize:function(){this.setOptions({})},setOptions:function(b){this._options=$H(b);this._options.combine(this._defaultOptions)},display:function(b,c){this._initContainer();var e="notice";if(c)e=c;this._setMessage(b);this._setType(e);this._show();setTimeout(function(){this._hide()}.bind(this),5E3)},_initContainer:function(){if(!this._container){$(window).getCoordinates();
this._container=new Element("div",{id:this._options.get("id"),tween:{duration:250}});var b=$("ticker");if(b){b=b.getCoordinates();this._container.setStyles({left:b.left,width:b.width,height:b.height})}$(this._options.get("container")).adopt(this._container)}},_show:function(){this._container.tween("opacity",1)},_hide:function(){this._container.tween("opacity",0)},_setMessage:function(b){b=new Element("div",{styles:{"margin-top":"5px"},html:b});this._container.empty();this._container.adopt(b)},_setType:function(b){this._type&&
this._container.removeClass(this._type);this._container.addClass(b);this._type=b}});if(!Rose.ui)Rose.ui={};Rose.ui.statusMessage=new f})();window.Rose||(Rose={});
(function(){if(!Rose.ui)Rose.ui={};var f=new Class({Implements:Options,options:{buttons:{},containerClass:"format-bar",onInject:false},_element:false,_buttons:{bold:{help:"Bold",callback:function(){this.wrapSelection("*","*")}},italic:{help:"Italic",callback:function(){this.wrapSelection("_","_")}},indent:{help:"Blockquote",callback:function(){this.insertAtSelection("\n> \n> \n")}},ul:{help:"Unorderd list",callback:function(){this.insertAtSelection("\n* Item One\n* Item Two\n* Item Three\n\n")}},
ol:{help:"Ordered list",callback:function(){this.insertAtSelection("\n# Item One\n# Item Two\n# Item Three\n\n")}},link:{help:"Add link",callback:function(){this.wrapSelection('"','":'+(prompt("Please enter a URL:")||"http://"))}},h1:{help:"Heading 1",callback:function(){this.wrapSelection("\nh1. ","\n\n")}},h2:{help:"Heading 2",callback:function(){this.wrapSelection("\nh2. ","\n\n")}},h3:{help:"Heading 3",callback:function(){this.wrapSelection("\nh3. ","\n\n")}}},initialize:function(b,c){this.setOptions(c);
this._element=$(b);this.options.buttons=this.options.buttons?$H(this.options.buttons).combine($H(this._buttons)):$H(this._buttons);this.options.onInject?this.options.onInject.run(this.buildToolbar(),this):this.buildToolbar().inject(this._element,"before")},insertAtSelection:function(b){var c=this._element.selectionStart,e=this._element.value,a=this._element.scrollTop;this._element.value=e.substring(0,c)+b+e.substring(c+1,e.length);this._element.scrollTop=a},wrapSelection:function(b,c){var e=this._element.selectionStart,
a=this._element.selectionEnd,d=this._element.scrollTop,g=this._element.value,h=g.substr(e,a-e);this._element.value=g.substring(0,e)+b+h+c+g.substring(a,g.length);this._element.scrollTop=d},format:function(b){this.options.buttons.get(b)&&this.options.buttons.get(b).run()},buildToolbar:function(){var b=new Element("div",{"class":this.options.containerClass});this.options.buttons.each(function(c,e){var a=this,d=new Element("a",{href:"#","class":e,text:c.help,events:{click:function(g){g.stop();c.callback.bind(a).run()}}});
b.adopt(d)}.bind(this));return b}});Element.implement({formatable:function(b){new f(this,b);return this}});Rose.ui.formatBar=f})();window.Rose||(Rose={});
(function(){var f=new Class({_element:false,_defaultOptions:$H({buttonClass:"rose_canvasButton",borderRadius:3,style:false,defaultStyle:false,disabledStyle:false}),_styles:$H({"default":{fill:"270-#f1f1f1-#e1e1e1:90-#999",stroke:"#c0c0c0",color:"#333",shadow:"#fff"},blue:{fill:"270-#4e6bb4-#405893:90-#999",stroke:"#369",color:"#fff",shadow:"#999"},gray:{fill:"270-#898989-#636363:90-#999",stroke:"#999",color:"#fff",shadow:"#333"}}),_options:$H({}),_disabled:false,_paper:false,_dimensions:{height:0,
width:0,innerHeight:0,innerWidth:0},_button:false,_text:false,_textShadow:false,_primaryIcon:false,_secondaryIcon:false,_context:"single",container:false,initialize:function(b,c){if(c)this._options=$H(c);this._options.combine(this._defaultOptions);this._element=$(b);var e=this._element.getCoordinates(),a=this.getText();this._dimensions.height=23;this._dimensions.innerHeight=22;this._dimensions.width=e.width+10;this._dimensions.innerWidth=this._dimensions.width-1;this.container=new Element("div",{styles:{margin:0,
padding:0,width:this._dimensions.innerWidth,"float":"left"}});this._options.get("buttonClass")&&this.container.addClass(this._options.get("buttonClass"));if(parseInt(this._element.getStyle("width"))){this._dimensions.width=parseInt(this._element.getStyle("width"))+10;this._dimensions.innerWidth=this._dimensions.width-1}if(parseInt(this._element.getStyle("height"))){this._dimensions.height=parseInt(this._element.getStyle("height"));this._dimensions.innerHeight=this._dimensions.height-1}this.container.inject(this._element,
"after");$(document.body).adopt(this._element);this._paper=Raphael(this.container,this._dimensions.width,this._dimensions.height);this._button=this._paper.rect(0,0,this._dimensions.innerWidth,this._dimensions.innerHeight,this._options.get("borderRadius"));this.setText(a);this.setPrimaryIcon();this.setSecondaryIcon();this._options.get("defaultStyle")||this._options.set("defaultStyle",this._styles.get("default"));this._options.get("style")&&this._options.set("defaultStyle",this._options.get("style"));
this._options.get("disabledStyle")||this._options.set("disabledStyle",this._options.get("defaultStyle"));this._element.get("class").length&&this._element.get("class").split(" ").each(function(d){if(this._styles.get(d))style=d}.bind(this));this.setStyle(this._options.get("defaultStyle"));this._registerEvents();this.registerClickTarget();this._element.setStyle("display","none");this._element.disposeWith(this.container);this._element.get("disable")&&this.setDisabled(true)},registerClickTarget:function(){this._element.setStyle("display",
"");this._element.setStyles({position:"absolute",top:this.container.getCoordinates().top,left:this.container.getCoordinates().left,width:this._button.attr("width"),height:this._button.attr("height"),display:"block",background:"#000",opacity:0.01,"z-index":1E5});this._disabled&&this._element.setStyle("display","none")},setText:function(b){this._text=this._paper.text(this._dimensions.width/2,this._dimensions.height/2,b);this._textShadow=this._paper.text(this._paper.width/2,this._paper.height/2-1,b);
this._textShadow.insertBefore(this._text);this._text.attr({"font-size":"10px","font-weight":"bold",fill:"#333"});this._textShadow.attr({"font-size":"10px","font-weight":"bold",fill:"#fff"})},getText:function(){if(this._element.get("label"))return this._element.get("label");switch(this._element.get("tag")){case "input":return this._element.get("value");case "a":case "span":return this._element.get("text")}},setStyle:function(b){this._button.attr({fill:b.fill,stroke:b.stroke});this._text.attr({fill:b.color});
this._textShadow.attr({fill:b.shadow})},setPrimaryIcon:function(){var b=this._element.get("icon");if(!b)return false;this._dimensions.width+=26;this._dimensions.innerWidth+=24;this._paper.setSize(this._dimensions.width,this._dimensions.height);this._button.attr({x:0,width:this._dimensions.innerWidth});this.container.setStyles({width:this._dimensions.innerWidth});this._text.attr({x:this._dimensions.width/2+10});this._textShadow.attr({x:this._dimensions.width/2+10});var c=this._dimensions.height;c%
2!=0&&c--;this._primaryIcon=this._paper.image(b,7,c/2-8,16,16)},setSecondaryIcon:function(){var b=this._element.get("secondary-icon");if(!b)return false;this._dimensions.width+=10;this._dimensions.innerWidth+=8;this._paper.setSize(this._dimensions.width,this._dimensions.height);this._button.attr({x:0,width:this._dimensions.innerWidth});this.container.setStyles({width:this._dimensions.innerWidth});var c=this._dimensions.height;c%2!=0&&c--;this._secondaryIcon=this._paper.image(b,this._dimensions.width-
16,c/2-2,6,4)},setDisabled:function(b){if(this._disabled=b){this._element.setStyle("display","none");this.setStyle(this._options.get("disabledStyle"));this._primaryIcon&&this._primaryIcon.attr({opacity:0.5});this._secondaryIcon&&this._secondaryIcon.attr({opacity:0.5})}else{this._element.setStyle("display","");this.setStyle(this._options.get("defaultStyle"));this._primaryIcon&&this._primaryIcon.attr({opacity:1});this._secondaryIcon&&this._secondaryIcon.attr({opacity:1});this.registerClickTarget()}},
setContext:function(){},getNode:function(){return this._button.node},_registerEvents:function(){this._button.node.onmouseover=function(){this.registerClickTarget()}.bind(this);this._element.addEvents({mousedown:function(b){this._disabled?b.stop():this._button.rotate(180,true)}.bind(this),mouseup:function(b){if(this._disabled)b.stop();else{this._button.rotate(0,true);this._element.get("tag")=="input"&&this._element.get("type")=="submit"&&$(this._button.node).getParents("form").length&&$(this._button.node).getParents("form")[0].submit()}}.bind(this)})}});
Element.implement({canvasButton:function(b){if(this.retrieve("canvasButton"))return this.retrieve("canvasButton");this.store("canvasButton",new f(this,b));return this},canvasButtonGroup:function(b){var c=this.getChildren().length;this.getChildren().each(function(e,a){var d=new f(e,b);e.store("canvasButton",d);var g=d._options.get("borderRadius");if(a>=1){if(a<c-1)g*=2;d._button.attr({x:"-"+d._options.get("borderRadius"),width:d._button.attr("width")+g});d._paper.path("M0 0L0 100").attr({stroke:d._button.attr("stroke")})}else d._button.attr({width:d._button.attr("width")+
g})});return this}})})();window.Rose||(Rose={});
(function(){if(!Rose.ui)Rose.ui={};var f=new Class({Implements:Options,options:{pagerSelector:".pagers",imageSelector:".image",captionSelector:".caption",authorSelector:".byline",onLoad:$lambda,onChange:$lambda,onSelect:$lambda},container:false,initialize:function(b,c){c?this.setOptions(c):this.setOptions({});this.container=$(b);$$(this.options.pagerSelector).addEvent("click",this.handlePagerClick.bind(this))},handlePagerClick:function(b){b.stop();b=b.target;var c=b.get("href").toURI();c.set("file",
c.get("file")+".json");this.options.onSelect.run(b,this);(new Request.JSON({url:c.toString(),onComplete:this.loadNewImage.bind(this)})).send()},loadNewImage:function(b){var c=this.container.getElements(this.options.imageSelector).pop(),e=c.clone(),a=new Image,d=this.container.getElements(this.options.captionSelector);if(d.length)d=d.pop();var g=this.container.getElements(this.options.authorSelector);if(g.length)g=g.pop();var h=this;a.onload=function(){c.setStyle("position","relative");c.set("morph",
{onComplete:function(){e.replaces(c);e.src=a.src;e.setStyles({position:"relative",left:-50,opacity:0,height:a.height});e.morph({left:0,opacity:1});h.options.onChange.run(b,h)}});c.morph({left:-50,opacity:0})};a.src=b[0].image.url.unencode();d&&d.set("html",b[0].image.caption_formatted.unencode());if(g){var i=[];$H(b[0].image.authors).each(function(j){i.push(j.name.unencode())});g.set("html",i)}}});Rose.ui.inlineGallery=f})();window.Rose||(Rose={});
(function(){var f=new Class({Implements:Options,_mask:false,_container:false,_title:false,_content:false,_buttons:false,_close:false,_loadingIndicator:false,options:{destroyOnClose:false,modalClass:"modal",id:false,mask:true,content:false,height:150,width:300,onSubmit:$empty,onCancel:$empty,onOpen:$empty,onClose:$empty},initialize:function(b){this.setOptions(b);this._container=(new Element("div",{"class":this.options.modalClass,styles:{position:"fixed",top:0,left:0,width:this.options.width,opacity:0},
tween:{duration:250},morph:{duration:250}})).adopt(this.options.content);this.options.id&&this._container.set("id",this.options.id);this._title=this._container.getFirst();this._content=this._container.getFirst().getNext();if(this._container.getChildren().length>2)this._buttons=this._container.getLast();if(this._title.getElements("a"))this._close=this._title.getElements("a").pop();this._close&&this._close.addEvent("click",this.close.bind(this));if(this._buttons){this._buttons.getElements("a.cancel").addEvent("click",
this.options.onCancel.bind(this));this._buttons.getElements("a.submit").addEvent("click",this.options.onSubmit.bind(this))}$(document.body).adopt(this._container);new Drag(this._container,{handle:this._title})},hide:function(b){var c=$empty;if(b)c=b;this._container.set("morph",{onComplete:c.bind(this),duration:250});this._container.morph({opacity:0,top:this._container.getCoordinates().top+50});this.options.onClose.bind(this).run([])},close:function(b){b&&b.stop();this.hide(function(){this._container.destroy()}.bind(this))},
show:function(b){var c=$(window).getCoordinates(),e=this._container.getCoordinates(),a=c.height/2-e.height/2;this._container.setStyles({left:c.width/2-e.width/2,top:a-50});c=$empty;if(b)c=b;this._container.set("morph",{onComplete:c.bind(this),duration:250});this._container.morph({opacity:1,top:a});this.options.onOpen.bind(this).run([]);return this}});if(!Rose.ui)Rose.ui={};Rose.ui.simpleModal=f})();window.Rose||(Rose={});
(function(){var f=new Class({_defaultOptions:$H({stroke:"#999",fill:"r(0.25, 0.25)#fff-#ccc",shadowFill:"r(0.5, 0.5)#000-#fff",radius:12,duration:500,mask:true,maskFill:"#333",maskOpacity:0.75,textColor:"#fff",text:"Working..."}),_options:$H({}),_container:false,_paper:false,_circle:false,_shadow:false,_mask:false,_shadowOffset:false,_timer:false,initialize:function(b,c){this._container=$(b);if(c)this._options=$H(c);this._options.combine(this._defaultOptions);var e=this._options.get("radius")*8,a=
this._options.get("radius")*3,d=this._options.get("radius")*4;this._shadowOffset=this._options.get("radius")/2;this._paper=new Raphael(this._container,e,e);this._circle=this._paper.circle(d,a,this._options.get("radius"));this._shadow=this._paper.circle(d,a,this._options.get("radius"));this._shadow.toBack();this._circle.attr({fill:this._options.get("fill"),stroke:this._options.get("stroke"),"fill-opacity":1});this._shadow.attr({stroke:false,fill:this._options.get("shadowFill"),"fill-opacity":0.25});
if(this._options.get("mask")){this._shadow.attr({fill:"r(0.5, 0.5)#333-#666","fill-opacity":0.2});this._mask=this._paper.rect(0,0,e-2,e-2,4);this._mask.attr({fill:this._options.get("maskFill"),opacity:this._options.get("maskOpacity"),stroke:false});this._mask.toBack();this._paper.text(e/2,e-20,this._options.get("text")).attr({fill:this._options.get("textColor")})}this._container.fade("hide");this._container.set("tween",{duration:150})},show:function(){this._container.fade("in");this._animateUp();
this._timer=setInterval(this._animateUp.bind(this),this._options.get("duration")*2+250)},hide:function(){this._container.fade("out");setTimeout(function(){this._timer&&clearInterval(this._timer)}.bind(this),500)},_animateUp:function(){this._circle.animate({r:this._options.get("radius")*1.25},this._options.get("duration"),this._animateDown.bind(this));this._shadow.animateWith(this._circle,{r:(this._options.get("radius")+this._shadowOffset)*1.25,cy:this._options.get("radius")*3.5},this._options.get("duration"))},
_animateDown:function(){this._circle.animate({r:this._options.get("radius")},this._options.get("duration"));this._shadow.animateWith(this._circle,{r:this._options.get("radius"),cy:this._options.get("radius")*3},this._options.get("duration"))}});if(!Rose.ui)Rose.ui={};Rose.ui.throbber=f})();window.Rose||(Rose={});
(function(){var f=new Class({container:false,children:false,linkContainer:false,_defaultOptions:$H({linkContainerClass:"tab-box-header",linkActiveClass:"tab-header-active"}),_options:$H({}),initialize:function(b,c){if(c)this._options=$H(c);this._options.combine(this._defaultOptions);this.container=b;this.children=this.container.getChildren();this.linkContainer=new Element("div",{"class":this._options.get("linkContainerClass"),styles:{margin:0,padding:0}});this.linkContainer.injectBefore(this.container);
var e=this.children.length,a=this.container.getSize().x/e,d=0,g=this._options.get("linkActiveClass");this.children.each(function(h,i){var j=h.getFirst();this.linkContainer.grab(j);j.setStyles({display:"block","float":"left",width:a+"px","text-align":"center"});j.addEvent("click",function(k){k.stop();this.linkContainer.getChildren().removeClass(g);j.addClass(g);this.children.setStyle("display","none");h.setStyle("display","")}.bind(this));if(h.getSize().y>d){d=h.getSize().y;this.container.setStyle("height",
d+10)}i>0?h.setStyle("display","none"):j.addClass(g)}.bind(this))}});Element.implement({tabBox:function(b){new f(this,b);return this}});if(!Rose.ui)Rose.ui={};Rose.ui.tabBox=f})();window.Rose||(Rose={});
(function(){var f=new Class({_mask:false,_container:false,_titleContainer:false,_contentContainer:false,_buttonContainer:false,_loadingIndicator:false,_defaultOptions:$H({mode:"determinate",title:false,content:false,submit:"Save",cancel:"Cancel",destroyOnClose:false,loadingIndicator:true,mask:true,height:150,width:300,onSubmit:$empty,onCancel:$empty,onOpen:$empty,onClose:$empty}),_options:$H({}),initialize:function(b){if(b)this._options=$H(b);this._options.combine(this._defaultOptions);this._titleContainer=
new Element("div",{"class":"rose_modal_title",html:this._options.get("title")});this._options.get("mode")=="determinate"&&this._titleContainer.adopt((new Element("a",{href:"#","class":"rose_modal_closeLink",events:{click:this._destroy.bind(this)},styles:{position:"absolute",right:10,top:2}})).adopt(new Element("span",{text:"Close"})));this._contentContainer=new Element("div",{"class":"rose_modal_content",styles:{width:this._options.get("width"),height:this._options.get("height")}});this._buttonContainer=
new Element("div",{"class":"rose_modal_buttonBar",styles:{position:"absolute",bottom:0,left:0}});this._container=(new Element("div",{"class":"rose_modal_container",styles:{position:"fixed",opacity:0,top:0,left:0},tween:{duration:250},morph:{duration:250}})).adopt(this._titleContainer,this._contentContainer,this._buttonContainer);Browser.Engine.trident&&this._container.setStyle("border-width",1);this._updateContent();this._options.get("mode")=="determinate"&&this._updateButtons();this._options.set("onOpen",
this._options.get("onOpen").bind(this));this._options.set("onClose",this._options.get("onClose").bind(this));this._options.set("onCancel",this._options.get("onCancel").bind(this));this._options.set("onSubmit",this._options.get("onSubmit").bind(this));$(document.body).adopt(this._container)},display:function(){this._show();return this},close:function(b){if(b||this._options.get("destroyOnClose"))return this._destroy();this._hide();return this},set:function(b,c){this._options.has(b)&&this._options.set(b,
c);switch(b){case "content":this._updateContent();break;case "submit":case "cancel":case "mode":this._updateButtons()}return this},loading:function(b){if(this._loadingIndicator){if(b){this._loadingIndicator.show();return this}this._loadingIndicator.hide();return this}},_show:function(b){var c=$(window).getCoordinates(),e=this._container.getCoordinates(),a=c.width/2-e.width/2;e=c.height/2-e.height/2;if(this._options.get("mask")){this._mask=new Element("div",{styles:{background:"#333",position:"fixed",
top:0,left:0,width:c.width,height:c.height,opacity:0},events:{click:this._destroy.bind(this)},tween:{duration:250}});this._mask.inject(this._container,"before")}this._container.setStyles({left:a,top:e-50});c=$empty;if(b)c=b;this._container.set("morph",{onComplete:c.bind(this),duration:250});this._container.morph({opacity:1,top:e});this._mask&&this._mask.tween("opacity",0.25);this._buttonContainer.getChildren("a").canvasButton();this._options.get("onOpen").bind(this).run([])},_hide:function(b){var c=
$empty;if(b)c=b;this._container.set("morph",{onComplete:c.bind(this),duration:250});this._container.morph({opacity:0,top:this._container.getCoordinates().top+50});this._mask&&this._mask.tween("opacity",0);this._options.get("onClose").bind(this).run([])},_destroy:function(b){b&&b.stop();this._hide(function(){this._container.destroy();this._mask&&this._mask.destroy()})},_handleSubmit:function(b){b.stop();this._options.get("onSubmit").bind(this).run([])},_handleCancel:function(b){b.stop();this._options.get("onCancel").bind(this).run([]);
this._destroy()},_updateContent:function(){this._contentContainer.empty();typeof this._options.get("content")=="object"?this._contentContainer.adopt(this._options.get("content")):this._contentContainer.set("html",this._options.get("content"));if(this._options.get("mode")=="determinate"){this._contentContainer.addClass("rose_modal_content");this._contentContainer.removeClass("rose_modal_contentIndeterminate")}else{this._contentContainer.addClass("rose_modal_contentIndeterminate");this._contentContainer.removeClass("rose_modal_content")}},
_updateButtons:function(){var b=[];this._buttonContainer.empty();this._buttonContainer.setStyle("display","none");this._options.get("submit")&&b.push(new Element("a",{href:"#","class":"active-button submit",text:this._options.get("submit"),events:{click:this._handleSubmit.bind(this)}}));this._options.get("cancel")&&b.push(new Element("a",{href:"#","class":"active-button cancel",text:this._options.get("cancel"),events:{click:this._handleCancel.bind(this)}}));if(this._options.get("loadingIndicator")){var c=
new Element("div",{styles:{"float":"left",width:"24px",height:"24px",position:"relative",top:"-3px"}});this._loadingIndicator=new Rose.ui.throbber(c,{radius:4,mask:false});b.push(c)}if(b.length){this._buttonContainer.setStyle("display","");this._buttonContainer.adopt(b)}}});if(!Rose.ui)Rose.ui={};Rose.ui.modal=f})();window.Rose||(Rose={});
(function(){var f=new Class({_defaultOptions:$H({content:false,submit:"Save",cancel:"Cancel",destroyOnClose:false,loadingIndicator:true,mask:true,onSubmit:$empty,onCancel:$empty,onOpen:$empty,onClose:$empty}),_options:$H({}),_container:false,_contentContainer:false,_topContainer:false,_bottomContainer:false,_buttonContainer:false,_loadingIndicator:false,_target:false,_boundClickObserver:false,initialize:function(b,c){if(c)this._options=$H(c);this._target=$(b);this._options.combine(this._defaultOptions);
this._topContainer=new Element("div",{"class":"rose_popupModal_top"});this._bottomContainer=new Element("div",{"class":"rose_popupModal_bottom"});var e=new Element("div",{"class":"rose_popupModal_content"});this._buttonContainer=new Element("div",{"class":"rose_popupModal_buttonBar"});this._container=(new Element("div",{"class":"rose_popupModal_container",styles:{position:"absolute"}})).adopt(this._topContainer,e,this._buttonContainer,this._bottomContainer);this._contentContainer=new Element("div",
{styles:{padding:"0 15px"}});e.adopt(this._contentContainer);this._updateContent();this._updateButtons();this._container.fade("hide");this._container.set("tween",{duration:100});$(document.body).adopt(this._container);this._boundClickObserver=function(){this.hide(true)}.bind(this)},show:function(){var b=this._target.getCoordinates(),c=b.top-this._container.getSize().y;b=b.left+b.width/2-this._container.getSize().x/2;this._container.setStyles({top:c,left:b});this._container.fade("in");$(document.body).addEvent("click",
this._boundClickObserver);this._container.addEvents({mouseenter:function(){$(document.body).removeEvent("click",this._boundClickObserver)}.bind(this),mouseleave:function(){$(document.body).addEvent("click",this._boundClickObserver)}.bind(this)});this._buttonContainer.getChildren("a").canvasButton();this._options.get("onOpen").bind(this).run([]);return this},hide:function(b){$(document.body).removeEvent("click",this._boundClickObserver);this._container.fade("out");b&&b===true&&this._destroy();this._options.get("onClose").bind(this).run([]);
return this},loading:function(b){if(this._loadingIndicator){if(b){this._loadingIndicator.show();return this}this._loadingIndicator.hide();return this}},getContents:function(){return this._contentContainer.getFirst()},getTarget:function(){return this._target},_destroy:function(){this.hide();setTimeout(function(){this._container.destroy()}.bind(this),150)},_updateContent:function(){this._contentContainer.empty();typeof this._options.get("content")=="object"?this._contentContainer.adopt(this._options.get("content")):
this._contentContainer.set("html",this._options.get("content"))},_handleSubmit:function(b){b.stop();this._options.get("onSubmit").bind(this).run([])},_handleCancel:function(b){b.stop();this._options.get("onCancel").bind(this).run([]);this.hide(true)},_updateButtons:function(){var b=[];this._buttonContainer.empty();this._buttonContainer.setStyle("display","none");this._options.get("submit")&&b.push(new Element("a",{href:"#","class":"active-button submit",text:this._options.get("submit"),events:{click:this._handleSubmit.bind(this)}}));
this._options.get("cancel")&&b.push(new Element("a",{href:"#","class":"active-button cancel",text:this._options.get("cancel"),events:{click:this._handleCancel.bind(this)}}));if(this._options.get("loadingIndicator")){var c=new Element("div",{styles:{width:"24px",height:"24px","float":"left"}});this._loadingIndicator=new Rose.ui.throbber(c,{radius:4,mask:false});b.push(c)}if(b.length){this._buttonContainer.setStyle("display","");this._buttonContainer.adopt(b)}}});if(!Rose.ui)Rose.ui={};Rose.ui.popupModal=
f})();window.Rose||(Rose={});
(function(){var f=new Class({_container:false,_slides:false,_pagerContainer:false,_defaultOptions:$H({autoStart:true,pauseOnHover:true,slideClass:"slide",descriptionClass:"description",pagerContainerClass:"pagers",pagerActiveClass:"active",showPagers:false,onStart:$empty,onStop:$empty,onNext:$empty,onPrevious:$empty}),_options:$H({}),_currentIndex:0,_boundSlideEvent:false,_boundPauseEvent:false,_boundPlayEvent:false,_timer:false,initialize:function(b,c){this._container=$(b);if(c)this._options=$H(c);
this._options.combine(this._defaultOptions);this._slides=b.getChildren();this._container.setStyles({position:"relative",overflow:"hidden"});this._pagerContainer=new Element("div");this._options.get("pagerContainerClass")&&this._pagerContainer.addClass(this._options.get("pagerContainerClass"));this._pagerContainer.injectBefore(this._container);var e=this._container.getSize().x,a=this._container.getSize().y;this._slides.each(function(d,g){d.setStyles({display:"block",position:"absolute",top:0,left:0,
height:a});this._options.get("slideClass")&&d.addClass(this._options.get("slideClass"));var h=d.getLast(),i=parseInt(h.getStyle("margin"));i||(i=10);h.setStyles({display:"block",position:"absolute",bottom:i/2+"px",left:i/2+"px",margin:"auto",width:e-i*2});this._options.get("descriptionClass")&&h.addClass(this._options.get("descriptionClass"));d.store("media-description",h);g>0&&d.fade("hide")}.bind(this));this._boundSlideEvent=this.next.bind(this);this._boundPlayEvent=this.start.bind(this);this._boundPauseEvent=
this.pause.bind(this);this._buildPagers();this.start();this.goTo(0)},start:function(){this._timer=setInterval(this._boundSlideEvent,5E3);if(this._options.get("pauseOnHover")){this._container.addEvent("mouseenter",this._boundPauseEvent);this._container.addEvent("mouseleave",this._boundPlayEvent)}},pause:function(){clearInterval(this._timer)},stop:function(){clearInterval(this._timer);if(this._options.get("pauseOnHover")){this._container.removeEvent("mouseenter",this._boundPauseEvent);this._container.removeEvent("mouseleave",
this._boundPlayEvent)}},next:function(){this.goTo(this._currentIndex+1)},previous:function(){this.goTo(this._currentIndex-1)},goTo:function(b){if(b>=this._slides.length)b=0;else if(b<0)b=this._slides.length-1;var c=this._slides[this._currentIndex],e=this._slides[b],a=this._container.getSize().x;c.fade("out");e.fade("in");this._currentIndex=b;c=e.retrieve("media-description");(e=parseInt(c.getStyle("margin")))||(e=10);c.setStyles({display:"block",position:"absolute",bottom:e/2+"px",left:e/2+"px",margin:"auto",
width:a-e*2});a=false;if(a=this._options.get("pagerActiveClass")){this._pagerContainer.getChildren().removeClass(a);this._pagerContainer.getChildren(".pager"+b).addClass(a)}},_buildPagers:function(){for(var b=0;b<this._slides.length;b++)this._pagerContainer.adopt(new Element("a",{href:"#",text:b+1,rel:b,"class":"pager"+b,events:{click:function(c){c.stop();this.stop();this.goTo(c.target.get("rel"))}.bind(this)}}))}});Element.implement({slideShow:function(b){new f(this,b);return this}})})();
window.Rose||(Rose={});
(function(){if(!Rose.ui)Rose.ui={};var f=new Class({_options:$H({}),_defaults:$H({slideSelector:"slide",controlSelector:"control",controlContainerSelector:"controls",descriptionSelector:"description",onStart:$empty,onStop:$empty,onNext:$empty,onPrevious:$empty,onTick:$empty}),_container:false,initialize:function(b,c){this._container=b;if(c)this._options=$H(c);this._options.combine(this._defaults)}});Element.implement({multiBox:function(){new f(this);return this}});Rose.ui.multiBox=f})();
var offspring={firstChildClass:"first-child",lastChildClass:"last-child",oddChildClass:"nth-child-odd",evenChildClass:"nth-child-even",onlyChildClass:"only-child",nthChildClassPrefix:"nth-child-",classNamesArray:[],classNameSubstringsArray:[],cacheLevel:0,nthChildren:[],regularHashTable:[],regularHashTableArray:[],lastChildHashTable:[],lastChildHashTableArray:[],configuration:{runningMode:"full",autoStart:true,shouldRemoveOldOffspringClassesFirst:false},init:function(){if(typeof offspringConfiguration!=
"undefined"){for(var f in offspringConfiguration)this.configuration[f]=offspringConfiguration[f];this.configuration.runningMode=this.configuration.runningMode.toLowerCase()}switch(this.configuration.runningMode){case "full":this.classNamesArray=[this.firstChildClass,this.lastChildClass,this.oddChildClass,this.evenChildClass,this.onlyChildClass];this.classNameSubstringsArray=[this.nthChildClassPrefix];break;case "light":this.classNamesArray=[this.firstChildClass,this.lastChildClass,this.onlyChildClass];
this.classNameSubstringsArray=[]}this.defineTraverseChildrenFunction();this.defineFillCacheToFunction();this.fillCacheTo();if(this.configuration.autoStart){var b=this;this.ContentLoaded(window,function(){b.start()})}},start:function(){this.traverseChildren(document.getElementsByTagName("body")[0])},defineTraverseChildrenFunction:function(){switch(this.configuration.shouldRemoveOldOffspringClassesFirst){case true:switch(this.configuration.runningMode){case "full":this.traverseChildren=function(f){if(f.childNodes.length){var b=
[];for(f=f.childNodes[0];f;){f.nodeType==1&&b.push(f);f=f.nextSibling}if(f=b.length){f>this.cacheLevel&&this.fillCacheTo(f);f=f-1;for(var c=0;c<f;c++){var e=b[c];this.removeMultipleClassNames(e,this.classNamesArray,this.classNameSubstringsArray);this._addOffspringClassNames(e,c,false);this.traverseChildren(e)}b=b[f];this.removeMultipleClassNames(b,this.classNamesArray,this.classNameSubstringsArray);this._addOffspringClassNames(b,f,true);this.traverseChildren(b)}}};break;case "light":this.traverseChildren=
function(f){if(f.childNodes.length){var b=[];for(f=f.childNodes[0];f;){f.nodeType==1&&b.push(f);f=f.nextSibling}if(f=b.length){f>this.cacheLevel&&this.fillCacheTo(f);var c=f-1;switch(f){case 0:return;case 1:var e=b[0];this.removeMultipleClassNames(e,this.classNamesArray,this.classNameSubstringsArray);this._addOffspringClassNames(e,c,true);break;default:e=b[0];this.removeMultipleClassNames(e,this.classNamesArray,this.classNameSubstringsArray);this._addOffspringClassNames(e,0,false);e=b[c];this.removeMultipleClassNames(e,
this.classNamesArray,this.classNameSubstringsArray);this._addOffspringClassNames(e,c,true)}for(c=0;c<f;c++)this.traverseChildren(b[c])}}}}break;case false:switch(this.configuration.runningMode){case "full":this.traverseChildren=function(f){if(f.childNodes.length){var b=[];for(f=f.childNodes[0];f;){f.nodeType==1&&b.push(f);f=f.nextSibling}if(f=b.length){f>this.cacheLevel&&this.fillCacheTo(f);f=f-1;for(var c=0;c<f;c++){var e=b[c];this._addOffspringClassNames(e,c,false);this.traverseChildren(e)}b=b[f];
this._addOffspringClassNames(b,f,true);this.traverseChildren(b)}}};break;case "light":this.traverseChildren=function(f){if(f.childNodes.length){var b=[];for(f=f.childNodes[0];f;){f.nodeType==1&&b.push(f);f=f.nextSibling}if(f=b.length){f>this.cacheLevel&&this.fillCacheTo(f);var c=f-1;switch(f){case 0:break;case 1:this._addOffspringClassNames(b[0],c,true);for(c=0;c<f;c++)this.traverseChildren(b[c]);break;default:this._addOffspringClassNames(b[0],0,false);this._addOffspringClassNames(b[c],c,true);for(c=
0;c<f;c++)this.traverseChildren(b[c])}lastElement=null}}}}}},traverseChildren:function(f){if(f.childNodes.length){var b=[];for(f=f.childNodes[0];f;){f.nodeType==1&&b.push(f);f=f.nextSibling}if(f=b.length){f>this.cacheLevel&&this.fillCacheTo(f);this._childrenIterator(b,f,f-1);lastElement=null}}},_addOffspringClassNames:function(f,b,c){b++;if(!f.className||!f.className.length)switch(c){case false:f.className=this.regularHashTable[b];return;case true:f.className=this.lastChildHashTable[b];return}switch(c){case false:var e=
this.regularHashTableArray[b];break;case true:e=this.lastChildHashTableArray[b]}b=f.className.split(" ");c=0;for(var a=e.length;c<a;c++){for(var d=false,g=e[c],h=0,i=b.length;h<i;h++)if(b[h]==g){d=true;break}d||b.push(g)}f.className=b.join(" ")},defineFillCacheToFunction:function(){switch(this.configuration.runningMode){case "full":this.fillCacheTo=function(f){f=f||15;if(!this.cacheLevel)this.cacheLevel=0;if(!(this.cacheLevel>=f)){var b=this.cacheLevel++,c=b%2!=0,e=this.firstChildClass,a=this.lastChildClass,
d=this.oddChildClass,g=this.evenChildClass,h=this.onlyChildClass,i=this.nthChildClassPrefix;for(b=b;b<=f;b++){this.nthChildren[b]=[i,b].join("");var j=this.nthChildren[b];switch(b){case 1:this.regularHashTableArray[b]=[e,d,j];this.lastChildHashTableArray[b]=[e,d,h,j,a];break;default:switch(c){case true:this.regularHashTableArray[b]=[d,j];this.lastChildHashTableArray[b]=[d,j,a];break;case false:this.regularHashTableArray[b]=[g,j];this.lastChildHashTableArray[b]=[g,j,a]}}this.regularHashTable[b]=this.regularHashTableArray[b].join(" ");
this.lastChildHashTable[b]=this.lastChildHashTableArray[b].join(" ");c=!c}this.cacheLevel=f}};break;case "light":this.fillCacheTo=function(f){f=f||15;if(!this.cacheLevel)this.cacheLevel=0;if(!(this.cacheLevel>=f)){for(var b=this.firstChildClass,c=this.lastChildClass,e=this.onlyChildClass,a=this.cacheLevel++;a<=f;a++){switch(a){case 1:this.regularHashTableArray[a]=[b];this.lastChildHashTableArray[a]=[b,e,c];break;default:this.regularHashTableArray[a]=[];this.lastChildHashTableArray[a]=[c]}this.regularHashTable[a]=
this.regularHashTableArray[a].join(" ");this.lastChildHashTable[a]=this.lastChildHashTableArray[a].join(" ")}this.cacheLevel=f}}}},fillCacheTo:function(f){f=f||15;if(!this.cacheLevel)this.cacheLevel=0;if(!(this.cacheLevel>=f)){this._fillCacheToIterator(this.cacheLevel++,f);this.cacheLevel=f}},_checkIfStringFoundInArray:function(f,b){for(var c=0,e=b.length;c<e;c++)if(f==b[c])return true;return false},_checkIfStringMatchInSubstringArray:function(f,b){for(var c=0,e=b.length;c<e;c++){var a=b[c];if(f.substr(0,
a.length)==a)return true}return false},removeMultipleClassNames:function(f,b,c){if(f){for(var e="",a=f.className.split(" "),d=0,g=a.length;d<g;d++){var h=a[d];if(!this._checkIfStringFoundInArray(h,b))if(!this._checkIfStringMatchInSubstringArray(h,c)){if(d>0)e+=" ";e+=h}}f.className=e}},ContentLoaded:function(f,b){function c(g){if(!arguments.callee.done){arguments.callee.done=true;b(g)}}var e=f.document,a=f.navigator.userAgent.toLowerCase();if(/khtml|webkit/.test(a))(function(){/complete|loaded/.test(e.readyState)?
c("poll"):setTimeout(arguments.callee,10)})();else if(/msie/.test(a)&&!f.opera){(function(){try{e.documentElement.doScroll("left")}catch(g){setTimeout(arguments.callee,10);return}c("poll")})();e.attachEvent("onreadystatechange",function(g){if(e.readyState=="complete"){e.detachEvent("on"+g.type,arguments.callee);c(g.type)}})}else if(e.addEventListener&&/gecko/.test(a)&&parseFloat(a.split("rv:")[1])>=1.8||/opera/.test(a)&&parseFloat(a.split("opera ")[1])>9)e.addEventListener("DOMContentLoaded",function(g){this.removeEventListener(g.type,
arguments.callee,false);c(g.type)},false);else{var d=f.onload;f.onload=function(g){if(typeof d=="function")d(g||f.event);c((g||f.event).type)}}}};offspring.init();
(function(f,b){var c=f.document;(function(){var a=false,d=/xyz/.test(function(){})?/\b_super\b/:/.*/;this.JRClass=function(){};JRClass.extend=function(g){function h(){!a&&this.init&&this.init.apply(this,arguments)}var i=this.prototype;a=true;var j=new this;a=false;for(var k in g)j[k]=typeof g[k]=="function"&&typeof i[k]=="function"&&d.test(g[k])?function(l,m){return function(){var n=this._super;this._super=i[l];var o=m.apply(this,arguments);this._super=n;return o}}(k,g[k]):g[k];h.prototype=j;h.constructor=
h;h.extend=arguments.callee;return h}})();var e=JRClass.extend({init:function(a,d){this.video=typeof a=="string"?c.getElementById(a):a;this.video.player=this;this.values={};this.elements={};this.options={autoplay:false,preload:true,useBuiltInControls:false,controlsBelow:false,controlsAtStart:false,controlsHiding:true,defaultVolume:0.85,playerFallbackOrder:["html5","flash","links"],flashPlayer:"htmlObject",flashPlayerVersion:false};typeof e.options=="object"&&_V_.merge(this.options,e.options);typeof d==
"object"&&_V_.merge(this.options,d);if(this.getPreloadAttribute()!==b)this.options.preload=this.getPreloadAttribute();if(this.getAutoplayAttribute()!==b)this.options.autoplay=this.getAutoplayAttribute();this.box=this.video.parentNode;this.linksFallback=this.getLinksFallback();this.hideLinksFallback();this.each(this.options.playerFallbackOrder,function(g){if(this[g+"Supported"]()){this[g+"Init"]();return true}});this.activateElement(this,"player");this.activateElement(this.box,"box")},behaviors:{},
newBehavior:function(a,d,g){this.behaviors[a]=d;this.extend(g)},activateElement:function(a,d){if(typeof a=="string")a=c.getElementById(a);this.behaviors[d].call(this,a)},errors:[],warnings:[],warning:function(a){this.warnings.push(a);this.log(a)},history:[],log:function(a){if(a){if(typeof a=="string")a={type:a};a.type&&this.history.push(a.type);this.history.length>=50&&this.history.shift();try{console.log(a.type)}catch(d){try{opera.postError(a.type)}catch(g){}}}},setLocalStorage:function(a,d){if(localStorage)try{localStorage[a]=
d}catch(g){if(g.code==22||g.code==1014)this.warning(e.warnings.localStorageFull)}},getPreloadAttribute:function(){if(typeof this.video.hasAttribute=="function"&&this.video.hasAttribute("preload")){var a=this.video.getAttribute("preload");if(a===""||a==="true")return"auto";if(a==="false")return"none";return a}},getAutoplayAttribute:function(){if(typeof this.video.hasAttribute=="function"&&this.video.hasAttribute("autoplay")){if(this.video.getAttribute("autoplay")==="false")return false;return true}},
bufferedPercent:function(){return this.duration()?this.buffered()[1]/this.duration():0},each:function(a,d){if(!(!a||a.length===0))for(var g=0,h=a.length;g<h;g++)if(d.call(this,a[g],g))break},extend:function(a){for(var d in a)if(a.hasOwnProperty(d))this[d]=a[d]}});e.player=e.prototype;e.player.extend({flashSupported:function(){if(!this.flashElement)this.flashElement=this.getFlashElement();return this.flashElement&&this.flashPlayerVersionSupported()?true:false},flashInit:function(){this.replaceWithFlash();
this.element=this.flashElement;this.video.src="";var a=e.flashPlayers[this.options.flashPlayer];this.extend(e.flashPlayers[this.options.flashPlayer].api);a.init.context(this)()},getFlashElement:function(){for(var a=this.video.children,d=0,g=a.length;d<g;d++)if(a[d].className=="vjs-flash-fallback")return a[d]},replaceWithFlash:function(){if(this.flashElement){this.box.insertBefore(this.flashElement,this.video);this.video.style.display="none"}},flashPlayerVersionSupported:function(){var a=this.options.flashPlayerVersion?
this.options.flashPlayerVersion:e.flashPlayers[this.options.flashPlayer].flashPlayerVersion;return e.getFlashVersion()>=a}});e.flashPlayers={};e.flashPlayers.htmlObject={flashPlayerVersion:9,init:function(){return true},api:{width:function(a){if(a!==b){this.element.width=a;this.box.style.width=a+"px";this.triggerResizeListeners();return this}return this.element.width},height:function(a){if(a!==b){this.element.height=a;this.box.style.height=a+"px";this.triggerResizeListeners();return this}return this.element.height}}};
e.player.extend({linksSupported:function(){return true},linksInit:function(){this.showLinksFallback();this.element=this.video},getLinksFallback:function(){return this.box.getElementsByTagName("P")[0]},hideLinksFallback:function(){if(this.linksFallback)this.linksFallback.style.display="none"},showLinksFallback:function(){if(this.linksFallback)this.linksFallback.style.display="block"}});e.merge=function(a,d,g){for(var h in d)if(d.hasOwnProperty(h)&&(!g||!a.hasOwnProperty(h)))a[h]=d[h];return a};e.extend=
function(a){this.merge(this,a,true)};e.extend({setupAllWhenReady:function(a){e.options=a;e.DOMReady(e.setup)},DOMReady:function(a){e.addToDOMReady(a)},setup:function(a,d){var g=false,h=[],i;if(!a||a=="All")a=e.getVideoJSTags();else if(typeof a!="object"||a.nodeType==1){a=[a];g=true}for(var j=0;j<a.length;j++){i=typeof a[j]=="string"?c.getElementById(a[j]):a[j];h.push(new e(i,d))}return g?h[0]:h},getVideoJSTags:function(){for(var a=c.getElementsByTagName("video"),d=[],g,h=0,i=a.length;h<i;h++){g=a[h];
g.className.indexOf("video-js")!=-1&&d.push(g)}return d},browserSupportsVideo:function(){if(typeof e.videoSupport!="undefined")return e.videoSupport;e.videoSupport=!!c.createElement("video").canPlayType;return e.videoSupport},getFlashVersion:function(){if(typeof e.flashVersion!="undefined")return e.flashVersion;var a=0,d;if(typeof navigator.plugins!="undefined"&&typeof navigator.plugins["Shockwave Flash"]=="object"){if((d=navigator.plugins["Shockwave Flash"].description)&&!(typeof navigator.mimeTypes!=
"undefined"&&navigator.mimeTypes["application/x-shockwave-flash"]&&!navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin))a=parseInt(d.match(/^.*\s+([^\s]+)\.[^\s]+\s+[^\s]+$/)[1],10)}else if(typeof f.ActiveXObject!="undefined")try{if(d=new ActiveXObject("ShockwaveFlash.ShockwaveFlash"))a=parseInt(d.GetVariable("$version").match(/^[^\s]+\s(\d+)/)[1],10)}catch(g){}e.flashVersion=a;return e.flashVersion},isIE:function(){return!+"\u000b1"},isIPad:function(){return navigator.userAgent.match(/iPad/i)!==
null},isIPhone:function(){return navigator.userAgent.match(/iPhone/i)!==null},isIOS:function(){return e.isIPhone()||e.isIPad()},iOSVersion:function(){var a=navigator.userAgent.match(/OS (\d+)_/i);if(a&&a[1])return a[1]},isAndroid:function(){return navigator.userAgent.match(/Android/i)!==null},androidVersion:function(){var a=navigator.userAgent.match(/Android (\d+)\./i);if(a&&a[1])return a[1]},warnings:{videoNotReady:"Video is not ready yet (try playing the video first).",localStorageFull:"Local Storage is Full"}});
e.isIE()&&c.createElement("video");f.VideoJS=f._V_=e;e.player.extend({html5Supported:function(){return e.browserSupportsVideo()&&this.canPlaySource()?true:false},html5Init:function(){this.element=this.video;this.fixPreloading();this.supportProgressEvents();this.volume(localStorage&&localStorage.volume||this.options.defaultVolume);if(e.isIOS()){this.options.useBuiltInControls=true;this.iOSInterface()}else if(e.isAndroid()){this.options.useBuiltInControls=true;this.androidInterface()}if(!this.options.useBuiltInControls){this.video.controls=
false;this.options.controlsBelow&&_V_.addClass(this.box,"vjs-controls-below");this.activateElement(this.video,"playToggle");this.buildStylesCheckDiv();this.buildAndActivatePoster();this.buildBigPlayButton();this.buildAndActivateSpinner();this.buildAndActivateControlBar();this.loadInterface();this.getSubtitles()}},canPlaySource:function(){if(this.canPlaySourceResult)return this.canPlaySourceResult;for(var a=this.video.children,d=0,g=a.length;d<g;d++)if(a[d].tagName.toUpperCase()=="SOURCE"){var h=this.video.canPlayType(a[d].type)||
this.canPlayExt(a[d].src);if(h=="probably"||h=="maybe"){this.firstPlayableSource=a[d];return this.canPlaySourceResult=true}}return this.canPlaySourceResult=false},canPlayExt:function(a){if(!a)return"";if((a=a.match(/\.([^\.]+)$/))&&a[1]){a=a[1].toLowerCase();if(e.isAndroid()){if(a=="mp4"||a=="m4v")return"maybe"}else if(e.isIOS())if(a=="m3u8")return"maybe"}return""},forceTheSource:function(){this.video.src=this.firstPlayableSource.src;this.video.load()},fixPreloading:function(){if(typeof this.video.hasAttribute==
"function"&&this.video.hasAttribute("preload")&&this.video.preload!="none")this.video.autobuffer=true;else{this.video.autobuffer=false;this.video.preload="none"}},supportProgressEvents:function(){_V_.addListener(this.video,"progress",this.playerOnVideoProgress.context(this))},playerOnVideoProgress:function(a){this.setBufferedFromProgress(a)},setBufferedFromProgress:function(a){if(a.total>0){a=a.loaded/a.total*this.duration();if(a>this.values.bufferEnd)this.values.bufferEnd=a}},iOSInterface:function(){e.iOSVersion()<
4&&this.forceTheSource();e.isIPad()&&this.buildAndActivateSpinner()},androidInterface:function(){this.forceTheSource();_V_.addListener(this.video,"click",function(){this.play()});this.buildBigPlayButton();_V_.addListener(this.bigPlayButton,"click",function(){this.play()}.context(this));this.positionBox();this.showBigPlayButtons()},loadInterface:function(){if(!this.stylesHaveLoaded()){if(!this.positionRetries)this.positionRetries=1;if(this.positionRetries++<100){setTimeout(this.loadInterface.context(this),
10);return}}this.hideStylesCheckDiv();this.showPoster();this.video.paused!==false&&this.showBigPlayButtons();this.options.controlsAtStart&&this.showControlBars();this.positionAll()},buildAndActivateControlBar:function(){this.controls=_V_.createElement("div",{className:"vjs-controls"});this.box.appendChild(this.controls);this.activateElement(this.controls,"controlBar");this.activateElement(this.controls,"mouseOverVideoReporter");this.playControl=_V_.createElement("div",{className:"vjs-play-control",
innerHTML:"<span></span>"});this.controls.appendChild(this.playControl);this.activateElement(this.playControl,"playToggle");this.progressControl=_V_.createElement("div",{className:"vjs-progress-control"});this.controls.appendChild(this.progressControl);this.progressHolder=_V_.createElement("div",{className:"vjs-progress-holder"});this.progressControl.appendChild(this.progressHolder);this.activateElement(this.progressHolder,"currentTimeScrubber");this.loadProgressBar=_V_.createElement("div",{className:"vjs-load-progress"});
this.progressHolder.appendChild(this.loadProgressBar);this.activateElement(this.loadProgressBar,"loadProgressBar");this.playProgressBar=_V_.createElement("div",{className:"vjs-play-progress"});this.progressHolder.appendChild(this.playProgressBar);this.activateElement(this.playProgressBar,"playProgressBar");this.timeControl=_V_.createElement("div",{className:"vjs-time-control"});this.controls.appendChild(this.timeControl);this.currentTimeDisplay=_V_.createElement("span",{className:"vjs-current-time-display",
innerHTML:"00:00"});this.timeControl.appendChild(this.currentTimeDisplay);this.activateElement(this.currentTimeDisplay,"currentTimeDisplay");this.timeSeparator=_V_.createElement("span",{innerHTML:" / "});this.timeControl.appendChild(this.timeSeparator);this.durationDisplay=_V_.createElement("span",{className:"vjs-duration-display",innerHTML:"00:00"});this.timeControl.appendChild(this.durationDisplay);this.activateElement(this.durationDisplay,"durationDisplay");this.volumeControl=_V_.createElement("div",
{className:"vjs-volume-control",innerHTML:"<div><span></span><span></span><span></span><span></span><span></span><span></span></div>"});this.controls.appendChild(this.volumeControl);this.activateElement(this.volumeControl,"volumeScrubber");this.volumeDisplay=this.volumeControl.children[0];this.activateElement(this.volumeDisplay,"volumeDisplay");this.fullscreenControl=_V_.createElement("div",{className:"vjs-fullscreen-control",innerHTML:"<div><span></span><span></span><span></span><span></span></div>"});
this.controls.appendChild(this.fullscreenControl);this.activateElement(this.fullscreenControl,"fullscreenToggle")},buildAndActivatePoster:function(){this.updatePosterSource();if(this.video.poster){this.poster=c.createElement("img");this.box.appendChild(this.poster);this.poster.src=this.video.poster;this.poster.className="vjs-poster";this.activateElement(this.poster,"poster")}else this.poster=false},buildBigPlayButton:function(){this.bigPlayButton=_V_.createElement("div",{className:"vjs-big-play-button",
innerHTML:"<span></span>"});this.box.appendChild(this.bigPlayButton);this.activateElement(this.bigPlayButton,"bigPlayButton")},buildAndActivateSpinner:function(){this.spinner=_V_.createElement("div",{className:"vjs-spinner",innerHTML:"<div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div>"});this.box.appendChild(this.spinner);this.activateElement(this.spinner,"spinner")},buildStylesCheckDiv:function(){this.stylesCheckDiv=_V_.createElement("div",{className:"vjs-styles-check"});
this.stylesCheckDiv.style.position="absolute";this.box.appendChild(this.stylesCheckDiv)},hideStylesCheckDiv:function(){this.stylesCheckDiv.style.display="none"},stylesHaveLoaded:function(){return this.stylesCheckDiv.offsetHeight!=5?false:true},positionAll:function(){this.positionBox();this.positionControlBars();this.positionPoster()},positionBox:function(){if(this.videoIsFullScreen){this.box.style.width="";this.element.style.height="";if(this.options.controlsBelow){this.box.style.height="";this.element.style.height=
this.box.offsetHeight-this.controls.offsetHeight+"px"}}else{this.box.style.width=this.width()+"px";this.element.style.height=this.height()+"px";if(this.options.controlsBelow)this.element.style.height=""}},getSubtitles:function(){for(var a=this.video.getElementsByTagName("TRACK"),d=0,g=a.length;d<g;d++)if(a[d].getAttribute("kind")=="subtitles"&&a[d].getAttribute("src")){this.subtitlesSource=a[d].getAttribute("src");this.loadSubtitles();this.buildSubtitles()}},loadSubtitles:function(){_V_.get(this.subtitlesSource,
this.parseSubtitles.context(this))},parseSubtitles:function(a){a=a.split("\n");var d="",g,h;this.subtitles=[];this.currentSubtitle=false;for(var i=this.lastSubtitleIndex=0;i<a.length;i++)if(d=_V_.trim(a[i])){g={id:d,index:this.subtitles.length};d=_V_.trim(a[++i]);d=d.split(" --\> ");g.start=this.parseSubtitleTime(d[0]);g.end=this.parseSubtitleTime(d[1]);h=[];for(var j=i;j<a.length;j++){d=_V_.trim(a[++i]);if(!d)break;h.push(d)}g.text=h.join("<br/>");this.subtitles.push(g)}},parseSubtitleTime:function(a){var d=
a.split(":");a=0;a+=parseFloat(d[0])*60*60;a+=parseFloat(d[1])*60;d=d[2].split(/\.|,/);a+=parseFloat(d[0]);if(ms=parseFloat(d[1]))a+=ms/1E3;return a},buildSubtitles:function(){this.subtitlesDisplay=_V_.createElement("div",{className:"vjs-subtitles"});this.box.appendChild(this.subtitlesDisplay);this.activateElement(this.subtitlesDisplay,"subtitlesDisplay")},addVideoListener:function(a,d){_V_.addListener(this.video,a,d.rEvtContext(this))},play:function(){this.video.play();return this},onPlay:function(a){this.addVideoListener("play",
a);return this},pause:function(){this.video.pause();return this},onPause:function(a){this.addVideoListener("pause",a);return this},paused:function(){return this.video.paused},currentTime:function(a){if(a!==b){try{this.video.currentTime=a}catch(d){this.warning(e.warnings.videoNotReady)}this.values.currentTime=a;return this}return this.video.currentTime},onCurrentTimeUpdate:function(a){this.currentTimeListeners.push(a)},duration:function(){return this.video.duration},buffered:function(){if(this.values.bufferStart===
b){this.values.bufferStart=0;this.values.bufferEnd=0}if(this.video.buffered&&this.video.buffered.length>0){var a=this.video.buffered.end(0);if(a>this.values.bufferEnd)this.values.bufferEnd=a}return[this.values.bufferStart,this.values.bufferEnd]},volume:function(a){if(a!==b){this.values.volume=Math.max(0,Math.min(1,parseFloat(a)));this.video.volume=this.values.volume;this.setLocalStorage("volume",this.values.volume);return this}if(this.values.volume)return this.values.volume;return this.video.volume},
onVolumeChange:function(a){_V_.addListener(this.video,"volumechange",a.rEvtContext(this))},width:function(a){if(a!==b){this.video.width=a;this.box.style.width=a+"px";this.triggerResizeListeners();return this}return this.video.offsetWidth},height:function(a){if(a!==b){this.video.height=a;this.box.style.height=a+"px";this.triggerResizeListeners();return this}return this.video.offsetHeight},supportsFullScreen:function(){if(typeof this.video.webkitEnterFullScreen=="function")if(!navigator.userAgent.match("Chrome")&&
!navigator.userAgent.match("Mac OS X 10.5"))return true;return false},html5EnterNativeFullScreen:function(){try{this.video.webkitEnterFullScreen()}catch(a){a.code==11&&this.warning(e.warnings.videoNotReady)}return this},enterFullScreen:function(){this.supportsFullScreen()?this.html5EnterNativeFullScreen():this.enterFullWindow()},exitFullScreen:function(){this.supportsFullScreen()||this.exitFullWindow()},enterFullWindow:function(){this.videoIsFullScreen=true;this.docOrigOverflow=c.documentElement.style.overflow;
_V_.addListener(c,"keydown",this.fullscreenOnEscKey.rEvtContext(this));_V_.addListener(f,"resize",this.fullscreenOnWindowResize.rEvtContext(this));c.documentElement.style.overflow="hidden";_V_.addClass(this.box,"vjs-fullscreen");this.positionAll()},exitFullWindow:function(){this.videoIsFullScreen=false;c.removeEventListener("keydown",this.fullscreenOnEscKey,false);f.removeEventListener("resize",this.fullscreenOnWindowResize,false);c.documentElement.style.overflow=this.docOrigOverflow;_V_.removeClass(this.box,
"vjs-fullscreen");this.positionAll()},onError:function(a){this.addVideoListener("error",a);return this},onEnded:function(a){this.addVideoListener("ended",a);return this}});e.player.newBehavior("player",function(){this.onError(this.playerOnVideoError);this.onPlay(this.playerOnVideoPlay);this.onPlay(this.trackCurrentTime);this.onPause(this.playerOnVideoPause);this.onPause(this.stopTrackingCurrentTime);this.onEnded(this.playerOnVideoEnded);this.trackBuffered();this.onBufferedUpdate(this.isBufferFull)},
{playerOnVideoError:function(a){this.log(a);this.log(this.video.error)},playerOnVideoPlay:function(){this.hasPlayed=true},playerOnVideoPause:function(){},playerOnVideoEnded:function(){this.currentTime(0);this.pause()},trackBuffered:function(){this.bufferedInterval=setInterval(this.triggerBufferedListeners.context(this),500)},stopTrackingBuffered:function(){clearInterval(this.bufferedInterval)},bufferedListeners:[],onBufferedUpdate:function(a){this.bufferedListeners.push(a)},triggerBufferedListeners:function(){this.isBufferFull();
this.each(this.bufferedListeners,function(a){a.context(this)()})},isBufferFull:function(){this.bufferedPercent()==1&&this.stopTrackingBuffered()},trackCurrentTime:function(){this.currentTimeInterval&&clearInterval(this.currentTimeInterval);this.currentTimeInterval=setInterval(this.triggerCurrentTimeListeners.context(this),100);this.trackingCurrentTime=true},stopTrackingCurrentTime:function(){clearInterval(this.currentTimeInterval);this.trackingCurrentTime=false},currentTimeListeners:[],triggerCurrentTimeListeners:function(a,
d){this.each(this.currentTimeListeners,function(g){g.context(this)(d||this.currentTime())})},resizeListeners:[],onResize:function(a){this.resizeListeners.push(a)},triggerResizeListeners:function(){this.each(this.resizeListeners,function(a){a.context(this)()})}});e.player.newBehavior("mouseOverVideoReporter",function(a){_V_.addListener(a,"mousemove",this.mouseOverVideoReporterOnMouseMove.context(this));_V_.addListener(a,"mouseout",this.mouseOverVideoReporterOnMouseOut.context(this))},{mouseOverVideoReporterOnMouseMove:function(){this.showControlBars();
clearInterval(this.mouseMoveTimeout);this.mouseMoveTimeout=setTimeout(this.hideControlBars.context(this),4E3)},mouseOverVideoReporterOnMouseOut:function(a){for(a=a.relatedTarget;a&&a!==this.box;)a=a.parentNode;a!==this.box&&this.hideControlBars()}});e.player.newBehavior("box",function(a){this.positionBox();_V_.addClass(a,"vjs-paused");this.activateElement(a,"mouseOverVideoReporter");this.onPlay(this.boxOnVideoPlay);this.onPause(this.boxOnVideoPause)},{boxOnVideoPlay:function(){_V_.removeClass(this.box,
"vjs-paused");_V_.addClass(this.box,"vjs-playing")},boxOnVideoPause:function(){_V_.removeClass(this.box,"vjs-playing");_V_.addClass(this.box,"vjs-paused")}});e.player.newBehavior("poster",function(a){this.activateElement(a,"mouseOverVideoReporter");this.activateElement(a,"playButton");this.onPlay(this.hidePoster);this.onEnded(this.showPoster);this.onResize(this.positionPoster)},{showPoster:function(){if(this.poster){this.poster.style.display="block";this.positionPoster()}},positionPoster:function(){if(!(!this.poster||
this.poster.style.display=="none")){this.poster.style.height=this.height()+"px";this.poster.style.width=this.width()+"px"}},hidePoster:function(){if(this.poster)this.poster.style.display="none"},updatePosterSource:function(){if(!this.video.poster){var a=this.video.getElementsByTagName("img");if(a.length>0)this.video.poster=a[0].src}}});e.player.newBehavior("controlBar",function(a){if(!this.controlBars){this.controlBars=[];this.onResize(this.positionControlBars)}this.controlBars.push(a);_V_.addListener(a,
"mousemove",this.onControlBarsMouseMove.context(this));_V_.addListener(a,"mouseout",this.onControlBarsMouseOut.context(this))},{showControlBars:function(){if(this.options.controlsAtStart||this.hasPlayed)this.each(this.controlBars,function(a){a.style.display="block"})},positionControlBars:function(){this.updatePlayProgressBars();this.updateLoadProgressBars()},hideControlBars:function(){this.options.controlsHiding&&!this.mouseIsOverControls&&this.each(this.controlBars,function(a){a.style.display="none"})},
onControlBarsMouseMove:function(){this.mouseIsOverControls=true},onControlBarsMouseOut:function(){this.mouseIsOverControls=false}});e.player.newBehavior("playToggle",function(a){if(!this.elements.playToggles){this.elements.playToggles=[];this.onPlay(this.playTogglesOnPlay);this.onPause(this.playTogglesOnPause)}this.elements.playToggles.push(a);_V_.addListener(a,"click",this.onPlayToggleClick.context(this))},{onPlayToggleClick:function(){this.paused()?this.play():this.pause()},playTogglesOnPlay:function(){this.each(this.elements.playToggles,
function(a){_V_.removeClass(a,"vjs-paused");_V_.addClass(a,"vjs-playing")})},playTogglesOnPause:function(){this.each(this.elements.playToggles,function(a){_V_.removeClass(a,"vjs-playing");_V_.addClass(a,"vjs-paused")})}});e.player.newBehavior("playButton",function(a){_V_.addListener(a,"click",this.onPlayButtonClick.context(this))},{onPlayButtonClick:function(){this.play()}});e.player.newBehavior("pauseButton",function(a){_V_.addListener(a,"click",this.onPauseButtonClick.context(this))},{onPauseButtonClick:function(){this.pause()}});
e.player.newBehavior("playProgressBar",function(a){if(!this.playProgressBars){this.playProgressBars=[];this.onCurrentTimeUpdate(this.updatePlayProgressBars)}this.playProgressBars.push(a)},{updatePlayProgressBars:function(a){var d=a!==b?a/this.duration():this.currentTime()/this.duration();if(isNaN(d))d=0;this.each(this.playProgressBars,function(g){if(g.style)g.style.width=_V_.round(d*100,2)+"%"})}});e.player.newBehavior("loadProgressBar",function(a){if(!this.loadProgressBars)this.loadProgressBars=
[];this.loadProgressBars.push(a);this.onBufferedUpdate(this.updateLoadProgressBars)},{updateLoadProgressBars:function(){this.each(this.loadProgressBars,function(a){if(a.style)a.style.width=_V_.round(this.bufferedPercent()*100,2)+"%"})}});e.player.newBehavior("currentTimeDisplay",function(a){if(!this.currentTimeDisplays){this.currentTimeDisplays=[];this.onCurrentTimeUpdate(this.updateCurrentTimeDisplays)}this.currentTimeDisplays.push(a)},{updateCurrentTimeDisplays:function(a){if(this.currentTimeDisplays){var d=
a?a:this.currentTime();this.each(this.currentTimeDisplays,function(g){g.innerHTML=_V_.formatTime(d)})}}});e.player.newBehavior("durationDisplay",function(a){if(!this.durationDisplays){this.durationDisplays=[];this.onCurrentTimeUpdate(this.updateDurationDisplays)}this.durationDisplays.push(a)},{updateDurationDisplays:function(){this.durationDisplays&&this.each(this.durationDisplays,function(a){if(this.duration())a.innerHTML=_V_.formatTime(this.duration())})}});e.player.newBehavior("currentTimeScrubber",
function(a){_V_.addListener(a,"mousedown",this.onCurrentTimeScrubberMouseDown.rEvtContext(this))},{onCurrentTimeScrubberMouseDown:function(a,d){a.preventDefault();this.currentScrubber=d;this.stopTrackingCurrentTime();this.videoWasPlaying=!this.paused();this.pause();_V_.blockTextSelection();this.setCurrentTimeWithScrubber(a);_V_.addListener(c,"mousemove",this.onCurrentTimeScrubberMouseMove.rEvtContext(this));_V_.addListener(c,"mouseup",this.onCurrentTimeScrubberMouseUp.rEvtContext(this))},onCurrentTimeScrubberMouseMove:function(a){this.setCurrentTimeWithScrubber(a)},
onCurrentTimeScrubberMouseUp:function(){_V_.unblockTextSelection();c.removeEventListener("mousemove",this.onCurrentTimeScrubberMouseMove,false);c.removeEventListener("mouseup",this.onCurrentTimeScrubberMouseUp,false);if(this.videoWasPlaying){this.play();this.trackCurrentTime()}},setCurrentTimeWithScrubber:function(a){a=_V_.getRelativePosition(a.pageX,this.currentScrubber)*this.duration();this.triggerCurrentTimeListeners(0,a);if(a==this.duration())a-=0.1;this.currentTime(a)}});e.player.newBehavior("volumeDisplay",
function(a){if(!this.volumeDisplays){this.volumeDisplays=[];this.onVolumeChange(this.updateVolumeDisplays)}this.volumeDisplays.push(a);this.updateVolumeDisplay(a)},{updateVolumeDisplays:function(){this.volumeDisplays&&this.each(this.volumeDisplays,function(a){this.updateVolumeDisplay(a)})},updateVolumeDisplay:function(a){var d=Math.ceil(this.volume()*6);this.each(a.children,function(g,h){h<d?_V_.addClass(g,"vjs-volume-level-on"):_V_.removeClass(g,"vjs-volume-level-on")})}});e.player.newBehavior("volumeScrubber",
function(a){_V_.addListener(a,"mousedown",this.onVolumeScrubberMouseDown.rEvtContext(this))},{onVolumeScrubberMouseDown:function(a,d){_V_.blockTextSelection();this.currentScrubber=d;this.setVolumeWithScrubber(a);_V_.addListener(c,"mousemove",this.onVolumeScrubberMouseMove.rEvtContext(this));_V_.addListener(c,"mouseup",this.onVolumeScrubberMouseUp.rEvtContext(this))},onVolumeScrubberMouseMove:function(a){this.setVolumeWithScrubber(a)},onVolumeScrubberMouseUp:function(a){this.setVolumeWithScrubber(a);
_V_.unblockTextSelection();c.removeEventListener("mousemove",this.onVolumeScrubberMouseMove,false);c.removeEventListener("mouseup",this.onVolumeScrubberMouseUp,false)},setVolumeWithScrubber:function(a){this.volume(_V_.getRelativePosition(a.pageX,this.currentScrubber))}});e.player.newBehavior("fullscreenToggle",function(a){_V_.addListener(a,"click",this.onFullscreenToggleClick.context(this))},{onFullscreenToggleClick:function(){this.videoIsFullScreen?this.exitFullScreen():this.enterFullScreen()},fullscreenOnWindowResize:function(){this.positionControlBars()},
fullscreenOnEscKey:function(a){a.keyCode==27&&this.exitFullScreen()}});e.player.newBehavior("bigPlayButton",function(a){if(!this.elements.bigPlayButtons){this.elements.bigPlayButtons=[];this.onPlay(this.bigPlayButtonsOnPlay);this.onEnded(this.bigPlayButtonsOnEnded)}this.elements.bigPlayButtons.push(a);this.activateElement(a,"playButton")},{bigPlayButtonsOnPlay:function(){this.hideBigPlayButtons()},bigPlayButtonsOnEnded:function(){this.showBigPlayButtons()},showBigPlayButtons:function(){this.each(this.elements.bigPlayButtons,
function(a){a.style.display="block"})},hideBigPlayButtons:function(){this.each(this.elements.bigPlayButtons,function(a){a.style.display="none"})}});e.player.newBehavior("spinner",function(a){if(!this.spinners){this.spinners=[];_V_.addListener(this.video,"loadeddata",this.spinnersOnVideoLoadedData.context(this));_V_.addListener(this.video,"loadstart",this.spinnersOnVideoLoadStart.context(this));_V_.addListener(this.video,"seeking",this.spinnersOnVideoSeeking.context(this));_V_.addListener(this.video,
"seeked",this.spinnersOnVideoSeeked.context(this));_V_.addListener(this.video,"canplay",this.spinnersOnVideoCanPlay.context(this));_V_.addListener(this.video,"canplaythrough",this.spinnersOnVideoCanPlayThrough.context(this));_V_.addListener(this.video,"waiting",this.spinnersOnVideoWaiting.context(this));_V_.addListener(this.video,"stalled",this.spinnersOnVideoStalled.context(this));_V_.addListener(this.video,"suspend",this.spinnersOnVideoSuspend.context(this));_V_.addListener(this.video,"playing",
this.spinnersOnVideoPlaying.context(this));_V_.addListener(this.video,"timeupdate",this.spinnersOnVideoTimeUpdate.context(this))}this.spinners.push(a)},{showSpinners:function(){this.each(this.spinners,function(a){a.style.display="block"});clearInterval(this.spinnerInterval);this.spinnerInterval=setInterval(this.rotateSpinners.context(this),100)},hideSpinners:function(){this.each(this.spinners,function(a){a.style.display="none"});clearInterval(this.spinnerInterval)},spinnersRotated:0,rotateSpinners:function(){this.each(this.spinners,
function(a){a.style.WebkitTransform="scale(0.5) rotate("+this.spinnersRotated+"deg)";a.style.MozTransform="scale(0.5) rotate("+this.spinnersRotated+"deg)"});if(this.spinnersRotated==360)this.spinnersRotated=0;this.spinnersRotated+=45},spinnersOnVideoLoadedData:function(){this.hideSpinners()},spinnersOnVideoLoadStart:function(){this.showSpinners()},spinnersOnVideoSeeking:function(){},spinnersOnVideoSeeked:function(){},spinnersOnVideoCanPlay:function(){},spinnersOnVideoCanPlayThrough:function(){this.hideSpinners()},
spinnersOnVideoWaiting:function(){this.showSpinners()},spinnersOnVideoStalled:function(){},spinnersOnVideoSuspend:function(){},spinnersOnVideoPlaying:function(){this.hideSpinners()},spinnersOnVideoTimeUpdate:function(){this.spinner.style.display=="block"&&this.hideSpinners()}});e.player.newBehavior("subtitlesDisplay",function(a){if(!this.subtitleDisplays){this.subtitleDisplays=[];this.onCurrentTimeUpdate(this.subtitleDisplaysOnVideoTimeUpdate);this.onEnded(function(){this.lastSubtitleIndex=0}.context(this))}this.subtitleDisplays.push(a)},
{subtitleDisplaysOnVideoTimeUpdate:function(a){if(this.subtitles)if(!this.currentSubtitle||this.currentSubtitle.start>=a||this.currentSubtitle.end<a){for(var d=false,g=this.subtitles[this.lastSubtitleIndex].start>a,h=this.lastSubtitleIndex-g?1:0;;)if(g){if(h<0||this.subtitles[h].end<a)break;if(this.subtitles[h].start<a){d=h;break}h--}else{if(h>=this.subtitles.length||this.subtitles[h].start>a)break;if(this.subtitles[h].end>a){d=h;break}h++}if(d!==false){this.currentSubtitle=this.subtitles[d];this.lastSubtitleIndex=
d;this.updateSubtitleDisplays(this.currentSubtitle.text)}else if(this.currentSubtitle){this.currentSubtitle=false;this.updateSubtitleDisplays("")}}},updateSubtitleDisplays:function(a){this.each(this.subtitleDisplays,function(d){d.innerHTML=a})}});e.extend({addClass:function(a,d){if((" "+a.className+" ").indexOf(" "+d+" ")==-1)a.className=a.className===""?d:a.className+" "+d},removeClass:function(a,d){if(a.className.indexOf(d)!=-1){var g=a.className.split(/\s+/);g.splice(g.lastIndexOf(d),1);a.className=
g.join(" ")}},createElement:function(a,d){return this.merge(c.createElement(a),d)},blockTextSelection:function(){c.body.focus();c.onselectstart=function(){return false}},unblockTextSelection:function(){c.onselectstart=function(){return true}},formatTime:function(a){a=Math.round(a);var d=Math.floor(a/60);d=d>=10?d:"0"+d;a=Math.floor(a%60);a=a>=10?a:"0"+a;return d+":"+a},getRelativePosition:function(a,d){return Math.max(0,Math.min(1,(a-this.findPosX(d))/d.offsetWidth))},findPosX:function(a){for(var d=
a.offsetLeft;a=a.offsetParent;)d+=a.offsetLeft;return d},getComputedStyleValue:function(a,d){return f.getComputedStyle(a,null).getPropertyValue(d)},round:function(a,d){d||(d=0);return Math.round(a*Math.pow(10,d))/Math.pow(10,d)},addListener:function(a,d,g){if(a.addEventListener)a.addEventListener(d,g,false);else a.attachEvent&&a.attachEvent("on"+d,g)},removeListener:function(a,d,g){if(a.removeEventListener)a.removeEventListener(d,g,false);else a.attachEvent&&a.detachEvent("on"+d,g)},get:function(a,
d){if(typeof XMLHttpRequest=="undefined")XMLHttpRequest=function(){try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(h){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(i){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(j){}throw Error("This browser does not support XMLHttpRequest.");};var g=new XMLHttpRequest;g.open("GET",a);g.onreadystatechange=function(){g.readyState==4&&g.status==200&&d(g.responseText)}.context(this);g.send()},trim:function(a){return a.toString().replace(/^\s+/,
"").replace(/\s+$/,"")},bindDOMReady:function(){if(c.readyState==="complete")return e.onDOMReady();if(c.addEventListener){c.addEventListener("DOMContentLoaded",e.DOMContentLoaded,false);f.addEventListener("load",e.onDOMReady,false)}else if(c.attachEvent){c.attachEvent("onreadystatechange",e.DOMContentLoaded);f.attachEvent("onload",e.onDOMReady)}},DOMContentLoaded:function(){if(c.addEventListener){c.removeEventListener("DOMContentLoaded",e.DOMContentLoaded,false);e.onDOMReady()}else if(c.attachEvent)if(c.readyState===
"complete"){c.detachEvent("onreadystatechange",e.DOMContentLoaded);e.onDOMReady()}},DOMReadyList:[],addToDOMReady:function(a){e.DOMIsReady?a.call(c):e.DOMReadyList.push(a)},DOMIsReady:false,onDOMReady:function(){if(!e.DOMIsReady){if(!c.body)return setTimeout(e.onDOMReady,13);e.DOMIsReady=true;if(e.DOMReadyList){for(var a=0;a<e.DOMReadyList.length;a++)e.DOMReadyList[a].call(c);e.DOMReadyList=null}}}});e.bindDOMReady();Function.prototype.context=function(a){var d=this;return function(){return d.apply(a,
arguments)}};Function.prototype.evtContext=function(a){var d=this;return function(g){return d.call(a,g,this)}};Function.prototype.rEvtContext=function(a,d){if(this.hasContext===true)return this;d||(d=a);for(var g in d)if(d[g]==this){d[g]=this.evtContext(a);d[g].hasContext=true;return d[g]}return this.evtContext(a)};f.jQuery&&function(a){a.fn.VideoJS=function(d){this.each(function(){e.setup(this,d)});return this};a.fn.player=function(){return this[0].player}}(jQuery);f.VideoJS=f._V_=e})(window);

