(function($){$.fn.pagination=function(maxentries,opts){opts=jQuery.extend({items_per_page:10,num_display_entries:10,current_page:0,num_edge_entries:0,link_to:"#",prev_text:"Prev",next_text:"Next",ellipse_text:"...",prev_show_always:true,next_show_always:true,callback:function(){return false}},opts||{});return this.each(function(){function numPages(){return Math.ceil(maxentries/opts.items_per_page)}
function getInterval(){var ne_half=Math.ceil(opts.num_display_entries/2);var np=numPages();var upper_limit=np-opts.num_display_entries;var start=current_page>ne_half?Math.max(Math.min(current_page-ne_half,upper_limit),0):0;var end=current_page>ne_half?Math.min(current_page+ne_half,np):Math.min(opts.num_display_entries,np);return [start,end]}
function pageSelected(page_id,evt){current_page=page_id;drawLinks();var continuePropagation=opts.callback(page_id,panel);if(!continuePropagation){if(evt.stopPropagation)evt.stopPropagation();else evt.cancelBubble=true};return continuePropagation}
function drawLinks(){panel.empty();var interval=getInterval();var np=numPages();var getClickHandler=function(page_id){return function(evt){return pageSelected(page_id,evt)}};var appendItem=function(page_id,appendopts){page_id=page_id<0?0:(page_id<np?page_id:np-1);appendopts=jQuery.extend({text:page_id+1,classes:""},appendopts||{});if(page_id==current_page)var lnk=jQuery("<span class='current'>"+(appendopts.text)+"</span>");else var lnk=jQuery("<a>"+(appendopts.text)+"</a>").bind("click",getClickHandler(page_id)).attr('href',opts.link_to.replace(/__id__/,page_id));if(appendopts.classes)lnk.addClass(appendopts.classes);panel.append(lnk)};if(opts.prev_text&&(current_page>0||opts.prev_show_always))appendItem(current_page-1,{text:opts.prev_text,classes:"prev"});if(interval[0]>0&&opts.num_edge_entries>0){var end=Math.min(opts.num_edge_entries,interval[0]);for(var i=0;i<end;i++)appendItem(i);if(opts.num_edge_entries<interval[0]&&opts.ellipse_text)jQuery("<span>"+opts.ellipse_text+"</span>").appendTo(panel)};for(var i=interval[0];i<interval[1];i++)appendItem(i);if(interval[1]<np&&opts.num_edge_entries>0){if(np-opts.num_edge_entries>interval[1]&&opts.ellipse_text)jQuery("<span>"+opts.ellipse_text+"</span>").appendTo(panel);var begin=Math.max(np-opts.num_edge_entries,interval[1]);for(var i=begin;i<np;i++)appendItem(i)};if(opts.next_text&&(current_page<np-1||opts.next_show_always))appendItem(current_page+1,{text:opts.next_text,classes:"next"})};var current_page=opts.current_page;maxentries=(!maxentries||maxentries<0)?1:maxentries;opts.items_per_page=(!opts.items_per_page||opts.items_per_page<0)?1:opts.items_per_page;var panel=jQuery(this);this.selectPage=function(page_id){pageSelected(page_id)};this.prevPage=function(){if(current_page>0){pageSelected(current_page-1);return true}else return false};this.nextPage=function(){if(current_page<numPages()-1){pageSelected(current_page+1);return true}else return false};drawLinks();opts.callback(current_page,this)})}})(jQuery);(function($){$.fn.easySlider=function(options){var defaults={prevId:'prevBtn',prevText:'Previous',nextId:'nextBtn',nextText:'Next',controlsShow:true,controlsBefore:'',controlsAfter:'',controlsFade:true,firstId:'firstBtn',firstText:'First',firstShow:false,lastId:'lastBtn',lastText:'Last',lastShow:false,vertical:false,speed:800,auto:false,pause:2000,continuous:false,numeric:false,numericId:'controls'};var options=$.extend(defaults,options);this.each(function(){var obj=$(this);var s=$("li",obj).length;var w=$("li",obj).width();var h=$("li",obj).height();var clickable=true;obj.width(w);obj.height(h);obj.css("overflow","hidden");var ts=s-1;var t=0;$("ul",obj).css('width',s*w);if(options.continuous){$("ul",obj).prepend($("ul li:last-child",obj).clone().css("margin-left","-"+w+"px"));$("ul",obj).append($("ul li:nth-child(2)",obj).clone());$("ul",obj).css('width',(s+1)*w)};if(!options.vertical)$("li",obj).css('float','left');if(options.controlsShow){var html=options.controlsBefore;if(options.numeric)html+='<ol id="'+options.numericId+'"></ol>';else{if(options.firstShow)html+='<span id="'+options.firstId+'"><a href=\"javascript:void(0);\">'+options.firstText+'</a></span>';html+=' <span id="'+options.prevId+'"><a href=\"javascript:void(0);\">'+options.prevText+'</a></span>';html+=' <span id="'+options.nextId+'"><a href=\"javascript:void(0);\">'+options.nextText+'</a></span>';if(options.lastShow)html+=' <span id="'+options.lastId+'"><a href=\"javascript:void(0);\">'+options.lastText+'</a></span>'};html+=options.controlsAfter;$(obj).after(html)};if(options.numeric)for(var i=0;i<s;i++)$(document.createElement("li")).attr('id',options.numericId+(i+1)).html('<a rel='+i+' href=\"javascript:void(0);\">'+(i+1)+'</a>').appendTo($("#"+options.numericId)).click(function(){animate($("a",$(this)).attr('rel'),true)});else{$("a","#"+options.nextId).click(function(){animate("next",true)});$("a","#"+options.prevId).click(function(){animate("prev",true)});$("a","#"+options.firstId).click(function(){animate("first",true)});$("a","#"+options.lastId).click(function(){animate("last",true)})}
function setCurrent(i){i=parseInt(i)+1;$("li","#"+options.numericId).removeClass("current");$("li#"+options.numericId+i).addClass("current")}
function adjust(){if(t>ts)t=0;if(t<0)t=ts;if(!options.vertical)$("ul",obj).css("margin-left",(t*w*-1));else $("ul",obj).css("margin-left",(t*h*-1));clickable=true;if(options.numeric)setCurrent(t)}
function animate(dir,clicked){if(clickable){clickable=false;var ot=t;switch(dir){case"next":{t=(ot>=ts)?(options.continuous?t+1:ts):t+1;break};case"prev":{t=(t<=0)?(options.continuous?t-1:0):t-1;break};case"first":{t=0;break};case"last":{t=ts;break};default:{t=dir;break}};var diff=Math.abs(ot-t);var speed=diff*options.speed;if(!options.vertical){p=(t*w*-1);$("ul",obj).animate({marginLeft:p},{queue:false,duration:speed,complete:adjust})}else{p=(t*h*-1);$("ul",obj).animate({marginTop:p},{queue:false,duration:speed,complete:adjust})};if(!options.continuous&&options.controlsFade){if(t==ts){$("a","#"+options.nextId).hide();$("a","#"+options.lastId).hide()}else{$("a","#"+options.nextId).show();$("a","#"+options.lastId).show()};if(t==0){$("a","#"+options.prevId).hide();$("a","#"+options.firstId).hide()}else{$("a","#"+options.prevId).show();$("a","#"+options.firstId).show()}};if(clicked)clearTimeout(timeout);if(options.auto&&dir=="next"&&!clicked)timeout=setTimeout(function(){animate("next",false)},diff*options.speed+options.pause)}};var timeout;if(options.auto)timeout=setTimeout(function(){animate("next",false)},options.pause);if(options.numeric)setCurrent(0);if(!options.continuous&&options.controlsFade){$("a","#"+options.prevId).hide();$("a","#"+options.firstId).hide()}})}})(jQuery);(function($){$.pop=function(options){var settings={pop_class:'.pop',pop_toggle_text:''}
function initpops(){$(settings.pop_class).each(function(){var pop_classes=$(this).attr("class");$(this).addClass("pop_menu");$(this).wrap("<div class='"+pop_classes+"'></div>");$(".pop_menu").attr("class","pop_menu");$(this).before(" \
          <div class='pop_toggle'>"+settings.pop_toggle_text+"</div> \
          ")})};initpops();var totalpops=$(settings.pop_class).size()+1000;$(settings.pop_class).each(function(i){var popzindex=totalpops-i;$(this).css({zIndex:popzindex})});activePop=null;$.closeInactivePop=function closeInactivePop(closeAll){if(closeAll!=undefined)activePop=null;$(settings.pop_class).each(function(i){if($(this).hasClass('active')&&i!=activePop)$(this).removeClass('active')});return false};$(settings.pop_class).mouseover(function(){activePop=$(settings.pop_class).index(this)});$(settings.pop_class).mouseout(function(){activePop=null});$(document).click(function(){$.closeInactivePop()});$(".pop_toggle").click(function(){$(this).parent(settings.pop_class).toggleClass("active")})}})(jQuery);(function($){var L=$.loading=function(show,opts){return $('body').loading(show,opts,true)};$.fn.loading=function(show,opts,page){opts=toOpts(show,opts);var base=page?$.extend(true,{},L,L.pageOptions):L;return this.each(function(){var $el=$(this),l=$.extend(true,{},base,$.metadata?$el.metadata():null,opts);if(typeof l.onAjax=="boolean")L.setAjax.call($el,l);else L.toggle.call($el,l)})};var fixed={position:$.browser.msie?'absolute':'fixed'};$.extend(L,{version:"1.6.4",align:'top-left',pulse:'working error',mask:false,img:null,element:null,text:'Loading...',onAjax:undefined,delay:0,max:0,classname:'loading',imgClass:'loading-img',elementClass:'loading-element',maskClass:'loading-mask',css:{position:'absolute',whiteSpace:'nowrap',zIndex:1001},maskCss:{position:'absolute',opacity:.15,background:'#333',zIndex:101,display:'block',cursor:'wait'},cloneEvents:true,pageOptions:{page:true,align:'top-center',css:fixed,maskCss:fixed},html:'<div></div>',maskHtml:'<div></div>',maskedClass:'loading-masked',maskEvents:'mousedown mouseup keydown keypress',resizeEvents:'resize',working:{time:10000,text:'Still working...',run:function(l){var w=l.working,self=this;w.timeout=setTimeout(function(){self.height('auto').width('auto').text(l.text=w.text);l.place.call(self,l)},w.time)}},error:{time:100000,text:'Task may have failed...',classname:'loading-error',run:function(l){var e=l.error,self=this;e.timeout=setTimeout(function(){self.height('auto').width('auto').text(l.text=e.text).addClass(e.classname);l.place.call(self,l)},e.time)}},fade:{time:800,speed:'slow',run:function(l){var f=l.fade,s=f.speed,self=this;f.interval=setInterval(function(){self.fadeOut(s).fadeIn(s)},f.time)}},ellipsis:{time:300,run:function(l){var e=l.ellipsis,self=this;e.interval=setInterval(function(){var et=self.text(),t=l.text,i=dotIndex(t);self.text((et.length-i)<3?et+'.':t.substring(0,i))},e.time)
function dotIndex(t){var x=t.indexOf('.');return x<0?t.length:x}}},type:{time:100,run:function(l){var t=l.type,self=this;t.interval=setInterval(function(){var e=self.text(),el=e.length,txt=l.text;self.text(el==txt.length?txt.charAt(0):txt.substring(0,el+1))},t.time)}},toggle:function(l){var old=this.data('loading');if(old){if(l.show!==true)old.off.call(this,old,l)}else if(l.show!==false)l.on.call(this,l)},setAjax:function(l){if(l.onAjax){var self=this,count=0,A=l.ajax={start:function(){if(!count++)l.on.call(self,l)},stop:function(){if(!--count)l.off.call(self,l,l)}};this.bind('ajaxStart.loading',A.start).bind('ajaxStop.loading',A.stop)}else this.unbind('ajaxStart.loading ajaxStop.loading')},on:function(l,force){var p=l.parent=this.data('loading',l);if(l.max)l.maxout=setTimeout(function(){l.off.call(p,l,l)},l.max);if(l.delay&&!force)return l.timeout=setTimeout(function(){delete l.timeout;l.on.call(p,l,true)},l.delay);if(l.mask)l.mask=l.createMask.call(p,l);l.display=l.create.call(p,l);if(l.img)l.initImg.call(p,l);else if(l.element)l.initElement.call(p,l);else l.init.call(p,l);p.trigger('loadingStart',[l])},initImg:function(l){var self=this;l.imgElement=$('<img src="'+l.img+'"/>').bind('load',function(){l.init.call(self,l)});l.display.addClass(l.imgClass).append(l.imgElement)},initElement:function(l){l.element=$(l.element).clone(l.cloneEvents).show();l.display.addClass(l.elementClass).append(l.element);l.init.call(this,l)},init:function(l){l.place.call(l.display,l);if(l.pulse)l.initPulse.call(this,l)},initPulse:function(l){$.each(l.pulse.split(' '),function(){l[this].run.call(l.display,l)})},create:function(l){var el=$(l.html).addClass(l.classname).css(l.css).appendTo(this);if(l.text&&!l.img&&!l.element)el.text(l.originalText=l.text);$(window).bind(l.resizeEvents,l.resizer=function(){l.resize(l)});return el},resize:function(l){l.parent.box=null;if(l.mask)l.mask.hide();l.place.call(l.display.hide(),l);if(l.mask)l.mask.show().css(l.parent.box)},createMask:function(l){var box=l.measure.call(this.addClass(l.maskedClass),l);l.handler=function(e){return l.maskHandler(e,l)};$(document).bind(l.maskEvents,l.handler);return $(l.maskHtml).addClass(l.maskClass).css(box).css(l.maskCss).appendTo(this)},maskHandler:function(e,l){var $els=$(e.target).parents().andSelf();if($els.filter('.'+l.classname).length!=0)return true;return !l.page&&$els.filter('.'+l.maskedClass).length==0},place:function(l){var box=l.align,v='top',h='left';if(typeof box=="object")box=$.extend(l.calc.call(this,v,h,l),box);else{if(box!='top-left'){var s=box.split('-');if(s.length==1)v=h=s[0];else{v=s[0];h=s[1]}};if(!this.hasClass(v))this.addClass(v);if(!this.hasClass(h))this.addClass(h);box=l.calc.call(this,v,h,l)};this.show().css(l.box=box)},calc:function(v,h,l){var box=$.extend({},l.measure.call(l.parent,l)),H=$.boxModel?this.height():this.innerHeight(),W=$.boxModel?this.width():this.innerWidth();if(v!='top'){var d=box.height-H;if(v=='center')d/=2;else if(v!='bottom')d=0;else if($.boxModel)d-=css(this,'paddingTop')+css(this,'paddingBottom');box.top+=d};if(h!='left'){var d=box.width-W;if(h=='center')d/=2;else if(h!='right')d=0;else if($.boxModel)d-=css(this,'paddingLeft')+css(this,'paddingRight');box.left+=d};box.height=H;box.width=W;return box},measure:function(l){return this.box||(this.box=l.page?l.pageBox(l):l.elementBox(this,l))},elementBox:function(e,l){if(e.css('position')=='absolute')var box={top:0,left:0};else{var box=e.position();box.top+=css(e,'marginTop');box.left+=css(e,'marginLeft')};box.height=e.outerHeight();box.width=e.outerWidth();return box},pageBox:function(l){var full=$.boxModel&&l.css.position!='fixed';return {top:0,left:0,height:get(full,'Height'),width:get(full,'Width')}
function get(full,side){var doc=document;if(full){var s=side.toLowerCase(),d=$(doc)[s](),w=$(window)[s]();return d-css($(doc.body),'marginTop')>w?d:w};var c='client'+side;return Math.max(doc.documentElement[c],doc.body[c])}},off:function(old,l){this.data('loading',null);if(old.maxout)clearTimeout(old.maxout);if(old.timeout)return clearTimeout(old.timeout);if(old.pulse)old.stopPulse.call(this,old,l);if(old.originalText)old.text=old.originalText;if(old.mask)old.stopMask.call(this,old,l);$(window).unbind(old.resizeEvents,old.resizer);if(old.display)old.display.remove();if(old.parent)old.parent.trigger('loadingEnd',[old])},stopPulse:function(old,l){$.each(old.pulse.split(' '),function(){var p=old[this];if(p.end)p.end.call(l.display,old,l);if(p.interval)clearInterval(p.interval);if(p.timeout)clearTimeout(p.timeout)})},stopMask:function(old,l){this.removeClass(l.maskedClass);$(document).unbind(old.maskEvents,old.handler);old.mask.remove()}})
function toOpts(s,l){if(l===undefined)l=(typeof s=="boolean")?{show:s}:s;else l.show=s;if(l&&(l.img||l.element)&&!l.pulse)l.pulse=false;if(l&&l.onAjax!==undefined&&l.show===undefined)l.show=false;return l}
function css(el,prop){var val=el.css(prop);return val=='auto'?0:parseFloat(val,10)}})(jQuery);(function(){function g(o){console.log("$f.fireEvent",[].slice.call(o))}
function k(q){if(!q||typeof q!="object")return q;var o=new q.constructor();for(var p in q)if(q.hasOwnProperty(p))o[p]=k(q[p]);return o}
function m(t,q){if(!t)return;var o,p=0,r=t.length;if(r===undefined){for(o in t)if(q.call(t[o],o,t[o])===false)break}else for(var s=t[0];p<r&&q.call(s,p,s)!==false;s=t[++p]);return t}
function c(o){return document.getElementById(o)}
function i(q,p,o){if(typeof p!="object")return q;if(q&&p){m(p,function(r,s){if(!o||typeof s!="function")q[r]=s})};return q}
function n(s){var q=s.indexOf(".");if(q!=-1){var p=s.slice(0,q)||"*";var o=s.slice(q+1,s.length);var r=[];m(document.getElementsByTagName(p),function(){if(this.className&&this.className.indexOf(o)!=-1)r.push(this)});return r}}
function f(o){o=o||window.event;if(o.preventDefault){o.stopPropagation();o.preventDefault()}else{o.returnValue=false;o.cancelBubble=true};return false}
function j(q,o,p){q[o]=q[o]||[];q[o].push(p)}
function e(){return "_"+(""+Math.random()).slice(2,10)};var h=function(t,r,s){var q=this,p={},u={};q.index=r;if(typeof t=="string")t={url:t};i(this,t,true);m(("Begin*,Start,Pause*,Resume*,Seek*,Stop*,Finish*,LastSecond,Update,BufferFull,BufferEmpty,BufferStop").split(","),function(){var v="on"+this;if(v.indexOf("*")!=-1){v=v.slice(0,v.length-1);var w="onBefore"+v.slice(2);q[w]=function(x){j(u,w,x);return q}};q[v]=function(x){j(u,v,x);return q};if(r==-1){if(q[w])s[w]=q[w];if(q[v])s[v]=q[v]}});i(this,{onCuepoint:function(x,w){if(arguments.length==1){p.embedded=[null,x];return q};if(typeof x=="number")x=[x];var v=e();p[v]=[x,w];if(s.isLoaded())s._api().fp_addCuepoints(x,r,v);return q},update:function(w){i(q,w);if(s.isLoaded())s._api().fp_updateClip(w,r);var v=s.getConfig();var x=(r==-1)?v.clip:v.playlist[r];i(x,w,true)},_fireEvent:function(v,y,w,A){if(v=="onLoad"){m(p,function(B,C){if(C[0])s._api().fp_addCuepoints(C[0],r,B)});return false};A=A||q;if(v=="onCuepoint"){var z=p[y];if(z)return z[1].call(s,A,w)};if(y&&"onBeforeBegin,onMetaData,onStart,onUpdate,onResume".indexOf(v)!=-1){i(A,y);if(y.metaData){if(!A.duration)A.duration=y.metaData.duration;else A.fullDuration=y.metaData.duration}};var x=true;m(u[v],function(){x=this.call(s,A,y,w)});return x}});if(t.onCuepoint){var o=t.onCuepoint;q.onCuepoint.apply(q,typeof o=="function"?[o]:o);delete t.onCuepoint};m(t,function(v,w){if(typeof w=="function"){j(u,v,w);delete t[v]}});if(r==-1)s.onCuepoint=this.onCuepoint};var l=function(p,r,q,t){var o=this,s={},u=false;if(t)i(s,t);m(r,function(v,w){if(typeof w=="function"){s[v]=w;delete r[v]}});i(this,{animate:function(y,z,x){if(!y)return o;if(typeof z=="function"){x=z;z=500};if(typeof y=="string"){var w=y;y={};y[w]=z;z=500};if(x){var v=e();s[v]=x};if(z===undefined)z=500;r=q._api().fp_animate(p,y,z,v);return o},css:function(w,x){if(x!==undefined){var v={};v[w]=x;w=v};r=q._api().fp_css(p,w);i(o,r);return o},show:function(){this.display="block";q._api().fp_showPlugin(p);return o},hide:function(){this.display="none";q._api().fp_hidePlugin(p);return o},toggle:function(){this.display=q._api().fp_togglePlugin(p);return o},fadeTo:function(y,x,w){if(typeof x=="function"){w=x;x=500};if(w){var v=e();s[v]=w};this.display=q._api().fp_fadeTo(p,y,x,v);this.opacity=y;return o},fadeIn:function(w,v){return o.fadeTo(1,w,v)},fadeOut:function(w,v){return o.fadeTo(0,w,v)},getName:function(){return p},getPlayer:function(){return q},_fireEvent:function(w,v,x){if(w=="onUpdate"){var z=q._api().fp_getPlugin(p);if(!z)return;i(o,z);delete o.methods;if(!u){m(z.methods,function(){var B=""+this;o[B]=function(){var C=[].slice.call(arguments);var D=q._api().fp_invoke(p,B,C);return D==="undefined"||D===undefined?o:D}});u=true}};var A=s[w];if(A){var y=A.apply(o,v);if(w.slice(0,1)=="_")delete s[w];return y};return o}})}
function b(q,G,t){var w=this,v=null,D=false,u,s,F=[],y={},x={},E,r,p,C,o,A;i(w,{id:function(){return E},isLoaded:function(){return (v!==null&&v.fp_play!==undefined&&!D)},getParent:function(){return q},hide:function(H){if(H)q.style.height="0px";if(w.isLoaded())v.style.height="0px";return w},show:function(){q.style.height=A+"px";if(w.isLoaded())v.style.height=o+"px";return w},isHidden:function(){return w.isLoaded()&&parseInt(v.style.height,10)===0},load:function(J){if(!w.isLoaded()&&w._fireEvent("onBeforeLoad")!==false){var H=function(){u=q.innerHTML;if(u&&!flashembed.isSupported(G.version))q.innerHTML="";if(J){J.cached=true;j(x,"onLoad",J)};flashembed(q,G,{config:t})};var I=0;m(a,function(){this.unload(function(K){if(++I==a.length)H()})})};return w},unload:function(J){if(this.isFullscreen()&&/WebKit/i.test(navigator.userAgent)){if(J)J(false);return w};if(u.replace(/\s/g,"")!==""){if(w._fireEvent("onBeforeUnload")===false){if(J)J(false);return w};D=true;try{if(v){v.fp_close();w._fireEvent("onUnload")}}catch(H){};var I=function(){v=null;q.innerHTML=u;D=false;if(J)J(true)};setTimeout(I,50)}else if(J)J(false);return w},getClip:function(H){if(H===undefined)H=C;return F[H]},getCommonClip:function(){return s},getPlaylist:function(){return F},getPlugin:function(H){var J=y[H];if(!J&&w.isLoaded()){var I=w._api().fp_getPlugin(H);if(I){J=new l(H,I,w);y[H]=J}};return J},getScreen:function(){return w.getPlugin("screen")},getControls:function(){return w.getPlugin("controls")._fireEvent("onUpdate")},getLogo:function(){try{return w.getPlugin("logo")._fireEvent("onUpdate")}catch(H){}},getPlay:function(){return w.getPlugin("play")._fireEvent("onUpdate")},getConfig:function(H){return H?k(t):t},getFlashParams:function(){return G},loadPlugin:function(K,J,M,L){if(typeof M=="function"){L=M;M={}};var I=L?e():"_";w._api().fp_loadPlugin(K,J,M,I);var H={};H[I]=L;var N=new l(K,null,w,H);y[K]=N;return N},getState:function(){return w.isLoaded()?v.fp_getState():-1},play:function(I,H){var J=function(){if(I!==undefined)w._api().fp_play(I,H);else w._api().fp_play()};if(w.isLoaded())J();else if(D)setTimeout(function(){w.play(I,H)},50);else w.load(function(){J()});return w},getVersion:function(){var I="flowplayer.js 3.2.4";if(w.isLoaded()){var H=v.fp_getVersion();H.push(I);return H};return I},_api:function(){if(!w.isLoaded())throw "Flowplayer "+w.id()+" not loaded when calling an API method";return v},setClip:function(H){w.setPlaylist([H]);return w},getIndex:function(){return p},_swfHeight:function(){return v.clientHeight}});m(("Click*,Load*,Unload*,Keypress*,Volume*,Mute*,Unmute*,PlaylistReplace,ClipAdd,Fullscreen*,FullscreenExit,Error,MouseOver,MouseOut").split(","),function(){var H="on"+this;if(H.indexOf("*")!=-1){H=H.slice(0,H.length-1);var I="onBefore"+H.slice(2);w[I]=function(J){j(x,I,J);return w}};w[H]=function(J){j(x,H,J);return w}});m(("pause,resume,mute,unmute,stop,toggle,seek,getStatus,getVolume,setVolume,getTime,isPaused,isPlaying,startBuffering,stopBuffering,isFullscreen,toggleFullscreen,reset,close,setPlaylist,addClip,playFeed,setKeyboardShortcutsEnabled,isKeyboardShortcutsEnabled").split(","),function(){var H=this;w[H]=function(J,I){if(!w.isLoaded())return w;var K=null;if(J!==undefined&&I!==undefined)K=v["fp_"+H](J,I);else K=(J===undefined)?v["fp_"+H]():v["fp_"+H](J);return K==="undefined"||K===undefined?w:K}});w._fireEvent=function(Q){if(typeof Q=="string")Q=[Q];var R=Q[0],O=Q[1],M=Q[2],L=Q[3],K=0;if(t.debug)g(Q);if(!w.isLoaded()&&R=="onLoad"&&O=="player"){v=v||c(r);o=w._swfHeight();m(F,function(){this._fireEvent("onLoad")});m(y,function(S,T){T._fireEvent("onUpdate")});s._fireEvent("onLoad")};if(R=="onLoad"&&O!="player")return;if(R=="onError"){if(typeof O=="string"||(typeof O=="number"&&typeof M=="number")){O=M;M=L}};if(R=="onContextMenu"){m(t.contextMenu[O],function(S,T){T.call(w)});return};if(R=="onPluginEvent"||R=="onBeforePluginEvent"){var H=O.name||O;var I=y[H];if(I){I._fireEvent("onUpdate",O);return I._fireEvent(M,Q.slice(3))};return};if(R=="onPlaylistReplace"){F=[];var N=0;m(O,function(){F.push(new h(this,N++,w))})};if(R=="onClipAdd"){if(O.isInStream)return;O=new h(O,M,w);F.splice(M,0,O);for(K=M+1;K<F.length;K++)F[K].index++};var P=true;if(typeof O=="number"&&O<F.length){C=O;var J=F[O];if(J)P=J._fireEvent(R,M,L);if(!J||P!==false)P=s._fireEvent(R,M,L,J)};m(x[R],function(){P=this.call(w,O,M);if(this.cached)x[R].splice(K,1);if(P===false)return false;K++});return P}
function B(){if($f(q)){$f(q).getParent().innerHTML="";p=$f(q).getIndex();a[p]=w}else{a.push(w);p=a.length-1};A=parseInt(q.style.height,10)||q.clientHeight;E=q.id||"fp"+e();r=G.id||E+"_api";G.id=r;t.playerId=E;if(typeof t=="string")t={clip:{url:t}};if(typeof t.clip=="string")t.clip={url:t.clip};t.clip=t.clip||{};if(q.getAttribute("href",2)&&!t.clip.url)t.clip.url=q.getAttribute("href",2);s=new h(t.clip,-1,w);t.playlist=t.playlist||[t.clip];var I=0;m(t.playlist,function(){var K=this;if(typeof K=="object"&&K.length)K={url:""+K};m(t.clip,function(L,M){if(M!==undefined&&K[L]===undefined&&typeof M!="function")K[L]=M});t.playlist[I]=K;K=new h(K,I,w);F.push(K);I++});m(t,function(K,L){if(typeof L=="function"){if(s[K])s[K](L);else j(x,K,L);delete t[K]}});m(t.plugins,function(K,L){if(L)y[K]=new l(K,L,w)});if(!t.plugins||t.plugins.controls===undefined)y.controls=new l("controls",null,w);y.canvas=new l("canvas",null,w);u=q.innerHTML
function J(L){var K=w.hasiPadSupport&&w.hasiPadSupport();if(/iPad|iPhone|iPod/i.test(navigator.userAgent)&&!/.flv$/i.test(F[0].url)&&!K)return true;if(!w.isLoaded()&&w._fireEvent("onBeforeClick")!==false)w.load();return f(L)}
function H(){if(u.replace(/\s/g,"")!==""){if(q.addEventListener)q.addEventListener("click",J,false);else if(q.attachEvent)q.attachEvent("onclick",J)}else{if(q.addEventListener)q.addEventListener("click",f,false);w.load()}};setTimeout(H,0)};if(typeof q=="string"){var z=c(q);if(!z)throw "Flowplayer cannot access element: "+q;q=z;B()}else B()};var a=[]
function d(o){this.length=o.length;this.each=function(p){m(o,p)};this.size=function(){return o.length}};window.flowplayer=window.$f=function(){var p=null;var o=arguments[0];if(!arguments.length){m(a,function(){if(this.isLoaded()){p=this;return false}});return p||a[0]};if(arguments.length==1){if(typeof o=="number")return a[o];else{if(o=="*")return new d(a);m(a,function(){if(this.id()==o.id||this.id()==o||this.getParent()==o){p=this;return false}});return p}};if(arguments.length>1){var t=arguments[1],q=(arguments.length==3)?arguments[2]:{};if(typeof t=="string")t={src:t};t=i({bgcolor:"#000000",version:[9,0],expressInstall:"http://static.flowplayer.org/swf/expressinstall.swf",cachebusting:true},t);if(typeof o=="string"){if(o.indexOf(".")!=-1){var s=[];m(n(o),function(){s.push(new b(this,k(t),k(q)))});return new d(s)}else{var r=c(o);return new b(r!==null?r:o,t,q)}}else if(o)return new b(o,t,q)};return null};i(window.$f,{fireEvent:function(){var o=[].slice.call(arguments);var q=$f(o[0]);return q?q._fireEvent(o.slice(1)):null},addPlugin:function(o,p){b.prototype[o]=p;return $f},each:m,extend:i});if(typeof jQuery=="function"){jQuery.fn.flowplayer=function(q,p){if(!arguments.length||typeof arguments[0]=="number"){var o=[];this.each(function(){var r=$f(this);if(r)o.push(r)});return arguments.length?o[arguments[0]]:new d(o)};return this.each(function(){$f(this,k(q),p?k(p):{})})}}})();(function(){var h=document.all,j="http://www.adobe.com/go/getflashplayer",c=typeof jQuery=="function",e=/(\d+)[^\d]+(\d+)[^\d]*(\d*)/,b={width:"100%",height:"100%",id:"_"+(""+Math.random()).slice(9),allowfullscreen:true,allowscriptaccess:"always",quality:"high",version:[3,0],onFail:null,expressInstall:null,w3c:false,cachebusting:false};if(window.attachEvent)window.attachEvent("onbeforeunload",function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){}})
function i(m,l){if(l){for(var f in l)if(l.hasOwnProperty(f))m[f]=l[f]};return m}
function a(f,n){var m=[];for(var l in f)if(f.hasOwnProperty(l))m[l]=n(f[l]);return m};window.flashembed=function(f,m,l){if(typeof f=="string")f=document.getElementById(f.replace("#",""));if(!f)return;if(typeof m=="string")m={src:m};return new d(f,i(i({},b),m),l)};var g=i(window.flashembed,{conf:b,getVersion:function(){var m,f;try{f=navigator.plugins["Shockwave Flash"].description.slice(16)}catch(o){try{m=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");f=m&&m.GetVariable("$version")}catch(n){try{m=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");f=m&&m.GetVariable("$version")}catch(l){}}};f=e.exec(f);return f?[f[1],f[3]]:[0,0]},asString:function(l){if(l===null||l===undefined)return null;var f=typeof l;if(f=="object"&&l.push)f="array";switch(f){case"string":{l=l.replace(new RegExp('(["\\\\])',"g"),"\\$1");l=l.replace(/^\s?(\d+\.?\d+)%/,"$1pct");return '"'+l+'"'};case"array":return "["+a(l,function(o){return g.asString(o)}).join(",")+"]";case"function":return '"function()"';case"object":{var m=[];for(var n in l)if(l.hasOwnProperty(n))m.push('"'+n+'":'+g.asString(l[n]));return "{"+m.join(",")+"}"}};return String(l).replace(/\s/g," ").replace(/\'/g,'"')},getHTML:function(o,l){o=i({},o);var n='<object width="'+o.width+'" height="'+o.height+'" id="'+o.id+'" name="'+o.id+'"';if(o.cachebusting)o.src+=((o.src.indexOf("?")!=-1?"&":"?")+Math.random());if(o.w3c||!h)n+=' data="'+o.src+'" type="application/x-shockwave-flash"';else n+=' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"';n+=">";if(o.w3c||h)n+='<param name="movie" value="'+o.src+'" />';o.width=o.height=o.id=o.w3c=o.src=null;o.onFail=o.version=o.expressInstall=null;for(var m in o)if(o[m])n+='<param name="'+m+'" value="'+o[m]+'" />';var p="";if(l){for(var f in l)if(l[f]){var q=l[f];p+=f+"="+(/function|object/.test(typeof q)?g.asString(q):q)+"&"};p=p.slice(0,-1);n+='<param name="flashvars" value=\''+p+"' />"};n+="</object>";return n},isSupported:function(f){return k[0]>f[0]||k[0]==f[0]&&k[1]>=f[1]}});var k=g.getVersion()
function d(f,n,m){if(g.isSupported(n.version))f.innerHTML=g.getHTML(n,m);else if(n.expressInstall&&g.isSupported([6,65]))f.innerHTML=g.getHTML(i(n,{src:n.expressInstall}),{MMredirectURL:location.href,MMplayerType:"PlugIn",MMdoctitle:document.title});else{if(!f.innerHTML.replace(/\s/g,"")){f.innerHTML="<h2>Flash version "+n.version+" or greater is required</h2><h3>"+(k[0]>0?"Your version is "+k:"You have no flash plugin installed")+"</h3>"+(f.tagName=="A"?"<p>Click here to download latest version</p>":"<p>Download latest version from <a href='"+j+"'>here</a></p>");if(f.tagName=="A")f.onclick=function(){location.href=j}};if(n.onFail){var l=n.onFail.call(this);if(typeof l=="string")f.innerHTML=l}};if(h)window[n.id]=document.getElementById(n.id);i(this,{getRoot:function(){return f},getOptions:function(){return n},getConf:function(){return m},getApi:function(){return f.firstChild}})};if(c){jQuery.tools=jQuery.tools||{version:"3.2.4"};jQuery.tools.flashembed={conf:b};jQuery.fn.flashembed=function(l,f){return this.each(function(){$(this).data("flashembed",flashembed(this,l,f))})}}})();$(document).ready(function(){$.pop();$.ifixpng("/static/images/pixel.gif");$("img, .fixpng").ifixpng()});$(document).ready(function(){$('#badge').feedbackBadge({css3Safe:$.browser.safari?true:false,animate:true})})
function getMovieConfig(){return {screen:{bottom:0},plugins:{controls:{url:'flowplayer.controls-3.2.3.swf',backgroundColor:"transparent",backgroundGradient:"none",sliderColor:'#FFFFFF',sliderBorder:'0',volumeSliderColor:'#FFFFFF',volumeBorder:'0',timeColor:'#FFFFFF',durationColor:'#FFFFFF',tooltipColor:'#F0F0F0',tooltipTextColor:'#000000'},apache:{url:'flowplayer.pseudostreaming-3.2.5.swf'}},clip:{autoPlay:true}}}
function toggleLoading(){$.loading({align:'center-left',text:'',max:10000,pulse:'fade',mask:false})};(function($){$.ifixpng=function(customPixel){$.ifixpng.pixel=customPixel};$.ifixpng.regexp={bg:/^url\(["']?(.*\.png([?].*)?)["']?\)$/i,img:/.*\.png([?].*)?$/i},$.ifixpng.getPixel=function(){return $.ifixpng.pixel||'images/pixel.gif'};var hack={base:$('base').attr('href'),ltie7:$.browser.msie&&$.browser.version<7,filter:function(src){return "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,sizingMethod=crop,src='"+src+"')"}};$.fn.ifixpng=hack.ltie7?function(){function fixImage(image,source,width,height,hidden){image.css({filter:hack.filter(source),width:width,height:height}).attr({src:$.ifixpng.getPixel()}).positionFix()};return this.each(function(){var $$=$(this);if($$.is('img')||$$.is('input')){var source,img;if(this.src&&this.src.match($.ifixpng.regexp.img)){source=(hack.base&&this.src.substring(0,1)!='/'&&this.src.indexOf(hack.base)===-1)?hack.base+this.src:this.src;if(!this.width||!this.height)$(new Image()).one('load',function(){fixImage($$,source,this.width,this.height);$(this).remove()}).attr('src',source);else fixImage($$,source,this.width,this.height)}}else if(this.style){var imageSrc=$$.css('backgroundImage');if(imageSrc&&imageSrc.match($.ifixpng.regexp.bg)&&this.currentStyle.backgroundRepeat=='no-repeat'){imageSrc=RegExp.$1;var x=this.currentStyle.backgroundPositionX||0,y=this.currentStyle.backgroundPositionY||0;if(x||y){var css={},img;if(typeof x!='undefined'){if(x=='left')css.left=0;else if(x=='right')css.right=$$.width()%2===1?-1:0;else css.left=x};if(typeof y!='undefined'){if(y=='bottom')css.bottom=$$.height()%2===1?-1:0;else if(y=='top')css.top=0;else css.top=y};img=new Image();$(img).one('load',function(){var x,y,expr={},prop;if(/center|%/.test(css.top)){expr.top="(this.parentNode.offsetHeight - this.offsetHeight) * "+(css.top=='center'?0.5:(parseInt(css.top)/100));delete css.top};if(/center|%/.test(css.left)){expr.left="(this.parentNode.offsetWidth - this.offsetWidth) * "+(css.left=='center'?0.5:(parseInt(css.left)/100));delete css.left};$$.positionFix().css({backgroundImage:'none'}).prepend($('<div></div>').css(css).css({width:this.width,height:this.height,position:'absolute',filter:hack.filter(imageSrc)}));if(expr.top||expr.left){var elem=$$.children(':first')[0];for(prop in expr)elem.style.setExpression(prop,expr[prop],'JavaScript')};$(this).remove()});img.src=imageSrc}else $$.css({backgroundImage:'none',filter:hack.filter(imageSrc)})}}})}:function(){return this};$.fn.positionFix=function(){return this.each(function(){var $$=$(this);if($$.css('position')!='absolute')$$.css({position:'relative'})})}})(jQuery);(function($){$.fn.feedbackBadge=function(options){this.config={css:{position:'absolute','float':'left',display:'none',zIndex:'999'},animate:false,css3Safe:false,'float':'left'};$.extend(this.config,options);this.config.css.float=this.config.float;this.window=$(window);var self=this;if(this.config.css3Safe){this.badgeHeight=this.height();this.windowHeight=self.window.height();this.topDistance=~~(+(this.windowHeight-this.badgeHeight)/2);this.config.css.position='absolute';if(typeof (this.config.css.marginTop)=='undefined')this.config.css.marginTop=this.getTopMiddleDistance(true);if(this.config.animate)self.window.scroll(function(){self.stop().animate({'margin-top':self.getTopMiddleDistance(true)},1000)});else self.window.scroll(function(){self.css('margin-top',self.getTopMiddleDistance(true))});self.window.resize(function(){self.badgeHeight=self.height();self.windowHeight=self.window.height();self.topDistance=~~(+(self.windowHeight-self.badgeHeight)/2);self.css('margin-top',self.getTopMiddleDistance(true))})}else{this.config.css.position='fixed';if(typeof (this.config.css.top)=='undefined')this.config.css.top=this.getTopMiddleDistance()};if(typeof (this.config.onClick)=='function')$(this).bind('click',this.config.onClick);$(this).css(this.config.css).prependTo('body').show();return this},$.fn.getTopMiddleDistance=function(inPixels){if(inPixels)return (this.topDistance+this.window.scrollTop()+'px');else{var badgeHeightPerc=$(this).height()*100/this.window.height();return ~~(+(100-badgeHeightPerc)/2)+'%'}}})(jQuery)
