/*
  jQuery-SelectBox
  
  Traditional select elements are very difficult to style by themselves, 
  but they are also very usable and feature rich. This plugin attempts to 
  recreate all selectbox functionality and appearance while adding 
  animation and stylability.
  
  This product includes software developed 
  by RevSystems, Inc (http://www.revsystems.com/) and its contributors
  
  Please see the accompanying LICENSE.txt for licensing information.
*/
(function(a){jQuery.fn.borderWidth=function(){return a(this).outerWidth()-a(this).innerWidth()};jQuery.fn.marginWidth=function(){return a(this).outerWidth(true)-a(this).outerWidth()};jQuery.fn.paddingWidth=function(){return a(this).innerWidth()-a(this).width()};jQuery.fn.extraWidth=function(){return a(this).outerWidth(true)-a(this).width()};jQuery.fn.offsetFrom=function(b){return{left:a(this).offset().left-b.offset().left,top:a(this).offset().top-b.offset().top}};jQuery.fn.maxWidth=function(){var b=0;a(this).each(function(){if(a(this).width()>b){b=a(this).width()}});return b};jQuery.fn.sb=function(b){if(a.browser.msie&&a.browser.version<7){return a(this)}b=a.extend({acTimeout:800,animDuration:300,ddCtx:"body",dropupThreshold:150,fixedWidth:false,maxHeight:false,maxWidth:false,selectboxClass:"selectbox",useTie:false,arrowMarkup:"<span class='arrow_btn'><span class='interior'><span class='arrow'></span></span></span>",displayFormat:function(){var c=a(this).attr("label");if(a.trim(c)!=""){return c}return a(this).text()},optionFormat:function(c,e){var d=a(this).attr("label");if(a.trim(d)!=""){return d}return a(this).text()},optgroupFormat:function(c){return"<span class='label'>"+a(this).attr("label")+"</span>"}},b);a(this).each(function(){var f=a(this);var j=null;var k=null;var e=null;var K=null;var D=f.children().size()>0?b.optionFormat.call(f.find("option:selected")[0],0,0):"&nbsp;";function E(){j=a("<div class='sb "+b.selectboxClass+" "+f.attr("class")+"'></div>");a("body").append(j);k=a("<a href='#' class='display "+f.attr("class")+"'><span class='value'>"+f.val()+"</span> <span class='text'>"+D+"</span>"+b.arrowMarkup+"</a>");j.append(k);e=a("<ul class='"+b.selectboxClass+" items "+f.attr("class")+"'></ul>");j.append(e);if(f.children().size()==0){var O=a("<li class='selected empty'><a href='#'><span class='value'></span><span class='text'>&nbsp;</span></a></li>");O.data("val","");e.append(O)}else{f.children().each(function(P){if(a(this).is("optgroup")){var Q=a(this);var R=a("<li class='optgroup'>"+b.optgroupFormat.call(Q[0],P+1)+"</li>");var T=a("<ul class='items'></ul>");R.append(T);e.append(R);Q.children("option").each(function(U){var V=a("<li class='"+(a(this).attr("selected")?"selected":"")+" "+(a(this).attr("disabled")?"disabled":"")+"'><a href='#'><span class='value'>"+a(this).attr("value")+"</span><span class='text'>"+b.optionFormat.call(this,0,P+1)+"</span></a></li>");V.data("val",a(this).attr("value"));T.append(V)})}else{var S=a("<li class='"+(a(this).attr("selected")?"selected":"")+" "+(a(this).attr("disabled")?"disabled":"")+"'><a href='#'><span class='value'>"+a(this).attr("value")+"</span><span class='text'>"+b.optionFormat.call(this,0,P+1)+"</span></a></li>");S.data("val",a(this).attr("value"));e.append(S)}})}K=e.find("li").not(".optgroup");e.children(":first").addClass("first");e.children(":last").addClass("last");f.hide();if(!b.fixedWidth){var N=j.find(".text, .optgroup").maxWidth()+k.extraWidth()+1;j.width(b.maxWidth?Math.min(b.maxWidth,N):N);if(a.browser.msie&&a.browser.version<=7){K.find("a").each(function(){a(this).css("width","100%").width(a(this).width()-a(this).paddingWidth()-a(this).borderWidth())})}}else{if(b.maxWidth&&j.width()>b.maxWidth){j.width(b.maxWidth)}}f.before(j);e.hide();if(!f.is(":disabled")){k.click(C).focus(p).blur(c).hover(H,A);K.not(".disabled").find("a").click(z);K.filter(".disabled").find("a").click(function(){return false});K.not(".disabled").hover(H,A);e.find(".optgroup").hover(H,A).click(function(){return false})}else{j.addClass("disabled");k.click(function(P){P.preventDefault()})}j.bind("close",m);j.bind("destroy",i);f.bind("reload",L);if(jQuery.fn.tie&&b.useTie){f.bind("domupdate",I)}f.focus(g)}function g(){k.focus();return false}var F=null;function I(){clearTimeout(F);F=setTimeout(L,30)}function L(){var O=j.is(".open");var N=k.is(".focused");B();i();E();if(O){k.focus();t()}else{if(N){k.focus()}}}function i(){j.unbind().find("*").unbind();j.remove();f.unbind("reload",L).unbind("domupdate",I).unbind("focus",g).show()}function w(){l();a(document).unbind("click",w)}function l(){a(".sb."+b.selectboxClass).each(function(){a(this).triggerHandler("close")})}function o(){a(".sb."+b.selectboxClass).not(j[0]).each(function(){a(this).triggerHandler("close")})}function m(){if(j.is(".open")){K.removeClass("hover");a(document).unbind("keyup",u);a(document).unbind("keydown",h);a(document).unbind("keydown",n);e.fadeOut(b.animDuration,function(){j.removeClass("open");j.append(e)})}}function B(){K.removeClass("hover");a(document).unbind("keyup",u);a(document).unbind("keydown",h);e.hide();j.removeClass("open");j.append(e)}function x(){var N=null;if(b.ddCtx=="self"){N=j}else{if(a.isFunction(b.ddCtx)){N=a(b.ddCtx.call(f[0]))}else{N=a(b.ddCtx)}}return N}function J(){e.scrollTop(e.scrollTop()+K.filter(".selected").offsetFrom(e).top-e.height()/2+K.filter(".selected").outerHeight(true)/2)}function v(){var O=x();l();j.addClass("open");var N=M();O.append(e);if(a.browser.msie&&a.browser.version<8){a("."+b.selectboxClass+" .display").hide().show()}if(N=="up"){e.fadeIn(b.animDuration,J)}else{if(N=="down"){e.slideDown(b.animDuration,J)}else{e.fadeIn(b.animDuration,J)}}a(document).click(w);k.focus()}function t(){var O=x();l();j.addClass("open");var N=M();O.append(e);if(a.browser.msie&&a.browser.version<8){a("."+b.selectboxClass+" .display").hide().show()}e.show();J();a(document).click(w);k.focus()}function M(){var P=x();var W=0;var O=k.offsetFrom(P).left;var N=0;var R="";e.removeClass("above");e.css({display:"block",maxHeight:"none",position:"relative",visibility:"hidden"});if(!b.fixedWidth){e.width(k.outerWidth()-e.extraWidth()+1)}var V=a(window).scrollTop()+a(window).height()-k.offset().top-k.outerHeight();var U=k.offset().top-a(window).scrollTop();var Q=k.offsetFrom(P).top+k.outerHeight();var X=V-U+b.dropupThreshold;if(e.outerHeight()<V){W=b.maxHeight?b.maxHeight:V;N=Q;R="down"}else{if(e.outerHeight()<U){W=b.maxHeight?b.maxHeight:U;N=k.offsetFrom(P).top-Math.min(W,e.outerHeight());R="up"}else{if(X>=0){W=b.maxHeight?b.maxHeight:V;N=Q;R="down"}else{if(X<0){W=b.maxHeight?b.maxHeight:U;N=k.offsetFrom(P).top-Math.min(W,e.outerHeight());R="up"}else{W=b.maxHeight?b.maxHeight:"none";N=Q;R="down"}}}}var T=a().jquery<"1.4.2"?a("body").offset().left:parseInt(a("body").css("margin-left"));var S=a().jquery<"1.4.2"?a("body").offset().top:parseInt(a("body").css("margin-top"));e.css({display:"none",left:O+(P[0].tagName.toLowerCase()=="body"?T:0),maxHeight:W,position:"absolute",top:N+(P[0].tagName.toLowerCase()=="body"?S:0),visibility:"visible"});if(R=="up"){e.addClass("above")}return R}function C(N){var O=a(this).closest("."+b.selectboxClass);if(O.is(".open")){m()}else{k.focus();v()}return false}function r(){var O=a(this);k.find(".value").html(O.find(".value").html());k.find(".text").attr("title",O.find(".text").html());e.find("li").removeClass("selected");O.closest("li").addClass("selected");var N=f.val();var P=O.closest("li").data("val");f.val(P);k.find(".text").html(b.displayFormat.call(f.find("option:selected")[0]));if(N!=P){f.change()}}function z(N){r.call(this);w();k.focus();return false}var G="";var s=null;function q(){G=""}function d(Q){var R="";var P=K.not(".disabled");for(var O=0;O<P.size();O++){var N=P.eq(O).find(".text").text();R+=N+" ";if(N.toLowerCase().match("^"+Q.toLowerCase())==Q.toLowerCase()){return P.eq(O)}}return null}function y(O){var N=d(O);if(N!=null){r.call(N[0]);return true}return false}function h(N){if(N.which==38||N.which==40||N.which==8||N.which==32){N.preventDefault()}}function n(O){if(O.altKey||O.ctrlKey){return false}var N=K.filter(".selected");switch(O.which){case 35:if(N.size()>0){O.preventDefault();r.call(K.not(".disabled").filter(":last")[0]);J()}break;case 36:if(N.size()>0){O.preventDefault();r.call(K.not(".disabled").filter(":first")[0]);J()}break;case 38:if(N.size()>0){if(K.not(".disabled").filter(":first")[0]!=N[0]){O.preventDefault();r.call(K.not(".disabled").eq(K.not(".disabled").index(N)-1)[0])}J()}break;case 40:if(N.size()>0){if(K.not(".disabled").filter(":last")[0]!=N[0]){O.preventDefault();r.call(K.not(".disabled").eq(K.not(".disabled").index(N)+1)[0]);J()}}else{if(K.size()>1){O.preventDefault();r.call(K.eq(0)[0])}}break;default:break}}function u(O){if(O.altKey||O.ctrlKey){return false}var N=K.filter(".selected");if(O.which!=38&&O.which!=40){G+=String.fromCharCode(O.keyCode);if(!y(G)){clearTimeout(s);q()}else{clearTimeout(s);s=setTimeout(q,b.acTimeout)}}}function p(){o();j.addClass("focused");a(document).unbind("keyup",u).keyup(u);a(document).unbind("keydown",h).keydown(h);a(document).unbind("keydown",n).keydown(n)}function c(){j.removeClass("focused");a(document).unbind("keyup",u);a(document).unbind("keydown",h);a(document).unbind("keydown",n)}function H(){a(this).addClass("hover")}function A(){a(this).removeClass("hover")}E()})}})(jQuery);

/*
 * FancyBox - jQuery Plugin
 * Simple and fancy lightbox alternative
 *
 * Examples and documentation at: http://fancybox.net
 * 
 * Copyright (c) 2008 - 2010 Janis Skarnelis
 * That said, it is hardly a one-person project. Many people have submitted bugs, code, and offered their advice freely. Their support is greatly appreciated.
 * 
 * Version: 1.3.4 (11/11/2010)
 * Requires: jQuery v1.3+
 *
 * Dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 */
;(function(b){var m,t,u,f,D,j,E,n,z,A,q=0,e={},o=[],p=0,d={},l=[],G=null,v=new Image,J=/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i,W=/[^\.]\.(swf)\s*$/i,K,L=1,y=0,s="",r,i,h=false,B=b.extend(b("<div/>")[0],{prop:0}),M=b.browser.msie&&b.browser.version<7&&!window.XMLHttpRequest,N=function(){t.hide();v.onerror=v.onload=null;G&&G.abort();m.empty()},O=function(){if(false===e.onError(o,q,e)){t.hide();h=false}else{e.titleShow=false;e.width="auto";e.height="auto";m.html('<p id="fancybox-error">The requested content cannot be loaded.<br />Please try again later.</p>');
F()}},I=function(){var a=o[q],c,g,k,C,P,w;N();e=b.extend({},b.fn.fancybox.defaults,typeof b(a).data("fancybox")=="undefined"?e:b(a).data("fancybox"));w=e.onStart(o,q,e);if(w===false)h=false;else{if(typeof w=="object")e=b.extend(e,w);k=e.title||(a.nodeName?b(a).attr("title"):a.title)||"";if(a.nodeName&&!e.orig)e.orig=b(a).children("img:first").length?b(a).children("img:first"):b(a);if(k===""&&e.orig&&e.titleFromAlt)k=e.orig.attr("alt");c=e.href||(a.nodeName?b(a).attr("href"):a.href)||null;if(/^(?:javascript)/i.test(c)||
c=="#")c=null;if(e.type){g=e.type;if(!c)c=e.content}else if(e.content)g="html";else if(c)g=c.match(J)?"image":c.match(W)?"swf":b(a).hasClass("iframe")?"iframe":c.indexOf("#")===0?"inline":"ajax";if(g){if(g=="inline"){a=c.substr(c.indexOf("#"));g=b(a).length>0?"inline":"ajax"}e.type=g;e.href=c;e.title=k;if(e.autoDimensions)if(e.type=="html"||e.type=="inline"||e.type=="ajax"){e.width="auto";e.height="auto"}else e.autoDimensions=false;if(e.modal){e.overlayShow=true;e.hideOnOverlayClick=false;e.hideOnContentClick=
false;e.enableEscapeButton=false;e.showCloseButton=false}e.padding=parseInt(e.padding,10);e.margin=parseInt(e.margin,10);m.css("padding",e.padding+e.margin);b(".fancybox-inline-tmp").unbind("fancybox-cancel").bind("fancybox-change",function(){b(this).replaceWith(j.children())});switch(g){case "html":m.html(e.content);F();break;case "inline":if(b(a).parent().is("#fancybox-content")===true){h=false;break}b('<div class="fancybox-inline-tmp" />').hide().insertBefore(b(a)).bind("fancybox-cleanup",function(){b(this).replaceWith(j.children())}).bind("fancybox-cancel",
function(){b(this).replaceWith(m.children())});b(a).appendTo(m);F();break;case "image":h=false;b.fancybox.showActivity();v=new Image;v.onerror=function(){O()};v.onload=function(){h=true;v.onerror=v.onload=null;e.width=v.width;e.height=v.height;b("<img />").attr({id:"fancybox-img",src:v.src,alt:e.title}).appendTo(m);Q()};v.src=c;break;case "swf":e.scrolling="no";C='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+e.width+'" height="'+e.height+'"><param name="movie" value="'+c+
'"></param>';P="";b.each(e.swf,function(x,H){C+='<param name="'+x+'" value="'+H+'"></param>';P+=" "+x+'="'+H+'"'});C+='<embed src="'+c+'" type="application/x-shockwave-flash" width="'+e.width+'" height="'+e.height+'"'+P+"></embed></object>";m.html(C);F();break;case "ajax":h=false;b.fancybox.showActivity();e.ajax.win=e.ajax.success;G=b.ajax(b.extend({},e.ajax,{url:c,data:e.ajax.data||{},error:function(x){x.status>0&&O()},success:function(x,H,R){if((typeof R=="object"?R:G).status==200){if(typeof e.ajax.win==
"function"){w=e.ajax.win(c,x,H,R);if(w===false){t.hide();return}else if(typeof w=="string"||typeof w=="object")x=w}m.html(x);F()}}}));break;case "iframe":Q()}}else O()}},F=function(){var a=e.width,c=e.height;a=a.toString().indexOf("%")>-1?parseInt((b(window).width()-e.margin*2)*parseFloat(a)/100,10)+"px":a=="auto"?"auto":a+"px";c=c.toString().indexOf("%")>-1?parseInt((b(window).height()-e.margin*2)*parseFloat(c)/100,10)+"px":c=="auto"?"auto":c+"px";m.wrapInner('<div style="width:'+a+";height:"+c+
";overflow: "+(e.scrolling=="auto"?"auto":e.scrolling=="yes"?"scroll":"hidden")+';position:relative;"></div>');e.width=m.width();e.height=m.height();Q()},Q=function(){var a,c;t.hide();if(f.is(":visible")&&false===d.onCleanup(l,p,d)){b.event.trigger("fancybox-cancel");h=false}else{h=true;b(j.add(u)).unbind();b(window).unbind("resize.fb scroll.fb");b(document).unbind("keydown.fb");f.is(":visible")&&d.titlePosition!=="outside"&&f.css("height",f.height());l=o;p=q;d=e;if(d.overlayShow){u.css({"background-color":d.overlayColor,
opacity:d.overlayOpacity,cursor:d.hideOnOverlayClick?"pointer":"auto",height:b(document).height()});if(!u.is(":visible")){M&&b("select:not(#fancybox-tmp select)").filter(function(){return this.style.visibility!=="hidden"}).css({visibility:"hidden"}).one("fancybox-cleanup",function(){this.style.visibility="inherit"});u.show()}}else u.hide();i=X();s=d.title||"";y=0;n.empty().removeAttr("style").removeClass();if(d.titleShow!==false){if(b.isFunction(d.titleFormat))a=d.titleFormat(s,l,p,d);else a=s&&s.length?
d.titlePosition=="float"?'<table id="fancybox-title-float-wrap" cellpadding="0" cellspacing="0"><tr><td id="fancybox-title-float-left"></td><td id="fancybox-title-float-main">'+s+'</td><td id="fancybox-title-float-right"></td></tr></table>':'<div id="fancybox-title-'+d.titlePosition+'">'+s+"</div>":false;s=a;if(!(!s||s==="")){n.addClass("fancybox-title-"+d.titlePosition).html(s).appendTo("body").show();switch(d.titlePosition){case "inside":n.css({width:i.width-d.padding*2,marginLeft:d.padding,marginRight:d.padding});
y=n.outerHeight(true);n.appendTo(D);i.height+=y;break;case "over":n.css({marginLeft:d.padding,width:i.width-d.padding*2,bottom:d.padding}).appendTo(D);break;case "float":n.css("left",parseInt((n.width()-i.width-40)/2,10)*-1).appendTo(f);break;default:n.css({width:i.width-d.padding*2,paddingLeft:d.padding,paddingRight:d.padding}).appendTo(f)}}}n.hide();if(f.is(":visible")){b(E.add(z).add(A)).hide();a=f.position();r={top:a.top,left:a.left,width:f.width(),height:f.height()};c=r.width==i.width&&r.height==
i.height;j.fadeTo(d.changeFade,0.3,function(){var g=function(){j.html(m.contents()).fadeTo(d.changeFade,1,S)};b.event.trigger("fancybox-change");j.empty().removeAttr("filter").css({"border-width":d.padding,width:i.width-d.padding*2,height:e.autoDimensions?"auto":i.height-y-d.padding*2});if(c)g();else{B.prop=0;b(B).animate({prop:1},{duration:d.changeSpeed,easing:d.easingChange,step:T,complete:g})}})}else{f.removeAttr("style");j.css("border-width",d.padding);if(d.transitionIn=="elastic"){r=V();j.html(m.contents());
f.show();if(d.opacity)i.opacity=0;B.prop=0;b(B).animate({prop:1},{duration:d.speedIn,easing:d.easingIn,step:T,complete:S})}else{d.titlePosition=="inside"&&y>0&&n.show();j.css({width:i.width-d.padding*2,height:e.autoDimensions?"auto":i.height-y-d.padding*2}).html(m.contents());f.css(i).fadeIn(d.transitionIn=="none"?0:d.speedIn,S)}}}},Y=function(){if(d.enableEscapeButton||d.enableKeyboardNav)b(document).bind("keydown.fb",function(a){if(a.keyCode==27&&d.enableEscapeButton){a.preventDefault();b.fancybox.close()}else if((a.keyCode==
37||a.keyCode==39)&&d.enableKeyboardNav&&a.target.tagName!=="INPUT"&&a.target.tagName!=="TEXTAREA"&&a.target.tagName!=="SELECT"){a.preventDefault();b.fancybox[a.keyCode==37?"prev":"next"]()}});if(d.showNavArrows){if(d.cyclic&&l.length>1||p!==0)z.show();if(d.cyclic&&l.length>1||p!=l.length-1)A.show()}else{z.hide();A.hide()}},S=function(){if(!b.support.opacity){j.get(0).style.removeAttribute("filter");f.get(0).style.removeAttribute("filter")}e.autoDimensions&&j.css("height","auto");f.css("height","auto");
s&&s.length&&n.show();d.showCloseButton&&E.show();Y();d.hideOnContentClick&&j.bind("click",b.fancybox.close);d.hideOnOverlayClick&&u.bind("click",b.fancybox.close);b(window).bind("resize.fb",b.fancybox.resize);d.centerOnScroll&&b(window).bind("scroll.fb",b.fancybox.center);if(d.type=="iframe")b('<iframe id="fancybox-frame" name="fancybox-frame'+(new Date).getTime()+'" frameborder="0" hspace="0" '+(b.browser.msie?'allowtransparency="true""':"")+' scrolling="'+e.scrolling+'" src="'+d.href+'"></iframe>').appendTo(j);
f.show();h=false;b.fancybox.center();d.onComplete(l,p,d);var a,c;if(l.length-1>p){a=l[p+1].href;if(typeof a!=="undefined"&&a.match(J)){c=new Image;c.src=a}}if(p>0){a=l[p-1].href;if(typeof a!=="undefined"&&a.match(J)){c=new Image;c.src=a}}},T=function(a){var c={width:parseInt(r.width+(i.width-r.width)*a,10),height:parseInt(r.height+(i.height-r.height)*a,10),top:parseInt(r.top+(i.top-r.top)*a,10),left:parseInt(r.left+(i.left-r.left)*a,10)};if(typeof i.opacity!=="undefined")c.opacity=a<0.5?0.5:a;f.css(c);
j.css({width:c.width-d.padding*2,height:c.height-y*a-d.padding*2})},U=function(){return[b(window).width()-d.margin*2,b(window).height()-d.margin*2,b(document).scrollLeft()+d.margin,b(document).scrollTop()+d.margin]},X=function(){var a=U(),c={},g=d.autoScale,k=d.padding*2;c.width=d.width.toString().indexOf("%")>-1?parseInt(a[0]*parseFloat(d.width)/100,10):d.width+k;c.height=d.height.toString().indexOf("%")>-1?parseInt(a[1]*parseFloat(d.height)/100,10):d.height+k;if(g&&(c.width>a[0]||c.height>a[1]))if(e.type==
"image"||e.type=="swf"){g=d.width/d.height;if(c.width>a[0]){c.width=a[0];c.height=parseInt((c.width-k)/g+k,10)}if(c.height>a[1]){c.height=a[1];c.width=parseInt((c.height-k)*g+k,10)}}else{c.width=Math.min(c.width,a[0]);c.height=Math.min(c.height,a[1])}c.top=parseInt(Math.max(a[3]-20,a[3]+(a[1]-c.height-40)*0.5),10);c.left=parseInt(Math.max(a[2]-20,a[2]+(a[0]-c.width-40)*0.5),10);return c},V=function(){var a=e.orig?b(e.orig):false,c={};if(a&&a.length){c=a.offset();c.top+=parseInt(a.css("paddingTop"),
10)||0;c.left+=parseInt(a.css("paddingLeft"),10)||0;c.top+=parseInt(a.css("border-top-width"),10)||0;c.left+=parseInt(a.css("border-left-width"),10)||0;c.width=a.width();c.height=a.height();c={width:c.width+d.padding*2,height:c.height+d.padding*2,top:c.top-d.padding-20,left:c.left-d.padding-20}}else{a=U();c={width:d.padding*2,height:d.padding*2,top:parseInt(a[3]+a[1]*0.5,10),left:parseInt(a[2]+a[0]*0.5,10)}}return c},Z=function(){if(t.is(":visible")){b("div",t).css("top",L*-40+"px");L=(L+1)%12}else clearInterval(K)};
b.fn.fancybox=function(a){if(!b(this).length)return this;b(this).data("fancybox",b.extend({},a,b.metadata?b(this).metadata():{})).unbind("click.fb").bind("click.fb",function(c){c.preventDefault();if(!h){h=true;b(this).blur();o=[];q=0;c=b(this).attr("rel")||"";if(!c||c==""||c==="nofollow")o.push(this);else{o=b("a[rel="+c+"], area[rel="+c+"]");q=o.index(this)}I()}});return this};b.fancybox=function(a,c){var g;if(!h){h=true;g=typeof c!=="undefined"?c:{};o=[];q=parseInt(g.index,10)||0;if(b.isArray(a)){for(var k=
0,C=a.length;k<C;k++)if(typeof a[k]=="object")b(a[k]).data("fancybox",b.extend({},g,a[k]));else a[k]=b({}).data("fancybox",b.extend({content:a[k]},g));o=jQuery.merge(o,a)}else{if(typeof a=="object")b(a).data("fancybox",b.extend({},g,a));else a=b({}).data("fancybox",b.extend({content:a},g));o.push(a)}if(q>o.length||q<0)q=0;I()}};b.fancybox.showActivity=function(){clearInterval(K);t.show();K=setInterval(Z,66)};b.fancybox.hideActivity=function(){t.hide()};b.fancybox.next=function(){return b.fancybox.pos(p+
1)};b.fancybox.prev=function(){return b.fancybox.pos(p-1)};b.fancybox.pos=function(a){if(!h){a=parseInt(a);o=l;if(a>-1&&a<l.length){q=a;I()}else if(d.cyclic&&l.length>1){q=a>=l.length?0:l.length-1;I()}}};b.fancybox.cancel=function(){if(!h){h=true;b.event.trigger("fancybox-cancel");N();e.onCancel(o,q,e);h=false}};b.fancybox.close=function(){function a(){u.fadeOut("fast");n.empty().hide();f.hide();b.event.trigger("fancybox-cleanup");j.empty();d.onClosed(l,p,d);l=e=[];p=q=0;d=e={};h=false}if(!(h||f.is(":hidden"))){h=
true;if(d&&false===d.onCleanup(l,p,d))h=false;else{N();b(E.add(z).add(A)).hide();b(j.add(u)).unbind();b(window).unbind("resize.fb scroll.fb");b(document).unbind("keydown.fb");j.find("iframe").attr("src",M&&/^https/i.test(window.location.href||"")?"javascript:void(false)":"about:blank");d.titlePosition!=="inside"&&n.empty();f.stop();if(d.transitionOut=="elastic"){r=V();var c=f.position();i={top:c.top,left:c.left,width:f.width(),height:f.height()};if(d.opacity)i.opacity=1;n.empty().hide();B.prop=1;
b(B).animate({prop:0},{duration:d.speedOut,easing:d.easingOut,step:T,complete:a})}else f.fadeOut(d.transitionOut=="none"?0:d.speedOut,a)}}};b.fancybox.resize=function(){u.is(":visible")&&u.css("height",b(document).height());b.fancybox.center(true)};b.fancybox.center=function(a){var c,g;if(!h){g=a===true?1:0;c=U();!g&&(f.width()>c[0]||f.height()>c[1])||f.stop().animate({top:parseInt(Math.max(c[3]-20,c[3]+(c[1]-j.height()-40)*0.5-d.padding)),left:parseInt(Math.max(c[2]-20,c[2]+(c[0]-j.width()-40)*0.5-
d.padding))},typeof a=="number"?a:200)}};b.fancybox.init=function(){if(!b("#fancybox-wrap").length){b("body").append(m=b('<div id="fancybox-tmp"></div>'),t=b('<div id="fancybox-loading"><div></div></div>'),u=b('<div id="fancybox-overlay"></div>'),f=b('<div id="fancybox-wrap"></div>'));D=b('<div id="fancybox-outer"></div>').append('<div class="fancybox-bg" id="fancybox-bg-n"></div><div class="fancybox-bg" id="fancybox-bg-ne"></div><div class="fancybox-bg" id="fancybox-bg-e"></div><div class="fancybox-bg" id="fancybox-bg-se"></div><div class="fancybox-bg" id="fancybox-bg-s"></div><div class="fancybox-bg" id="fancybox-bg-sw"></div><div class="fancybox-bg" id="fancybox-bg-w"></div><div class="fancybox-bg" id="fancybox-bg-nw"></div>').appendTo(f);
D.append(j=b('<div id="fancybox-content"></div>'),E=b('<a id="fancybox-close"></a>'),n=b('<div id="fancybox-title"></div>'),z=b('<a href="javascript:;" id="fancybox-left"><span class="fancy-ico" id="fancybox-left-ico"></span></a>'),A=b('<a href="javascript:;" id="fancybox-right"><span class="fancy-ico" id="fancybox-right-ico"></span></a>'));E.click(b.fancybox.close);t.click(b.fancybox.cancel);z.click(function(a){a.preventDefault();b.fancybox.prev()});A.click(function(a){a.preventDefault();b.fancybox.next()});
b.fn.mousewheel&&f.bind("mousewheel.fb",function(a,c){if(h)a.preventDefault();else if(b(a.target).get(0).clientHeight==0||b(a.target).get(0).scrollHeight===b(a.target).get(0).clientHeight){a.preventDefault();b.fancybox[c>0?"prev":"next"]()}});b.support.opacity||f.addClass("fancybox-ie");if(M){t.addClass("fancybox-ie6");f.addClass("fancybox-ie6");b('<iframe id="fancybox-hide-sel-frame" src="'+(/^https/i.test(window.location.href||"")?"javascript:void(false)":"about:blank")+'" scrolling="no" border="0" frameborder="0" tabindex="-1"></iframe>').prependTo(D)}}};
b.fn.fancybox.defaults={padding:10,margin:40,opacity:false,modal:false,cyclic:false,scrolling:"auto",width:560,height:340,autoScale:true,autoDimensions:true,centerOnScroll:false,ajax:{},swf:{wmode:"transparent"},hideOnOverlayClick:true,hideOnContentClick:false,overlayShow:true,overlayOpacity:0.7,overlayColor:"#777",titleShow:true,titlePosition:"float",titleFormat:null,titleFromAlt:false,transitionIn:"fade",transitionOut:"fade",speedIn:300,speedOut:300,changeSpeed:300,changeFade:"fast",easingIn:"swing",
easingOut:"swing",showCloseButton:true,showNavArrows:true,enableEscapeButton:true,enableKeyboardNav:true,onStart:function(){},onCancel:function(){},onComplete:function(){},onCleanup:function(){},onClosed:function(){},onError:function(){}};b(document).ready(function(){b.fancybox.init()})})(jQuery);

/*
VideoJS - HTML5 Video Player
v2.0.2

This file is part of VideoJS. Copyright 2010 Zencoder, Inc.

VideoJS is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

VideoJS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License
along with VideoJS.  If not, see <http://www.gnu.org/licenses/>.
*/
(function(c,d){var a=c.document;(function(){var e=false,f=/xyz/.test(function(){xyz;})?/\b_super\b/:/.*/;this.JRClass=function(){};JRClass.extend=function(k){var i=this.prototype;e=true;var h=new this();e=false;for(var g in k){h[g]=typeof k[g]=="function"&&typeof i[g]=="function"&&f.test(k[g])?(function(l,m){return function(){var o=this._super;this._super=i[l];var n=m.apply(this,arguments);this._super=o;return n;};})(g,k[g]):k[g];}function j(){if(!e&&this.init){this.init.apply(this,arguments);}}j.prototype=h;j.constructor=j;j.extend=arguments.callee;return j;};})();var b=JRClass.extend({init:function(f,e){if(typeof f=="string"){this.video=a.getElementById(f);}else{this.video=f;}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};if(typeof b.options=="object"){_V_.merge(this.options,b.options);}if(typeof e=="object"){_V_.merge(this.options,e);}if(this.getPreloadAttribute()!==d){this.options.preload=this.getPreloadAttribute();}if(this.getAutoplayAttribute()!==d){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(e,f,g){this.behaviors[e]=f;this.extend(g);},activateElement:function(e,f){if(typeof e=="string"){e=a.getElementById(e);}this.behaviors[f].call(this,e);},errors:[],warnings:[],warning:function(e){this.warnings.push(e);this.log(e);},history:[],log:function(f){if(!f){return;}if(typeof f=="string"){f={type:f};}if(f.type){this.history.push(f.type);}if(this.history.length>=50){this.history.shift();}try{console.log(f.type);}catch(g){try{opera.postError(f.type);}catch(g){}}},setLocalStorage:function(f,g){if(!localStorage){return;}try{localStorage[f]=g;}catch(h){if(h.code==22||h.code==1014){this.warning(b.warnings.localStorageFull);}}},getPreloadAttribute:function(){if(typeof this.video.hasAttribute=="function"&&this.video.hasAttribute("preload")){var e=this.video.getAttribute("preload");if(e===""||e==="true"){return"auto";}if(e==="false"){return"none";}return e;}},getAutoplayAttribute:function(){if(typeof this.video.hasAttribute=="function"&&this.video.hasAttribute("autoplay")){var e=this.video.getAttribute("autoplay");if(e==="false"){return false;}return true;}},bufferedPercent:function(){return(this.duration())?this.buffered()[1]/this.duration():0;},each:function(e,h){if(!e||e.length===0){return;}for(var g=0,f=e.length;g<f;g++){if(h.call(this,e[g],g)){break;}}},extend:function(f){for(var e in f){if(f.hasOwnProperty(e)){this[e]=f[e];}}}});b.player=b.prototype;b.player.extend({flashSupported:function(){if(!this.flashElement){this.flashElement=this.getFlashElement();}if(this.flashElement&&this.flashPlayerVersionSupported()){return true;}else{return false;}},flashInit:function(){this.replaceWithFlash();this.element=this.flashElement;this.video.src="";var e=b.flashPlayers[this.options.flashPlayer];this.extend(b.flashPlayers[this.options.flashPlayer].api);(e.init.context(this))();},getFlashElement:function(){var g=this.video.children;for(var f=0,e=g.length;f<e;f++){if(g[f].className=="vjs-flash-fallback"){return g[f];}}},replaceWithFlash:function(){if(this.flashElement){this.box.insertBefore(this.flashElement,this.video);this.video.style.display="none";}},flashPlayerVersionSupported:function(){var e=(this.options.flashPlayerVersion)?this.options.flashPlayerVersion:b.flashPlayers[this.options.flashPlayer].flashPlayerVersion;return b.getFlashVersion()>=e;}});b.flashPlayers={};b.flashPlayers.htmlObject={flashPlayerVersion:9,init:function(){return true;},api:{width:function(e){if(e!==d){this.element.width=e;this.box.style.width=e+"px";this.triggerResizeListeners();return this;}return this.element.width;},height:function(e){if(e!==d){this.element.height=e;this.box.style.height=e+"px";this.triggerResizeListeners();return this;}return this.element.height;}}};b.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";}}});b.merge=function(h,g,f){for(var e in g){if(g.hasOwnProperty(e)&&(!f||!h.hasOwnProperty(e))){h[e]=g[e];}}return h;};b.extend=function(e){this.merge(this,e,true);};b.extend({setupAllWhenReady:function(e){b.options=e;b.DOMReady(b.setup);},DOMReady:function(e){b.addToDOMReady(e);},setup:function(g,e){var k=false,j=[],h;if(!g||g=="All"){g=b.getVideoJSTags();}else{if(typeof g!="object"||g.nodeType==1){g=[g];k=true;}}for(var f=0;f<g.length;f++){if(typeof g[f]=="string"){h=a.getElementById(g[f]);}else{h=g[f];}j.push(new b(h,e));}return(k)?j[0]:j;},getVideoJSTags:function(){var g=a.getElementsByTagName("video"),e=[],k;for(var h=0,f=g.length;h<f;h++){k=g[h];if(k.className.indexOf("video-js")!=-1){e.push(k);}}return e;},browserSupportsVideo:function(){if(typeof b.videoSupport!="undefined"){return b.videoSupport;}b.videoSupport=!!a.createElement("video").canPlayType;return b.videoSupport;},getFlashVersion:function(){if(typeof b.flashVersion!="undefined"){return b.flashVersion;}var f=0,i;if(typeof navigator.plugins!="undefined"&&typeof navigator.plugins["Shockwave Flash"]=="object"){i=navigator.plugins["Shockwave Flash"].description;if(i&&!(typeof navigator.mimeTypes!="undefined"&&navigator.mimeTypes["application/x-shockwave-flash"]&&!navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin)){f=parseInt(i.match(/^.*\s+([^\s]+)\.[^\s]+\s+[^\s]+$/)[1],10);}}else{if(typeof c.ActiveXObject!="undefined"){try{var g=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");if(g){f=parseInt(g.GetVariable("$version").match(/^[^\s]+\s(\d+)/)[1],10);}}catch(h){}}}b.flashVersion=f;return b.flashVersion;},isIE:function(){return !+"\v1";},isIPad:function(){return navigator.userAgent.match(/iPad/i)!==null;},isIPhone:function(){return navigator.userAgent.match(/iPhone/i)!==null;},isIOS:function(){return b.isIPhone()||b.isIPad();},iOSVersion:function(){var e=navigator.userAgent.match(/OS (\d+)_/i);if(e&&e[1]){return e[1];}},isAndroid:function(){return navigator.userAgent.match(/Android/i)!==null;},androidVersion:function(){var e=navigator.userAgent.match(/Android (\d+)\./i);if(e&&e[1]){return e[1];}},warnings:{videoNotReady:"Video is not ready yet (try playing the video first).",localStorageFull:"Local Storage is Full"}});if(b.isIE()){a.createElement("video");}c.VideoJS=c._V_=b;b.player.extend({html5Supported:function(){if(b.browserSupportsVideo()&&this.canPlaySource()){return true;}else{return false;}},html5Init:function(){this.element=this.video;this.fixPreloading();this.supportProgressEvents();this.volume((localStorage&&localStorage.volume)||this.options.defaultVolume);if(b.isIOS()){this.options.useBuiltInControls=true;this.iOSInterface();}else{if(b.isAndroid()){this.options.useBuiltInControls=true;this.androidInterface();}}if(!this.options.useBuiltInControls){this.video.controls=false;if(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;}var h=this.video.children;for(var g=0,f=h.length;g<f;g++){if(h[g].tagName.toUpperCase()=="SOURCE"){var e=this.video.canPlayType(h[g].type)||this.canPlayExt(h[g].src);if(e=="probably"||e=="maybe"){this.firstPlayableSource=h[g];this.canPlaySourceResult=true;return true;}}}this.canPlaySourceResult=false;return false;},canPlayExt:function(g){if(!g){return"";}var e=g.match(/\.([^\.]+)$/);if(e&&e[1]){var f=e[1].toLowerCase();if(b.isAndroid()){if(f=="mp4"||f=="m4v"){return"maybe";}}else{if(b.isIOS()){if(f=="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(f){_V_.addListener(this.video,"progress",this.playerOnVideoProgress.context(this));},playerOnVideoProgress:function(e){this.setBufferedFromProgress(e);},setBufferedFromProgress:function(f){if(f.total>0){var e=(f.loaded/f.total)*this.duration();if(e>this.values.bufferEnd){this.values.bufferEnd=e;}}},iOSInterface:function(){if(b.iOSVersion()<4){this.forceTheSource();}if(b.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();if(this.video.paused!==false){this.showBigPlayButtons();}if(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=a.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(){if(this.stylesCheckDiv.offsetHeight!=5){return false;}else{return 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(){var f=this.video.getElementsByTagName("TRACK");for(var g=0,e=f.length;g<e;g++){if(f[g].getAttribute("kind")=="subtitles"&&f[g].getAttribute("src")){this.subtitlesSource=f[g].getAttribute("src");this.loadSubtitles();this.buildSubtitles();}}},loadSubtitles:function(){_V_.get(this.subtitlesSource,this.parseSubtitles.context(this));},parseSubtitles:function(g){var f=g.split("\n"),e="",k,m,n;this.subtitles=[];this.currentSubtitle=false;this.lastSubtitleIndex=0;for(var l=0;l<f.length;l++){e=_V_.trim(f[l]);if(e){k={id:e,index:this.subtitles.length};e=_V_.trim(f[++l]);m=e.split(" --> ");k.start=this.parseSubtitleTime(m[0]);k.end=this.parseSubtitleTime(m[1]);n=[];for(var h=l;h<f.length;h++){e=_V_.trim(f[++l]);if(!e){break;}n.push(e);}k.text=n.join("<br/>");this.subtitles.push(k);}}},parseSubtitleTime:function(e){var g=e.split(":"),f=0;f+=parseFloat(g[0])*60*60;f+=parseFloat(g[1])*60;var h=g[2].split(/\.|,/);f+=parseFloat(h[0]);ms=parseFloat(h[1]);if(ms){f+=ms/1000;}return f;},buildSubtitles:function(){this.subtitlesDisplay=_V_.createElement("div",{className:"vjs-subtitles"});this.box.appendChild(this.subtitlesDisplay);this.activateElement(this.subtitlesDisplay,"subtitlesDisplay");},addVideoListener:function(f,e){_V_.addListener(this.video,f,e.rEvtContext(this));},play:function(){this.video.play();return this;},onPlay:function(e){this.addVideoListener("play",e);return this;},pause:function(){this.video.pause();return this;},onPause:function(e){this.addVideoListener("pause",e);return this;},paused:function(){return this.video.paused;},currentTime:function(g){if(g!==d){try{this.video.currentTime=g;}catch(f){this.warning(b.warnings.videoNotReady);}this.values.currentTime=g;return this;}return this.video.currentTime;},onCurrentTimeUpdate:function(e){this.currentTimeListeners.push(e);},duration:function(){return this.video.duration;},buffered:function(){if(this.values.bufferStart===d){this.values.bufferStart=0;this.values.bufferEnd=0;}if(this.video.buffered&&this.video.buffered.length>0){var e=this.video.buffered.end(0);if(e>this.values.bufferEnd){this.values.bufferEnd=e;}}return[this.values.bufferStart,this.values.bufferEnd];},volume:function(e){if(e!==d){this.values.volume=Math.max(0,Math.min(1,parseFloat(e)));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(e){_V_.addListener(this.video,"volumechange",e.rEvtContext(this));},width:function(e){if(e!==d){this.video.width=e;this.box.style.width=e+"px";this.triggerResizeListeners();return this;}return this.video.offsetWidth;},height:function(e){if(e!==d){this.video.height=e;this.box.style.height=e+"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(f){if(f.code==11){this.warning(b.warnings.videoNotReady);}}return this;},enterFullScreen:function(){if(this.supportsFullScreen()){this.html5EnterNativeFullScreen();}else{this.enterFullWindow();}},exitFullScreen:function(){if(this.supportsFullScreen()){}else{this.exitFullWindow();}},enterFullWindow:function(){this.videoIsFullScreen=true;this.docOrigOverflow=a.documentElement.style.overflow;_V_.addListener(a,"keydown",this.fullscreenOnEscKey.rEvtContext(this));_V_.addListener(c,"resize",this.fullscreenOnWindowResize.rEvtContext(this));a.documentElement.style.overflow="hidden";_V_.addClass(this.box,"vjs-fullscreen");this.positionAll();},exitFullWindow:function(){this.videoIsFullScreen=false;a.removeEventListener("keydown",this.fullscreenOnEscKey,false);c.removeEventListener("resize",this.fullscreenOnWindowResize,false);a.documentElement.style.overflow=this.docOrigOverflow;_V_.removeClass(this.box,"vjs-fullscreen");this.positionAll();},onError:function(e){this.addVideoListener("error",e);return this;},onEnded:function(e){this.addVideoListener("ended",e);return this;}});b.player.newBehavior("player",function(e){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(e){this.log(e);this.log(this.video.error);},playerOnVideoPlay:function(e){this.hasPlayed=true;},playerOnVideoPause:function(e){},playerOnVideoEnded:function(e){this.currentTime(0);this.pause();},trackBuffered:function(){this.bufferedInterval=setInterval(this.triggerBufferedListeners.context(this),500);},stopTrackingBuffered:function(){clearInterval(this.bufferedInterval);},bufferedListeners:[],onBufferedUpdate:function(e){this.bufferedListeners.push(e);},triggerBufferedListeners:function(){this.isBufferFull();this.each(this.bufferedListeners,function(e){(e.context(this))();});},isBufferFull:function(){if(this.bufferedPercent()==1){this.stopTrackingBuffered();}},trackCurrentTime:function(){if(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(e,f){this.each(this.currentTimeListeners,function(g){(g.context(this))(f||this.currentTime());});},resizeListeners:[],onResize:function(e){this.resizeListeners.push(e);},triggerResizeListeners:function(){this.each(this.resizeListeners,function(e){(e.context(this))();});}});b.player.newBehavior("mouseOverVideoReporter",function(e){_V_.addListener(e,"mousemove",this.mouseOverVideoReporterOnMouseMove.context(this));_V_.addListener(e,"mouseout",this.mouseOverVideoReporterOnMouseOut.context(this));},{mouseOverVideoReporterOnMouseMove:function(){this.showControlBars();clearInterval(this.mouseMoveTimeout);this.mouseMoveTimeout=setTimeout(this.hideControlBars.context(this),4000);},mouseOverVideoReporterOnMouseOut:function(f){var e=f.relatedTarget;while(e&&e!==this.box){e=e.parentNode;}if(e!==this.box){this.hideControlBars();}}});b.player.newBehavior("box",function(e){this.positionBox();_V_.addClass(e,"vjs-paused");this.activateElement(e,"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");}});b.player.newBehavior("poster",function(e){this.activateElement(e,"mouseOverVideoReporter");this.activateElement(e,"playButton");this.onPlay(this.hidePoster);this.onEnded(this.showPoster);this.onResize(this.positionPoster);},{showPoster:function(){if(!this.poster){return;}this.poster.style.display="block";this.positionPoster();},positionPoster:function(){if(!this.poster||this.poster.style.display=="none"){return;}this.poster.style.height=this.height()+"px";this.poster.style.width=this.width()+"px";},hidePoster:function(){if(!this.poster){return;}this.poster.style.display="none";},updatePosterSource:function(){if(!this.video.poster){var e=this.video.getElementsByTagName("img");if(e.length>0){this.video.poster=e[0].src;}}}});b.player.newBehavior("controlBar",function(e){if(!this.controlBars){this.controlBars=[];this.onResize(this.positionControlBars);}this.controlBars.push(e);_V_.addListener(e,"mousemove",this.onControlBarsMouseMove.context(this));_V_.addListener(e,"mouseout",this.onControlBarsMouseOut.context(this));},{showControlBars:function(){if(!this.options.controlsAtStart&&!this.hasPlayed){return;}this.each(this.controlBars,function(e){e.style.display="block";});},positionControlBars:function(){this.updatePlayProgressBars();this.updateLoadProgressBars();},hideControlBars:function(){if(this.options.controlsHiding&&!this.mouseIsOverControls){this.each(this.controlBars,function(e){e.style.display="none";});}},onControlBarsMouseMove:function(){this.mouseIsOverControls=true;},onControlBarsMouseOut:function(e){this.mouseIsOverControls=false;}});b.player.newBehavior("playToggle",function(e){if(!this.elements.playToggles){this.elements.playToggles=[];this.onPlay(this.playTogglesOnPlay);this.onPause(this.playTogglesOnPause);}this.elements.playToggles.push(e);_V_.addListener(e,"click",this.onPlayToggleClick.context(this));},{onPlayToggleClick:function(e){if(this.paused()){this.play();}else{this.pause();}},playTogglesOnPlay:function(e){this.each(this.elements.playToggles,function(f){_V_.removeClass(f,"vjs-paused");_V_.addClass(f,"vjs-playing");});},playTogglesOnPause:function(e){this.each(this.elements.playToggles,function(f){_V_.removeClass(f,"vjs-playing");_V_.addClass(f,"vjs-paused");});}});b.player.newBehavior("playButton",function(e){_V_.addListener(e,"click",this.onPlayButtonClick.context(this));},{onPlayButtonClick:function(e){this.play();}});b.player.newBehavior("pauseButton",function(e){_V_.addListener(e,"click",this.onPauseButtonClick.context(this));},{onPauseButtonClick:function(e){this.pause();}});b.player.newBehavior("playProgressBar",function(e){if(!this.playProgressBars){this.playProgressBars=[];this.onCurrentTimeUpdate(this.updatePlayProgressBars);}this.playProgressBars.push(e);},{updatePlayProgressBars:function(f){var e=(f!==d)?f/this.duration():this.currentTime()/this.duration();if(isNaN(e)){e=0;}this.each(this.playProgressBars,function(g){if(g.style){g.style.width=_V_.round(e*100,2)+"%";}});}});b.player.newBehavior("loadProgressBar",function(e){if(!this.loadProgressBars){this.loadProgressBars=[];}this.loadProgressBars.push(e);this.onBufferedUpdate(this.updateLoadProgressBars);},{updateLoadProgressBars:function(){this.each(this.loadProgressBars,function(e){if(e.style){e.style.width=_V_.round(this.bufferedPercent()*100,2)+"%";}});}});b.player.newBehavior("currentTimeDisplay",function(e){if(!this.currentTimeDisplays){this.currentTimeDisplays=[];this.onCurrentTimeUpdate(this.updateCurrentTimeDisplays);}this.currentTimeDisplays.push(e);},{updateCurrentTimeDisplays:function(e){if(!this.currentTimeDisplays){return;}var f=(e)?e:this.currentTime();this.each(this.currentTimeDisplays,function(g){g.innerHTML=_V_.formatTime(f);});}});b.player.newBehavior("durationDisplay",function(e){if(!this.durationDisplays){this.durationDisplays=[];this.onCurrentTimeUpdate(this.updateDurationDisplays);}this.durationDisplays.push(e);},{updateDurationDisplays:function(){if(!this.durationDisplays){return;}this.each(this.durationDisplays,function(e){if(this.duration()){e.innerHTML=_V_.formatTime(this.duration());}});}});b.player.newBehavior("currentTimeScrubber",function(e){_V_.addListener(e,"mousedown",this.onCurrentTimeScrubberMouseDown.rEvtContext(this));},{onCurrentTimeScrubberMouseDown:function(e,f){e.preventDefault();this.currentScrubber=f;this.stopTrackingCurrentTime();this.videoWasPlaying=!this.paused();this.pause();_V_.blockTextSelection();this.setCurrentTimeWithScrubber(e);_V_.addListener(a,"mousemove",this.onCurrentTimeScrubberMouseMove.rEvtContext(this));_V_.addListener(a,"mouseup",this.onCurrentTimeScrubberMouseUp.rEvtContext(this));},onCurrentTimeScrubberMouseMove:function(e){this.setCurrentTimeWithScrubber(e);},onCurrentTimeScrubberMouseUp:function(e){_V_.unblockTextSelection();a.removeEventListener("mousemove",this.onCurrentTimeScrubberMouseMove,false);a.removeEventListener("mouseup",this.onCurrentTimeScrubberMouseUp,false);if(this.videoWasPlaying){this.play();this.trackCurrentTime();}},setCurrentTimeWithScrubber:function(f){var g=_V_.getRelativePosition(f.pageX,this.currentScrubber);var e=g*this.duration();this.triggerCurrentTimeListeners(0,e);if(e==this.duration()){e=e-0.1;}this.currentTime(e);}});b.player.newBehavior("volumeDisplay",function(e){if(!this.volumeDisplays){this.volumeDisplays=[];this.onVolumeChange(this.updateVolumeDisplays);}this.volumeDisplays.push(e);this.updateVolumeDisplay(e);},{updateVolumeDisplays:function(){if(!this.volumeDisplays){return;}this.each(this.volumeDisplays,function(e){this.updateVolumeDisplay(e);});},updateVolumeDisplay:function(f){var e=Math.ceil(this.volume()*6);this.each(f.children,function(h,g){if(g<e){_V_.addClass(h,"vjs-volume-level-on");}else{_V_.removeClass(h,"vjs-volume-level-on");}});}});b.player.newBehavior("volumeScrubber",function(e){_V_.addListener(e,"mousedown",this.onVolumeScrubberMouseDown.rEvtContext(this));},{onVolumeScrubberMouseDown:function(e,f){_V_.blockTextSelection();this.currentScrubber=f;this.setVolumeWithScrubber(e);_V_.addListener(a,"mousemove",this.onVolumeScrubberMouseMove.rEvtContext(this));_V_.addListener(a,"mouseup",this.onVolumeScrubberMouseUp.rEvtContext(this));},onVolumeScrubberMouseMove:function(e){this.setVolumeWithScrubber(e);},onVolumeScrubberMouseUp:function(e){this.setVolumeWithScrubber(e);_V_.unblockTextSelection();a.removeEventListener("mousemove",this.onVolumeScrubberMouseMove,false);a.removeEventListener("mouseup",this.onVolumeScrubberMouseUp,false);},setVolumeWithScrubber:function(e){var f=_V_.getRelativePosition(e.pageX,this.currentScrubber);this.volume(f);}});b.player.newBehavior("fullscreenToggle",function(e){_V_.addListener(e,"click",this.onFullscreenToggleClick.context(this));},{onFullscreenToggleClick:function(e){if(!this.videoIsFullScreen){this.enterFullScreen();}else{this.exitFullScreen();}},fullscreenOnWindowResize:function(e){this.positionControlBars();},fullscreenOnEscKey:function(e){if(e.keyCode==27){this.exitFullScreen();}}});b.player.newBehavior("bigPlayButton",function(e){if(!this.elements.bigPlayButtons){this.elements.bigPlayButtons=[];this.onPlay(this.bigPlayButtonsOnPlay);this.onEnded(this.bigPlayButtonsOnEnded);}this.elements.bigPlayButtons.push(e);this.activateElement(e,"playButton");},{bigPlayButtonsOnPlay:function(e){this.hideBigPlayButtons();},bigPlayButtonsOnEnded:function(e){this.showBigPlayButtons();},showBigPlayButtons:function(){this.each(this.elements.bigPlayButtons,function(e){e.style.display="block";});},hideBigPlayButtons:function(){this.each(this.elements.bigPlayButtons,function(e){e.style.display="none";});}});b.player.newBehavior("spinner",function(e){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(e);},{showSpinners:function(){this.each(this.spinners,function(e){e.style.display="block";});clearInterval(this.spinnerInterval);this.spinnerInterval=setInterval(this.rotateSpinners.context(this),100);},hideSpinners:function(){this.each(this.spinners,function(e){e.style.display="none";});clearInterval(this.spinnerInterval);},spinnersRotated:0,rotateSpinners:function(){this.each(this.spinners,function(e){e.style.WebkitTransform="scale(0.5) rotate("+this.spinnersRotated+"deg)";e.style.MozTransform="scale(0.5) rotate("+this.spinnersRotated+"deg)";});if(this.spinnersRotated==360){this.spinnersRotated=0;}this.spinnersRotated+=45;},spinnersOnVideoLoadedData:function(e){this.hideSpinners();},spinnersOnVideoLoadStart:function(e){this.showSpinners();},spinnersOnVideoSeeking:function(e){},spinnersOnVideoSeeked:function(e){},spinnersOnVideoCanPlay:function(e){},spinnersOnVideoCanPlayThrough:function(e){this.hideSpinners();},spinnersOnVideoWaiting:function(e){this.showSpinners();},spinnersOnVideoStalled:function(e){},spinnersOnVideoSuspend:function(e){},spinnersOnVideoPlaying:function(e){this.hideSpinners();},spinnersOnVideoTimeUpdate:function(e){if(this.spinner.style.display=="block"){this.hideSpinners();}}});b.player.newBehavior("subtitlesDisplay",function(e){if(!this.subtitleDisplays){this.subtitleDisplays=[];this.onCurrentTimeUpdate(this.subtitleDisplaysOnVideoTimeUpdate);this.onEnded(function(){this.lastSubtitleIndex=0;}.context(this));}this.subtitleDisplays.push(e);},{subtitleDisplaysOnVideoTimeUpdate:function(h){if(this.subtitles){if(!this.currentSubtitle||this.currentSubtitle.start>=h||this.currentSubtitle.end<h){var g=false,e=(this.subtitles[this.lastSubtitleIndex].start>h),f=this.lastSubtitleIndex-(e)?1:0;while(true){if(e){if(f<0||this.subtitles[f].end<h){break;}if(this.subtitles[f].start<h){g=f;break;}f--;}else{if(f>=this.subtitles.length||this.subtitles[f].start>h){break;}if(this.subtitles[f].end>h){g=f;break;}f++;}}if(g!==false){this.currentSubtitle=this.subtitles[g];this.lastSubtitleIndex=g;this.updateSubtitleDisplays(this.currentSubtitle.text);}else{if(this.currentSubtitle){this.currentSubtitle=false;this.updateSubtitleDisplays("");}}}}},updateSubtitleDisplays:function(e){this.each(this.subtitleDisplays,function(f){f.innerHTML=e;});}});b.extend({addClass:function(e,f){if((" "+e.className+" ").indexOf(" "+f+" ")==-1){e.className=e.className===""?f:e.className+" "+f;}},removeClass:function(f,e){if(f.className.indexOf(e)==-1){return;}var g=f.className.split(/\s+/);g.splice(g.lastIndexOf(e),1);f.className=g.join(" ");},createElement:function(f,e){return this.merge(a.createElement(f),e);},blockTextSelection:function(){a.body.focus();a.onselectstart=function(){return false;};},unblockTextSelection:function(){a.onselectstart=function(){return true;};},formatTime:function(f){var g=Math.round(f);var e=Math.floor(g/60);e=(e>=10)?e:"0"+e;g=Math.floor(g%60);g=(g>=10)?g:"0"+g;return e+":"+g;},getRelativePosition:function(f,e){return Math.max(0,Math.min(1,(f-this.findPosX(e))/e.offsetWidth));},findPosX:function(e){var f=e.offsetLeft;while(e=e.offsetParent){f+=e.offsetLeft;}return f;},getComputedStyleValue:function(e,f){return c.getComputedStyle(e,null).getPropertyValue(f);},round:function(e,f){if(!f){f=0;}return Math.round(e*Math.pow(10,f))/Math.pow(10,f);},addListener:function(e,g,f){if(e.addEventListener){e.addEventListener(g,f,false);}else{if(e.attachEvent){e.attachEvent("on"+g,f);}}},removeListener:function(e,g,f){if(e.removeEventListener){e.removeEventListener(g,f,false);}else{if(e.attachEvent){e.detachEvent("on"+g,f);}}},get:function(e,g){if(typeof XMLHttpRequest=="undefined"){XMLHttpRequest=function(){try{return new ActiveXObject("Msxml2.XMLHTTP.6.0");}catch(j){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0");}catch(i){}try{return new ActiveXObject("Msxml2.XMLHTTP");}catch(h){}throw new Error("This browser does not support XMLHttpRequest.");};}var f=new XMLHttpRequest();f.open("GET",e);f.onreadystatechange=function(){if(f.readyState==4&&f.status==200){g(f.responseText);}}.context(this);f.send();},trim:function(e){return e.toString().replace(/^\s+/,"").replace(/\s+$/,"");},bindDOMReady:function(){if(a.readyState==="complete"){return b.onDOMReady();}if(a.addEventListener){a.addEventListener("DOMContentLoaded",b.DOMContentLoaded,false);c.addEventListener("load",b.onDOMReady,false);}else{if(a.attachEvent){a.attachEvent("onreadystatechange",b.DOMContentLoaded);c.attachEvent("onload",b.onDOMReady);}}},DOMContentLoaded:function(){if(a.addEventListener){a.removeEventListener("DOMContentLoaded",b.DOMContentLoaded,false);b.onDOMReady();}else{if(a.attachEvent){if(a.readyState==="complete"){a.detachEvent("onreadystatechange",b.DOMContentLoaded);b.onDOMReady();}}}},DOMReadyList:[],addToDOMReady:function(e){if(b.DOMIsReady){e.call(a);}else{b.DOMReadyList.push(e);}},DOMIsReady:false,onDOMReady:function(){if(b.DOMIsReady){return;}if(!a.body){return setTimeout(b.onDOMReady,13);}b.DOMIsReady=true;if(b.DOMReadyList){for(var e=0;e<b.DOMReadyList.length;e++){b.DOMReadyList[e].call(a);}b.DOMReadyList=null;}}});b.bindDOMReady();Function.prototype.context=function(f){var g=this,e=function(){return g.apply(f,arguments);};return e;};Function.prototype.evtContext=function(f){var g=this,e=function(){var h=this;return g.call(f,arguments[0],h);};return e;};Function.prototype.rEvtContext=function(g,e){if(this.hasContext===true){return this;}if(!e){e=g;}for(var f in e){if(e[f]==this){e[f]=this.evtContext(g);e[f].hasContext=true;return e[f];}}return this.evtContext(g);};if(c.jQuery){(function(e){e.fn.VideoJS=function(f){this.each(function(){b.setup(this,f);});return this;};e.fn.player=function(){return this[0].player;};})(jQuery);}c.VideoJS=c._V_=b;})(window);

// wrapper plugin around the VideoJS plugin
(function(a){a.fn.init_movie_player=function(){return this.each(function(){var g=a(this).attr("href");var d=g.replace(/mp4$/,"ogv");var i=a(this).find("img");var j=i.attr("alt")?i.attr("alt"):"";var f=i.attr("src");var e=a('<div class="video-js-box vjs-cast clearfix" />');e.html('<!-- Using the Video for Everybody Embed Code http://camendesign.com/code/video_for_everybody --><video class="video-js" width="234" height="135" controls poster="'+f+'"><source src="'+g+'" type=\'video/mp4; codecs="avc1.42E01E, mp4a.40.2"\'><!-- Flash Fallback. Use any flash video player here. Make sure to keep the vjs-flash-fallback class. --><object id="flash-video" class="vjs-flash-fallback" width="234" height="135" type="application/x-shockwave-flash" data="http://releases.flowplayer.org/swf/flowplayer-3.2.1.swf"><param name="movie" value="http://releases.flowplayer.org/swf/flowplayer-3.2.1.swf"><param name="allowfullscreen" value="true"><param name="flashvars" value=\'config={"playlist":["'+f+'", {"url": "'+g+'","autoPlay":false,"autoBuffering":false}]}\'></object></video>');var h=e.find("video");a(this).replaceWith(e);h.VideoJS({controlsAtStart:false,controlsHiding:true});a(".ie7 .vjs-cast").wrap('<div class="vjs-cast-wrap" />');if(j){e.after('<div class="video-caption"><h3>'+j+"<h3></div>");}var c=a(".vjs-volume-control");var b=c.find("span");c.click(function(k){if(h[0].muted){h[0].muted=false;b.removeClass("vjs-volume-level-on");}else{h[0].muted=true;b.addClass("vjs-volume-level-on");}});});};})(jQuery);
/*
 * jQuery Expander plugin
 * Version 0.4  (12/09/2008)
 * @requires jQuery v1.1.1+
 *
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 *
 */
(function(a){a.fn.expander=function(d){var f=a.extend({},a.fn.expander.defaults,d);var c;return this.each(function(){var r=a(this);var k=a.meta?a.extend({},f,r.data()):f;var u,y,m;var q=r.html();var v=q.slice(0,k.slicePoint).replace(/\w+$/,"");y=v.match(/<\w[^>]*>/g);if(y){v=q.slice(0,k.slicePoint+y.join("").length).replace(/\w+$/,"");}if(v.lastIndexOf("<")>v.lastIndexOf(">")){v=v.slice(0,v.lastIndexOf("<"));}var l=q.slice(v.length);if(!a("span.details",this).length){if(l.replace(/\s+$/,"").split(" ").length<k.widow){return;}if(l.indexOf("</")>-1){m=l.match(/<(\/)?[^>]*>/g);for(var p=0;p<m.length;p++){if(m[p].indexOf("</")>-1){var x,t=false;for(var n=0;n<p;n++){x=m[n].slice(0,m[n].indexOf(" ")).replace(/(\w)$/,"$1>");if(x==g(m[p])){t=true;}}if(!t){v=v+m[p];var h=false;for(var A=y.length-1;A>=0;A--){if(y[A].slice(0,y[A].indexOf(" ")).replace(/(\w)$/,"$1>")==g(m[p])&&h==false){u=u?y[A]+u:y[A];h=true;}}}}}l=u&&u+l||l;}r.html([v,'<span class="read-more">',k.expandPrefix,'<a class="read-more" href="#">',k.expandText,"</a>","</span>",'<span class="details">',l,"</span>"].join(""));}var w=a("span.details",this),z=a("span.read-more",this);w.hide();z.find("a").click(function(){z.hide();if(k.expandEffect==="show"&&!k.expandSpeed){k.beforeExpand(r);w.show();k.afterExpand(r);e(k,w);}else{k.beforeExpand(r);w[k.expandEffect](k.expandSpeed,function(){w.css({zoom:""});k.afterExpand(r);e(k,w);});}return false;});if(k.userCollapse){r.find("span.details").append('<span class="re-collapse">'+k.userCollapsePrefix+'<a class="read-more" href="#">'+k.userCollapseText+"</a></span>");r.find("span.re-collapse a").click(function(){clearTimeout(c);var i=a(this).parents("span.details");b(i);k.onCollapse(r,true);return false;});}});function b(h){h.hide().prev("span.read-more").show();}function e(i,h){if(i.collapseTimer){c=setTimeout(function(){b(h);i.onCollapse(h.parent(),false);},i.collapseTimer);}}function g(h){return h.replace(/\//,"");}};a.fn.expander.defaults={slicePoint:100,widow:4,expandText:"read more",expandPrefix:"&hellip; ",collapseTimer:0,expandEffect:"fadeIn",expandSpeed:"",userCollapse:true,userCollapseText:"[collapse expanded text]",userCollapsePrefix:" ",beforeExpand:function(b){},afterExpand:function(b){},onCollapse:function(c,b){}};})(jQuery);
