/* FullScreen.js */
(function(){var fullScreenApi={supportsFullScreen:false,isFullScreen:function(){return false;},requestFullScreen:function(){},cancelFullScreen:function(){},fullScreenEventName:"",prefix:""},browserPrefixes="webkit moz o ms khtml".split(" ");if(typeof document.cancelFullScreen!="undefined"){fullScreenApi.supportsFullScreen=true;}else{for(var i=0,il=browserPrefixes.length;i<il;i++){fullScreenApi.prefix=browserPrefixes[i];if(typeof document[fullScreenApi.prefix+"CancelFullScreen"]!="undefined"){fullScreenApi.supportsFullScreen=true;break;}}}if(fullScreenApi.supportsFullScreen){fullScreenApi.fullScreenEventName=fullScreenApi.prefix+"fullscreenchange";fullScreenApi.isFullScreen=function(){switch(this.prefix){case"":return document.fullScreen;case"webkit":return document.webkitIsFullScreen;default:return document[this.prefix+"FullScreen"];}};fullScreenApi.requestFullScreen=function(el){return(this.prefix==="")?el.requestFullScreen():el[this.prefix+"RequestFullScreen"]();};fullScreenApi.cancelFullScreen=function(el){return(this.prefix==="")?document.cancelFullScreen():document[this.prefix+"CancelFullScreen"]();};}if(typeof jQuery!="undefined"){jQuery.fn.requestFullScreen=function(){return this.each(function(){if(fullScreenApi.supportsFullScreen){fullScreenApi.requestFullScreen(this);}});};}window.fullScreenApi=fullScreenApi;})();/* Color.js */
(function($){var scale=255;var rgbToHsl=function(r,g,b){var h=0;var s=0;var l=0;r/=scale;g/=scale;b/=scale;var min=Math.min(r,g,b);var max=Math.max(r,g,b);var c=max-min;if(c==0){h=210/60;}else{if(max==r){h=(g-b)/c;}else{if(max==g){h=(b-r)/c+2;}else{if(max==b){h=(r-g)/c+4;}}}}h*=60;l=(max+min)/2;if(c==0){s=0;}else{if(l<=0.5){s=c/(2*l);}else{s=c/(2-2*l);}}if(h<0){h+=360;}return{h:h,s:s,l:l};};var hslToRgb=function(h,s,l){var r=0;var g=0;var b=0;if(s==0){r=g=b=l;}else{var c=(l<=0.5?2*l:2-2*l)*s;h/=60;var x=c*(1-Math.abs(h%2-1));switch(Math.floor(h)){case 0:r=c;g=x;b=0;break;case 1:r=x;g=c;b=0;break;case 2:r=0;g=c;b=x;break;case 3:r=0;g=x;b=c;break;case 4:r=x;g=0;b=c;break;case 5:r=c;g=0;b=x;break;}var m=l-c/2;r+=m;g+=m;b+=m;}return{r:Math.round(r*scale),g:Math.round(g*scale),b:Math.round(b*scale)};};function Color(r,g,b,h,s,l){this.r=r;this.g=g;this.b=b;this.h=h;this.s=s;this.l=l;}Color.prototype.toString=function(){var s="#";var rgb=[this.r,this.g,this.b];for(var i=0;i<rgb.length;++i){var color=rgb[i];var hex=color.toString(16);s+=hex.length==1?"0"+hex:hex;}if(s.charAt(1)==s.charAt(2)&&s.charAt(3)==s.charAt(4)&&s.charAt(5)==s.charAt(6)){s="#"+s.charAt(1)+s.charAt(3)+s.charAt(5);}return s.toLowerCase();};Color.prototype.toRgb=function(){return(this.r<<16)+(this.g<<8)+this.b;};$.extend(true,window,{Podtrac:{Color:{fromRgb:function(r,g,b){r=Math.round(Math.max(Math.min(r,255),0));g=Math.round(Math.max(Math.min(g,255),0));b=Math.round(Math.max(Math.min(b,255),0));var hsl=rgbToHsl(r,g,b);return new Color(r,g,b,hsl.h,hsl.s,hsl.l);},fromRgbHex:function(hex){var r=0;var g=0;var b=0;switch(typeof(hex)){case"number":r=hex>>16&255;g=hex>>8&255;b=hex&255;break;case"string":hex=hex.replace("#","");if(hex.length==3){r=parseInt(hex.charAt(0)+hex.charAt(0),16);g=parseInt(hex.charAt(1)+hex.charAt(1),16);b=parseInt(hex.charAt(2)+hex.charAt(2),16);}else{if(hex.length==6){r=parseInt(hex.substring(0,2),16);g=parseInt(hex.substring(2,4),16);b=parseInt(hex.substring(4,6),16);}}break;}return this.fromRgb(r,g,b);},fromHsl:function(h,s,l){h%=360;s=Math.max(Math.min(s,1),0);l=Math.max(Math.min(l,1),0);var rgb=hslToRgb(h,s,l);return new Color(rgb.r,rgb.g,rgb.b,h,s,l);},generatePalette:function(baseColor,numberOfColors,lRange,hRange){numberOfColors=numberOfColors||1;lRange=lRange||baseColor.l>0.5?baseColor.l:1-baseColor.l;hRange=hRange||0;var palette=[];var direction=baseColor.l>0.5?-1:1;var lStep=numberOfColors>1?direction*(lRange/(numberOfColors-1)):0;var hStep=hRange/numberOfColors;for(var i=0;i<numberOfColors;++i){var h=baseColor.h+hStep*i;if(h>360){h-=360;}palette.push(Podtrac.Color.fromHsl(h,baseColor.s,baseColor.l+lStep*i));}return palette;}}}});})(jQuery);/* Mime.js */
(function($){var data=[[".flv"],["video/x-flv"],[".mov"],["video/quicktime","video/mov"],[".m4a"],["audio/mp4","audio/mpeg","audio/mpg","audio/m4a","audio/x-m4a"],[".m4v",".mp4"],["video/mp4","video/mpeg","video/mpg","video/x-m4v"],[".mp3"],["audio/mpeg"],[".ogv",".ogg"],["video/ogg"],[".webm"],["video/webm"]];var mimeToExtensionMap={};var extensionToMimeMap={};var defaultExtension="";var defaultMimeType="application/octet-stream";for(var i=0;i<data.length;i+=2){var extensions=data[i];var mimes=data[i+1];for(var j=0;j<extensions.length;++j){extensionToMimeMap[extensions[j]]=mimes[0];}for(var j=0;j<mimes.length;++j){mimeToExtensionMap[mimes[j]]=extensions[0];}}$.extend(true,window,{Podtrac:{Mime:{getExtension:function(mimeType){return mimeToExtensionMap[mimeType]||defaultExtension;},getMimeType:function(url){var extension="";if(url&&url.lastIndexOf(".")>=0){extension=url.substring(url.lastIndexOf("."));}return extensionToMimeMap[extension]||defaultMimeType;}}}});})(jQuery);/* Player.js */
(function($,color){var defaults={backgroundColor:0,color:26265,height:360,image:null,media:null,plugins:["flash","html5","quicktime"],width:480};var pluginInterface={name:null,destroy:function(){},load:function(image,media,index){},pause:function(){},play:function(){},resize:function(){},seek:function(seconds){},volume:function(v){}};var pluginFactoryInterface={canPlay:function(media){},create:function($wraper,id,options,index){},hasOwnControls:false,canFullScreen:false};var controllers={};$.extend(true,window,{Podtrac:{Player:{create:function(id,options){options=$.extend({},defaults,options);options.palette=color.generatePalette(color.fromRgbHex(options.color),6,null,30);var controller=new Controller(id,options);controllers[id]=controller;return controller;},get:function(id){return controllers[id];},log:function(id,message){if(typeof console!=undefined){console.log(id+": "+message);}},Plugin:pluginInterface,PluginFactory:pluginFactoryInterface,Plugins:{},register:function(name,plugin){this.Plugins[name]=plugin;},remove:function(id){var controller=controllers[id];if(controller){controller.destroy();delete controllers[id];}},root:"/v2"}}});function PlayerState(pluginName){this.plugin=pluginName;this.time=0;this.duration=0;this.buffered=0;this.scale=1;this.playing=false;this.state="idle";this.volume=1;this.marker=undefined;}PlayerState.prototype.setBuffered=function(buffered){var changed=false;if($.isNumeric(buffered)&&this.buffered!=buffered){this.buffered=buffered;changed=true;}return changed;};PlayerState.prototype.setState=function(state){var changed=false;if(this.state!=state){this.state=state;changed=true;}return changed;};PlayerState.prototype.setTime=function(time,duration,scale){var changed=false;if($.isNumeric(time)&&this.time!=time){this.time=time;changed=true;}if($.isNumeric(duration)&&this.duration!=duration){this.duration=duration;changed=true;}if($.isNumeric(scale)&&this.scale!=scale){this.scale=scale;changed=true;}return changed;};PlayerState.prototype.setVolume=function(volume){var changed=false;if($.isNumeric(volume)&&this.volume!=volume){this.volume=volume;changed=true;}return changed;};function Controller(id,options){var controller=this;var state=new PlayerState("none");var $container=$("#"+id);var plugin,$plugin,overlay,$overlay,controls,$controls;var controlsHeight=Podtrac.Player.Controls.CONTROLS_HEIGHT;var lastVolume=0;var checkMarkers=function(time,scale){var fakeLength=30;if(time>=0&&scale>0&&options.markers){var seconds=time/scale;if(state.marker){var end=state.marker.end||state.marker.start+fakeLength;if(seconds<state.marker.start||seconds>end){$(controls).trigger("markerleave.controls",state.marker);state.marker=undefined;return;}}else{$.each(options.markers,function(index,marker){var end=marker.end||marker.start+fakeLength;if(seconds>=marker.start&&seconds<=end){$(controls).trigger("markerenter.controls",marker);state.marker=marker;return false;}});}}};$container.css({backgroundColor:color.fromRgbHex(options.backgroundColor).toString(),overflow:"hidden",position:"relative",textAlign:"left"}).width(options.width).height(options.height).empty().bind(fullScreenApi.fullScreenEventName,function(event){if(fullScreenApi.isFullScreen()){$container.hide().width("100%").height("100%").show(10);}else{$container.hide().width(options.width).height(options.height).show(10);}});$overlay=$("<div>").css({position:"absolute",top:0,left:0,right:0,bottom:controlsHeight+"px"});$container.append($overlay);overlay=Podtrac.Player.Overlay.create($overlay,id,options);$(overlay).bind("overlaystate",function(){controller.play();});$plugin=$("<div>").css({display:"none",position:"absolute",top:0,left:0,right:0,bottom:controlsHeight+"px"});$container.append($plugin);$controls=$("<div>").css({position:"absolute",left:0,right:0,bottom:0}).height(controlsHeight);$container.append($controls);controls=Podtrac.Player.Controls.create($controls,id,options);$(controls).bind("play.controls",function(){controller.play();}).bind("fullscreen.controls",function(event,isFullScreen){if(isFullScreen){fullScreenApi.cancelFullScreen();}else{$container.requestFullScreen();}}).bind("markerover.controls",function(event,marker){$(controller).trigger("playermarkerover",marker);}).bind("markerout.controls",function(event,marker){$(controller).trigger("playermarkerout",marker);}).bind("markerenter.controls",function(event,marker){$(controller).trigger("playermarkerenter",marker);}).bind("markerleave.controls",function(event,marker){$(controller).trigger("playermarkerleave",marker);}).bind("mute.controls",function(){lastVolume=state.volume;controller.volume(0);}).bind("unmute.controls",function(){controller.volume(lastVolume);}).bind("pause.controls",function(){controller.pause();}).bind("seek.controls",function(event,percent){if(plugin){plugin.seek(percent*(state.duration/state.scale));}else{controller.load(options,true);}}).bind("volume.controls",function(event,volume){if(state.volume!=volume){plugin.volume(volume);}});$.extend(this,{destroy:function(){if(plugin){plugin.destroy();}},load:function(loadOptions,autoPlay){$.extend(options,loadOptions);overlay.load(options);if(!autoPlay){if(plugin){$(plugin).unbind();plugin.destroy();}if(options.duration){controls.updateTime(0,options.duration,1);}controls.show();return;}$.each(options.media,function(){if(this.url){this.url=this.url.replace(/#.*$/i,"");}if(this.mime){var canonical=Podtrac.Mime.getMimeType(Podtrac.Mime.getExtension(this.mime));this.mime=canonical=="application/octet-stream"?null:canonical;}if(!this.mime){if(this.url.match(/^rtmp/i)){if(this.url.match(/mp3:/i)){this.mime=Podtrac.Mime.getMimeType(".mp3");}else{if(this.url.match(/mp4:/i)){this.mime=Podtrac.Mime.getMimeType(this.url);}else{this.mime=Podtrac.Mime.getMimeType(".flv");}}}else{this.mime=Podtrac.Mime.getMimeType(this.url);}}});for(var i=0;i<options.plugins.length;++i){var name=options.plugins[i];var pluginFactory=Podtrac.Player.Plugins[name];if(pluginFactory){var index=pluginFactory.canPlay(options.media);if(typeof index!="undefined"){var isAudio=options.media[index].mime.match(/^audio/i);controls.enableFullScreen(!isAudio&&fullScreenApi.supportsFullScreen&&pluginFactory.canFullScreen);if(loadOptions.duration){controls.updateTime(0,loadOptions.duration,1);}else{controls.updateTime(0,0,1);}if(pluginFactory.hasOwnControls){controls.hide();}else{controls.show();}state=new PlayerState(name);$(controller).trigger("playerstate",state);if(isAudio){$overlay.show();$plugin.css({top:(pluginFactory.hasOwnControls?options.height-controlsHeight:options.height)+"px",bottom:pluginFactory.hasOwnControls?0:controlsHeight+"px"}).show();}else{$overlay.hide();$plugin.css({top:0,bottom:pluginFactory.hasOwnControls?0:controlsHeight+"px"}).show();}if(plugin&&plugin.name==name){plugin.load(options.image,options.media,index);}else{if(plugin){$(plugin).unbind();plugin.destroy();}plugin=pluginFactory.create($plugin,id,{color:options.color,palette:options.palette,image:options.image,media:options.media,width:options.width,height:options.height-(pluginFactory.hasOwnControls?0:controlsHeight)},index);$(plugin).bind("pluginerror",function(event,message){if(console){console.log("ERROR: "+message);}$(controller).trigger("playererror",message);}).bind("pluginbuffer",function(event,percent){if(state.setBuffered(percent)){$(controller).trigger("playerstate",state);controls.updateBuffer(percent);}}).bind("pluginstate",function(event,playstate){if(state.setState(playstate)){$(controller).trigger("playerstate",state);controls.updatePlayState(playstate);overlay.updatePlayState(playstate);}}).bind("plugintime",function(event,time,duration,scale){if(state.setTime(time,duration,scale)){$(controller).trigger("playerstate",state);controls.updateTime(time,duration,scale);checkMarkers(time,scale);}}).bind("pluginvolume",function(event,volume){if(state.setVolume(volume)){$(controller).trigger("playerstate",state);controls.updateVolume(volume);}});}return;}}}if(plugin){$(plugin).unbind();plugin.destroy();plugin=null;}alert("No compatible player found");},pause:function(){if(plugin){plugin.pause();}controls.updatePlayState("paused");},play:function(){if(plugin){plugin.play();}else{controller.load(options,true);}controls.updatePlayState("playing");},seek:function(seconds){if(plugin){plugin.seek(seconds);}else{controller.load(options,true);}},state:function(){return state;},updateMarkers:function(markers){controls.updateMarkers(markers);},volume:function(volume){if(plugin){plugin.volume(volume);}}});if(options.media){this.load(options);}}})(jQuery,window.Podtrac.Color);/* Player.Controls.js */
(function($,player,color){var buttonSize=25;var scrubHeight=7;var controlsHeight=buttonSize+scrubHeight;var volumeWidth=60;var volumeHandleWidth=4;var margin=5;var hms=function(ticks,scale){var s=Math.round(ticks/scale);var h=Math.floor(s/(60*60));s%=(60*60);var m=Math.floor(s/60);s%=60;return{h:h,m:m,s:s};};var format=function(time,duration,scale){scale=scale||1;var t=hms(time,scale);var d=hms(duration,scale);var f=[];if(d.h>10){f.push((t.h<10?"0":"")+t.h);}else{if(d.h>0){f.push(t.h);}}f.push((t.m<10?"0":"")+t.m);f.push((t.s<10?"0":"")+t.s);return f.join(":");};var formatTime=function(time,duration,scale){return format(time,duration,scale)+" / "+format(duration,duration,scale);};$.extend(true,player,{Controls:{CONTROLS_HEIGHT:controlsHeight,create:function($wrapper,id,options){var uiColor=options.palette[0];var scrubBgColor=options.palette[1];var volHandleColor=options.palette[2];var scrubBufferedColor=options.palette[2];var scrubTimeColor=options.palette[3];var volLevelColor=options.palette[3];var textColor=options.palette[3];var $wrapper,$playButton,$pauseButton,$fullScreenButton,$time,$scrubBackground,$scrubTime,$scrubBuffered,$markerHolder,markers,$volumeButton,$volumeHolder,$volumeArea,$volumeLevel,$volumeLevelBg,$volumeHandle,scrubDragging,volumeDragging;var currentVolume=1,lastVolume=1,lastDuration=0,lastScale=1,lastWidth=0;var enableFullScreen=function(enabled){if(enabled){$time.css("right",buttonSize+"px");$fullScreenButton.show();}else{$time.css("right",margin+"px");$fullScreenButton.hide();}};var resizeBuffer=function(buffered){var scrubWidth=$wrapper.width();if(buffered>0){$scrubBuffered.stop().animate({width:Math.round(scrubWidth*buffered)+"px"},{duration:50,queue:false});}else{$scrubBuffered.width(0);}};var resizeTime=function(time,duration){var scrubWidth=$wrapper.width();if(duration>0){if(!scrubDragging){$scrubTime.stop().animate({width:Math.round(scrubWidth*(time/duration))+"px"},{duration:50,queue:false});}}else{$scrubTime.width(0);}};var createMarkers=function(duration,scale){$markerHolder.empty();if(options.markers&&duration>0&&scale>0){var durationSeconds=duration/scale;var holderWidth=$markerHolder.width();$.each(options.markers,function(index,marker){if(marker.start<durationSeconds){var markerRadius=2;var minWidth=markerRadius*2;var markerHeight=scrubHeight-2;var markerWidth=Math.max(Math.round(holderWidth*((marker.end-marker.start)/durationSeconds)),minWidth);var markerLeft=Math.min(Math.round(holderWidth*(marker.start/durationSeconds)),holderWidth-markerWidth);var markerColor=marker.color?color.fromRgbHex(marker.color):options.palette[0];$markerHolder.append($("<div>").css({backgroundColor:markerColor.toString(),borderRadius:markerRadius+"px",position:"absolute",top:"1px",left:markerLeft+"px"}).width(markerWidth).height(markerHeight).hover(function(){$(controls).trigger("markerover.controls",marker);},function(){$(controls).trigger("markerout.controls",marker);}));}});}};var swapButtons=function(playing){if(playing){$playButton.hide();$pauseButton.show();}else{$pauseButton.hide();$playButton.show();}};var makeButton=function(draw,altUrl){var canvas=$("<canvas>").get(0);if(canvas&&canvas.getContext){try{var context=canvas.getContext("2d");draw(context,0,options.palette[3].toString());draw(context,buttonSize,options.palette[4].toString());var data=canvas.toDataURL();if(data&&data.length>10){return data;}}catch(ex){}}return altUrl;};var playButtonUrl=makeButton(function(context,xOffset,color){context.fillStyle=color;context.beginPath();context.moveTo(xOffset+7,5);context.lineTo(xOffset+18,12);context.lineTo(xOffset+7,19);context.fill();},player.root+"/style/button-play.png");var pauseButtonUrl=makeButton(function(context,xOffset,color){context.fillStyle=color;context.fillRect(xOffset+7,7,4,11);context.fillRect(xOffset+13,7,4,11);},player.root+"/style/button-pause.png");var volumeButtonUrl=makeButton(function(context,xOffset,color){context.fillStyle=color;context.fillRect(xOffset+6,9,2,7);context.beginPath();context.moveTo(xOffset+9,9);context.lineTo(xOffset+15,6);context.lineTo(xOffset+15,19);context.lineTo(xOffset+9,16);context.fill();context.strokeStyle=color;context.beginPath();context.arc(xOffset+17,13,1,Math.PI/2,3*Math.PI/2,true);context.stroke();context.beginPath();context.arc(xOffset+17,13,4,Math.PI/2,3*Math.PI/2,true);context.stroke();},player.root+"/style/button-volume.png");var arrow=function(context,color,xFactor,yFactor,xOffset){var o=13;context.fillStyle=color;context.beginPath();context.moveTo(xOffset+o+6*xFactor,o+6*yFactor);context.lineTo(xOffset+o+1*xFactor,o+6*yFactor);context.lineTo(xOffset+o+3*xFactor,o+4*yFactor);context.lineTo(xOffset+o+1*xFactor,o+2*yFactor);context.lineTo(xOffset+o+2*xFactor,o+1*yFactor);context.lineTo(xOffset+o+4*xFactor,o+3*yFactor);context.lineTo(xOffset+o+6*xFactor,o+1*yFactor);context.fill();};var fullScreenButtonUrl=makeButton(function(context,xOffset,color){arrow(context,color,-1,-1,xOffset);arrow(context,color,-1,1,xOffset);arrow(context,color,1,-1,xOffset);arrow(context,color,1,1,xOffset);},player.root+"/style/button-full-screen.png");$wrapper.css("background-color",uiColor.toString());$playButton=$("<a>",{href:"#play",css:{background:"url("+playButtonUrl+") no-repeat 0 0",position:"absolute",bottom:0}}).hover(function(){$(this).css("background-position","-"+buttonSize+"px 0");},function(){$(this).css("background-position","0 0");}).width(buttonSize).height(buttonSize).click(function(event){event.preventDefault();$(controls).trigger("play.controls");swapButtons(true);});$wrapper.append($playButton);$pauseButton=$("<a>",{href:"#pause",css:{display:"none",background:"url("+pauseButtonUrl+") no-repeat 0 0",position:"absolute",bottom:0}}).click(function(event){event.preventDefault();$(controls).trigger("pause.controls");swapButtons(false);}).hover(function(){$(this).css("background-position","-"+buttonSize+"px 0");},function(){$(this).css("background-position","0 0");}).width(buttonSize).height(buttonSize);$wrapper.append($pauseButton);$scrubBackground=$("<div>").css({backgroundColor:scrubBgColor.toString(),cursor:"pointer",position:"absolute",top:0}).width("100%").height(scrubHeight).click(function(event){var percent=(event.pageX-$(this).offset().left)/$(this).width();$(controls).trigger("seek.controls",percent);}).mousedown(function(event){event.preventDefault();scrubDragging=true;$(document).one("mouseup",function(event){event.preventDefault();scrubDragging=false;});}).mousemove(function(event){if(scrubDragging){var scrubWidth=$(this).width();var percent=(event.pageX-$(this).offset().left)/scrubWidth;$scrubTime.width(percent*scrubWidth);$(controls).trigger("seek.controls",percent);}});$wrapper.append($scrubBackground);$scrubBuffered=$("<div>").css({backgroundColor:scrubBufferedColor.toString(),position:"absolute"}).height(scrubHeight);$scrubBackground.append($scrubBuffered);$scrubTime=$("<div>").css({backgroundColor:scrubTimeColor.toString(),position:"absolute"}).height(scrubHeight);$scrubBackground.append($scrubTime);$markerHolder=$("<div>").css({position:"absolute",width:"100%",height:"100%"});$scrubBackground.append($markerHolder);$volumeButton=$("<a>",{href:"#volume",css:{position:"absolute",bottom:0,left:0,background:"url("+volumeButtonUrl+") no-repeat 0 0"}}).click(function(event){event.preventDefault();if(currentVolume>0){$(controls).trigger("mute.controls");}else{$(controls).trigger("unmute.controls");}}).hover(function(){$volumeButton.css("background-position","-"+buttonSize+"px 0");},function(){$volumeButton.css("background-position","0 0");}).width(buttonSize).height(buttonSize);$volumeArea=$("<div>",{css:{display:"none",paddingRight:margin+"px",position:"absolute",bottom:0,left:buttonSize+"px",overflow:"hidden"}}).width(volumeWidth).height(buttonSize).click(function(event){var volume=(event.pageX-$(this).offset().left)/volumeWidth;$(controls).trigger("volume.controls",Math.max(Math.min(volume,1),0));}).mousedown(function(event){event.preventDefault();volumeDragging=true;$(document).one("mouseup",function(event){event.preventDefault();volumeDragging=false;});}).mousemove(function(event){if(volumeDragging){var volume=(event.pageX-$(this).offset().left)/volumeWidth;$(controls).trigger("volume.controls",Math.max(Math.min(volume,1),0));}});$volumeLevelBg=$("<div>",{css:{backgroundColor:scrubBgColor.toString(),position:"absolute",overflow:"hidden",top:((buttonSize-scrubHeight)/2)+"px"}}).width(60).height(scrubHeight);$volumeArea.append($volumeLevelBg);$volumeLevel=$("<div>",{css:{backgroundColor:volLevelColor.toString(),position:"absolute",overflow:"hidden",top:((buttonSize-scrubHeight)/2)+"px"}}).width(volumeWidth).height(scrubHeight);$volumeArea.append($volumeLevel);$volumeHandle=$("<div>",{css:{backgroundColor:volHandleColor.toString(),borderRadius:"2px",position:"absolute",overflow:"hidden",top:margin+"px",left:(volumeWidth-volumeHandleWidth)+"px"}}).width(volumeHandleWidth).height(buttonSize-margin*2);$volumeArea.append($volumeHandle);$volumeHolder=$("<div>",{css:{cursor:"pointer",position:"absolute",bottom:0,left:buttonSize+"px"}}).hover(function(){if(!scrubDragging){$volumeArea.show();}},function(){$volumeArea.hide();}).width(buttonSize);$volumeHolder.append($volumeButton);$volumeHolder.append($volumeArea);$wrapper.append($volumeHolder);$time=$("<div>").css({color:textColor.toString(),position:"absolute",right:buttonSize+"px",bottom:"8px",fontSize:"9px",fontFamily:"arial,helvetica,clean,sans-serif",lineHeight:"9px",textAlign:"center"});$wrapper.append($time);$fullScreenButton=$("<a>",{href:"#",css:{position:"absolute",bottom:0,right:0,background:"url("+fullScreenButtonUrl+") no-repeat 0 0"}}).click(function(event){event.preventDefault();$(controls).trigger("fullscreen.controls",fullScreenApi.isFullScreen());}).hover(function(){$fullScreenButton.css("background-position","-"+buttonSize+"px 0");},function(){$fullScreenButton.css("background-position","0 0");}).width(buttonSize).height(buttonSize);$wrapper.append($fullScreenButton);enableFullScreen(options.fullScreen);var controls={enableFullScreen:enableFullScreen,hide:function(){$wrapper.hide();},show:function(){$wrapper.show();},updateBuffer:function(buffered){resizeBuffer(buffered);},updateMarkers:function(markers){options.markers=markers;createMarkers(lastDuration,lastScale);},updatePlayState:function(state){swapButtons(state=="playing");},updateTime:function(time,duration,scale){$time.text(formatTime(time,duration,scale));resizeTime(time,duration);var holderWidth=$markerHolder.width();if(duration!=lastDuration||holderWidth!=lastWidth){lastWidth=holderWidth;lastDuration=duration;lastScale=scale;createMarkers(duration,scale);}},updateVolume:function(volume){if(volume>0){lastVolume=volume;}if(volume!=currentVolume){currentVolume=volume;var left=Math.round(Math.min(volume*volumeWidth,volumeWidth-volumeHandleWidth));if(!volumeDragging){$volumeHandle.hide().css({left:left+"px"});$volumeLevel.hide().css({width:left+"px"});setTimeout(function(){$volumeHandle.show();$volumeLevel.show();},1);}else{$volumeHandle.css({left:left+"px"});$volumeLevel.css({width:left+"px"});}}}};return controls;},format:format}});})(jQuery,window.Podtrac.Player,window.Podtrac.Color);/* Player.Flash.js */
(function($,player){var requiredVersion="10.0.0";var name="flash";var timeScale=1;var useFlashControls=false;var instances={};player.register(name,$.extend({},player.PluginFactory,{canPlay:function(media){if(media&&swfobject.hasFlashPlayerVersion(requiredVersion)){for(var i=0;i<media.length;++i){var version=media[i];if(version.url.match(/^rtmp/i)){return i;}if(version.mime&&version.mime.match(/mp4|x-m4a|x-m4v|x-flv|mpeg/i)){return i;}}}return undefined;},create:function($wrapper,id,options,index){var flashID=id+"FLASH";var flashVars={id:flashID,backgroundColor:options.backgroundColor,color:options.color,controls:useFlashControls};var flashParams={allowscriptaccess:"always",wmode:"transparent",allowfullscreen:"true"};if(index>=0){var version=options.media[index];flashVars.url=version.url;flashVars.mime=version.mime;}var flash;var $flashWrap=$("<div>",{id:flashID});$wrapper.append($flashWrap);swfobject.embedSWF(player.root+"/swf/player.swf",flashID,options.width,options.height,requiredVersion,player.root+"/swf/expressInstall.swf",flashVars,flashParams,null,function(result){flash=result.ref;});var plugin=$.extend({},player.Plugin,{name:name,destroy:function(){swfobject.removeSWF(flashID);$flashWrap.remove();delete instances[flashID];},load:function(image,media,index){flash.load({url:media[index].url,mime:media[index].mime});},pause:function(){flash.pause();},play:function(){flash.play();},volume:function(volume){flash.volume(volume);},seek:function(seconds){flash.seek(seconds);}});instances[flashID]=plugin;return plugin;},hasOwnControls:useFlashControls,canFullScreen:false,handleBuffer:function(id,percent){if(instances[id]){$(instances[id]).trigger("pluginbuffer",percent);}},handleError:function(id,message){if(instances[id]){$(instances[id]).trigger("pluginerror",message);}},handleState:function(id,state){if(instances[id]){$(instances[id]).trigger("pluginstate",state);}},handleTime:function(id,time,duration){if(instances[id]){$(instances[id]).trigger("plugintime",[time,duration,timeScale]);}},handleVolume:function(id,volume){if(instances[id]){$(instances[id]).trigger("pluginvolume",volume);}}}));})(jQuery,window.Podtrac.Player);/* Player.Html5.js */
(function($,player){var name="html5";var timeScale=1;var iOS=navigator.userAgent.match(/iPad|iPod|iPhone/i);var useNativeControls=iOS;var maxBuffered=function(duration,timeranges){var max=0;if(timeranges&&timeranges.length){for(var i=0;i<timeranges.length;++i){max=Math.max(timeranges.end(i),max);}}return duration>0?max/duration:0;};player.register(name,$.extend({},player.PluginFactory,{canPlay:function(media){var test=$("<video>").get(0);if(test&&test.canPlayType){for(var i=0;i<media.length;++i){if(media[i].url.match(/^rtmp/i)){continue;}try{if(test.canPlayType(media[i].mime)){return i;}}catch(e){}}}return undefined;},create:function($wrapper,id,options,index){var $av,av;var plugin=$.extend({},player.Plugin,{name:name,destroy:function(){if($av){$av.remove();}$av=undefined;},load:function(image,media,index){plugin.destroy();var tag=media[index].mime.match(/^audio/i)?"<audio>":"<video>";var attrs={autoplay:"autoplay",width:"100%",height:"100%",src:media[index].url};if(useNativeControls){attrs.controls="controls";}$av=$(tag,attrs);av=$av.get(0);$wrapper.append($av);$av.bind("loadstart",function(event){$(plugin).trigger("plugintime",[0,0,timeScale]);$(plugin).trigger("pluginbuffer",0);}).bind("progress",function(event){$(plugin).trigger("pluginbuffer",maxBuffered(av.duration,av.buffered));}).bind("suspend",function(event){}).bind("abort",function(event){}).bind("error",function(event){var message;switch(av.error.code){case 1:message="Error Aborted: "+av.src;break;case 2:message="Error Network: "+av.src;break;case 3:message="Error Decode: "+av.src;break;case 4:message="Error Not Supported: "+av.src;break;default:message="Unknown Error: "+av.src;break;}$(plugin).trigger("pluginerror",message);}).bind("emptied",function(event){}).bind("stalled",function(event){}).bind("loadedmetadata",function(event){}).bind("loadeddata",function(event){}).bind("canplay",function(event){}).bind("canplaythrough",function(event){}).bind("playing",function(event){}).bind("waiting",function(event){}).bind("seeking",function(event){}).bind("seeked",function(event){}).bind("ended",function(event){$(plugin).trigger("pluginstate","complete");}).bind("durationchange",function(event){$(plugin).trigger("plugintime",[av.currentTime,av.duration,timeScale]);}).bind("timeupdate",function(event){$(plugin).trigger("plugintime",[av.currentTime,av.duration,timeScale]);$(plugin).trigger("pluginbuffer",maxBuffered(av.duration,av.buffered));}).bind("play",function(event){$(plugin).trigger("pluginstate","playing");}).bind("pause",function(event){$(plugin).trigger("pluginstate","paused");}).bind("ratechange",function(event){}).bind("volumechange",function(event){$(plugin).trigger("pluginvolume",av.volume);});if(iOS){av.play();}},pause:function(){av.pause();},play:function(){if(av.ended){av.pause();av.currentTime=0;}av.play();},seek:function(seconds){av.currentTime=seconds;},volume:function(volume){av.volume=volume;}});plugin.load(options.image,options.media,index);return plugin;},canFullScreen:true,hasOwnControls:useNativeControls}));})(jQuery,window.Podtrac.Player);/* Player.Overlay.js */
(function($,player,color){var titleBarHeight=60;$.extend(true,player,{Overlay:{create:function($wrapper,id,options){var $outer,$poster,$titleBar,$playButton,$playButtonInner;var uiColor=color.fromRgbHex(options.color);var highlightColor=options.palette[3];var playButtonUrl;var playButtonCanvas=$("<canvas>").get(0);if(playButtonCanvas&&playButtonCanvas.getContext){try{playButtonCanvas.width=playButtonCanvas.height=25;var context=playButtonCanvas.getContext("2d");context.fillStyle=highlightColor.toString();context.beginPath();context.moveTo(7,5);context.lineTo(18,12);context.lineTo(7,19);context.fill();var data=playButtonCanvas.toDataURL();if(data&&data.length>10){playButtonUrl=data;}}catch(ex){}}if(!playButtonUrl){playButtonUrl=player.root+"/style/button-play.png";}var resizePoster=function(){var wrapRatio=(1*$outer.width())/$outer.height();var ratio=(1*$poster.width())/$poster.height();var factor,scaled,margin;if(ratio>wrapRatio){factor=((1*$outer.width())/$poster.width());scaled=factor*$poster.height();margin=($outer.height()-scaled)/2;$poster.css({top:margin+"px",width:"auto"}).height(scaled);}else{factor=((1*$outer.height())/$poster.height());scaled=factor*$poster.width();margin=($outer.width()-scaled)/2;$poster.css({left:margin+"px",height:"auto"}).width(scaled);}$poster.show();};var overlay={load:function(options){if($outer){$outer.remove();}$outer=$("<div>").css({position:"absolute",width:"100%",height:"100%"});$poster=$("<img>").css({position:"absolute"}).hide().load(resizePoster);$poster.attr("src",options.image);$outer.append($poster);if(options.title&&options.date&&options.name){$titleBar=$("<div>").css({backgroundColor:"#000",opacity:"0.8",position:"absolute",fontFamily:"arial,helvetica,clean,sans-serif",width:"100%"}).height(titleBarHeight);$titleBar.append($("<div>").css({position:"absolute",width:"100%",color:"#fff",fontSize:"17px",fontWeight:"normal",overflow:"hidden",padding:"10px",whiteSpace:"nowrap"}).attr("title",options.title).text(options.title));$titleBar.append($("<div>").css({position:"absolute",width:"100%",color:"#999",fontSize:"12px",fontWeight:"normal",overflow:"hidden",padding:"10px",whiteSpace:"nowrap",top:"22px"}).attr("title",options.name).text(options.date+" - "+options.name));$outer.append($titleBar);}$playButton=$("<div>").css({position:"absolute",backgroundColor:uiColor.toString(),borderRadius:"25px",border:"2px solid "+highlightColor.toString(),cursor:"pointer",opacity:"0.8",top:Math.round((options.height-50)/2)+"px",left:Math.round((options.width-50)/2)+"px"}).width(48).height(48).hover(function(){$(this).css("opacity","1.0");},function(){$(this).css("opacity","0.8");}).click(function(event){event.preventDefault();$(overlay).trigger("overlaystate","playing");});$playButtonInner=$("<div>").css({position:"absolute",background:"url("+playButtonUrl+") no-repeat 0 0",top:12,left:13}).width(25).height(25);$playButton.append($playButtonInner);$outer.append($playButton);$wrapper.append($outer);},resize:function(){resizePoster();},updatePlayState:function(state){if(state=="playing"){$playButton.hide();}else{$playButton.show();}}};return overlay;}}});})(jQuery,window.Podtrac.Player,window.Podtrac.Color);/* Player.Quicktime.js */
(function($,player,color){var name="quicktime";var maxVolume=256;var useNativeControls=navigator.userAgent.match(/iPad|iPhone/i);function isQTInstalled(){var qtInstalled=false;qtInstallCheckObj=false;if(navigator.plugins&&navigator.plugins.length){for(var i=0;i<navigator.plugins.length;i++){var plugin=navigator.plugins[i];if(plugin.name.indexOf("QuickTime")>-1){qtInstalled=true;}}}else{execScript('on error resume next: qtInstallCheckObj = IsObject(CreateObject("QuickTime.QuickTime"))',"VBScript");qtInstalled=qtInstallCheckObj;}return qtInstalled;}if(!isQTInstalled()){return;}player.register(name,$.extend({},player.PluginFactory,{canPlay:function(media){if(media){for(var i=0;i<media.length;++i){if(media[i].url.match(/^rtmp/i)){continue;}var version=media[i];if(version.mime&&version.mime.match(/mp4|quicktime/i)){return i;}}}return undefined;},create:function($wrapper,id,options,index){var qtID=id+"__QT";var $qt=$(QT_GenerateOBJECTText_XHTML(options.media[index].url,options.width,options.height,null,"autoplay","true","bgcolor",color.fromRgbHex(options.backgroundColor).toString(),"scale","aspect","controller",useNativeControls?"true":"false","showlogo","false","obj#id",qtID,"emb#name",qtID));$wrapper.append($qt);var updateState=function(){try{var status=document[qtID].GetPluginStatus();if(status.match(/Playable|Complete/i)){var time=document[qtID].GetTime();var duration=document[qtID].GetDuration();var buffered=document[qtID].GetMaxTimeLoaded();var scale=document[qtID].GetTimeScale();var rate=document[qtID].GetRate();var volume=document[qtID].GetVolume();$(plugin).trigger("pluginbuffer",duration>0?buffered/duration:0);$(plugin).trigger("plugintime",[time,duration,scale]);$(plugin).trigger("pluginstate",rate!=0?"playing":time==duration?"complete":"paused");$(plugin).trigger("pluginvolume",volume/maxVolume);}}catch(ex){}};var timer=setInterval(updateState,666);var plugin=$.extend({},player.Plugin,{name:name,destroy:function(){if(timer){clearInterval(timer);}$qt.remove();},load:function(image,media,index){document[qtID].SetResetPropertiesOnReload(false);document[qtID].SetURL(media[index].url);updateState();},pause:function(){document[qtID].Stop();updateState();},play:function(){document[qtID].Play();updateState();},seek:function(seconds){var ticks=seconds*document[qtID].GetTimeScale();document[qtID].SetTime(ticks);updateState();},volume:function(volume){document[qtID].SetVolume(volume*maxVolume);updateState();}});return plugin;},hasOwnControls:useNativeControls,canFullScreen:false}));})(jQuery,window.Podtrac.Player,window.Podtrac.Color);/*	SWFObject v2.2 <http://code.google.com/p/swfobject/> 
	is released under the MIT License <http://www.opensource.org/licenses/mit-license.php> 
*/
var swfobject=function(){var UNDEF="undefined",OBJECT="object",SHOCKWAVE_FLASH="Shockwave Flash",SHOCKWAVE_FLASH_AX="ShockwaveFlash.ShockwaveFlash",FLASH_MIME_TYPE="application/x-shockwave-flash",EXPRESS_INSTALL_ID="SWFObjectExprInst",ON_READY_STATE_CHANGE="onreadystatechange",win=window,doc=document,nav=navigator,plugin=false,domLoadFnArr=[main],regObjArr=[],objIdArr=[],listenersArr=[],storedAltContent,storedAltContentId,storedCallbackFn,storedCallbackObj,isDomLoaded=false,isExpressInstallActive=false,dynamicStylesheet,dynamicStylesheetMedia,autoHideShow=true,ua=function(){var w3cdom=typeof doc.getElementById!=UNDEF&&typeof doc.getElementsByTagName!=UNDEF&&typeof doc.createElement!=UNDEF,u=nav.userAgent.toLowerCase(),p=nav.platform.toLowerCase(),windows=p?/win/.test(p):/win/.test(u),mac=p?/mac/.test(p):/mac/.test(u),webkit=/webkit/.test(u)?parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,ie=!+"\v1",playerVersion=[0,0,0],d=null;if(typeof nav.plugins!=UNDEF&&typeof nav.plugins[SHOCKWAVE_FLASH]==OBJECT){d=nav.plugins[SHOCKWAVE_FLASH].description;if(d&&!(typeof nav.mimeTypes!=UNDEF&&nav.mimeTypes[FLASH_MIME_TYPE]&&!nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)){plugin=true;ie=false;d=d.replace(/^.*\s+(\S+\s+\S+$)/,"$1");playerVersion[0]=parseInt(d.replace(/^(.*)\..*$/,"$1"),10);playerVersion[1]=parseInt(d.replace(/^.*\.(.*)\s.*$/,"$1"),10);playerVersion[2]=/[a-zA-Z]/.test(d)?parseInt(d.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0;}}else{if(typeof win.ActiveXObject!=UNDEF){try{var a=new ActiveXObject(SHOCKWAVE_FLASH_AX);if(a){d=a.GetVariable("$version");if(d){ie=true;d=d.split(" ")[1].split(",");playerVersion=[parseInt(d[0],10),parseInt(d[1],10),parseInt(d[2],10)];}}}catch(e){}}}return{w3:w3cdom,pv:playerVersion,wk:webkit,ie:ie,win:windows,mac:mac};}(),onDomLoad=function(){if(!ua.w3){return;}if((typeof doc.readyState!=UNDEF&&doc.readyState=="complete")||(typeof doc.readyState==UNDEF&&(doc.getElementsByTagName("body")[0]||doc.body))){callDomLoadFunctions();}if(!isDomLoaded){if(typeof doc.addEventListener!=UNDEF){doc.addEventListener("DOMContentLoaded",callDomLoadFunctions,false);}if(ua.ie&&ua.win){doc.attachEvent(ON_READY_STATE_CHANGE,function(){if(doc.readyState=="complete"){doc.detachEvent(ON_READY_STATE_CHANGE,arguments.callee);callDomLoadFunctions();}});if(win==top){(function(){if(isDomLoaded){return;}try{doc.documentElement.doScroll("left");}catch(e){setTimeout(arguments.callee,0);return;}callDomLoadFunctions();})();}}if(ua.wk){(function(){if(isDomLoaded){return;}if(!/loaded|complete/.test(doc.readyState)){setTimeout(arguments.callee,0);return;}callDomLoadFunctions();})();}addLoadEvent(callDomLoadFunctions);}}();function callDomLoadFunctions(){if(isDomLoaded){return;}try{var t=doc.getElementsByTagName("body")[0].appendChild(createElement("span"));t.parentNode.removeChild(t);}catch(e){return;}isDomLoaded=true;var dl=domLoadFnArr.length;for(var i=0;i<dl;i++){domLoadFnArr[i]();}}function addDomLoadEvent(fn){if(isDomLoaded){fn();}else{domLoadFnArr[domLoadFnArr.length]=fn;}}function addLoadEvent(fn){if(typeof win.addEventListener!=UNDEF){win.addEventListener("load",fn,false);}else{if(typeof doc.addEventListener!=UNDEF){doc.addEventListener("load",fn,false);}else{if(typeof win.attachEvent!=UNDEF){addListener(win,"onload",fn);}else{if(typeof win.onload=="function"){var fnOld=win.onload;win.onload=function(){fnOld();fn();};}else{win.onload=fn;}}}}}function main(){if(plugin){testPlayerVersion();}else{matchVersions();}}function testPlayerVersion(){var b=doc.getElementsByTagName("body")[0];var o=createElement(OBJECT);o.setAttribute("type",FLASH_MIME_TYPE);var t=b.appendChild(o);if(t){var counter=0;(function(){if(typeof t.GetVariable!=UNDEF){var d=t.GetVariable("$version");if(d){d=d.split(" ")[1].split(",");ua.pv=[parseInt(d[0],10),parseInt(d[1],10),parseInt(d[2],10)];}}else{if(counter<10){counter++;setTimeout(arguments.callee,10);return;}}b.removeChild(o);t=null;matchVersions();})();}else{matchVersions();}}function matchVersions(){var rl=regObjArr.length;if(rl>0){for(var i=0;i<rl;i++){var id=regObjArr[i].id;var cb=regObjArr[i].callbackFn;var cbObj={success:false,id:id};if(ua.pv[0]>0){var obj=getElementById(id);if(obj){if(hasPlayerVersion(regObjArr[i].swfVersion)&&!(ua.wk&&ua.wk<312)){setVisibility(id,true);if(cb){cbObj.success=true;cbObj.ref=getObjectById(id);cb(cbObj);}}else{if(regObjArr[i].expressInstall&&canExpressInstall()){var att={};att.data=regObjArr[i].expressInstall;att.width=obj.getAttribute("width")||"0";att.height=obj.getAttribute("height")||"0";if(obj.getAttribute("class")){att.styleclass=obj.getAttribute("class");}if(obj.getAttribute("align")){att.align=obj.getAttribute("align");}var par={};var p=obj.getElementsByTagName("param");var pl=p.length;for(var j=0;j<pl;j++){if(p[j].getAttribute("name").toLowerCase()!="movie"){par[p[j].getAttribute("name")]=p[j].getAttribute("value");}}showExpressInstall(att,par,id,cb);}else{displayAltContent(obj);if(cb){cb(cbObj);}}}}}else{setVisibility(id,true);if(cb){var o=getObjectById(id);if(o&&typeof o.SetVariable!=UNDEF){cbObj.success=true;cbObj.ref=o;}cb(cbObj);}}}}}function getObjectById(objectIdStr){var r=null;var o=getElementById(objectIdStr);if(o&&o.nodeName=="OBJECT"){if(typeof o.SetVariable!=UNDEF){r=o;}else{var n=o.getElementsByTagName(OBJECT)[0];if(n){r=n;}}}return r;}function canExpressInstall(){return !isExpressInstallActive&&hasPlayerVersion("6.0.65")&&(ua.win||ua.mac)&&!(ua.wk&&ua.wk<312);}function showExpressInstall(att,par,replaceElemIdStr,callbackFn){isExpressInstallActive=true;storedCallbackFn=callbackFn||null;storedCallbackObj={success:false,id:replaceElemIdStr};var obj=getElementById(replaceElemIdStr);if(obj){if(obj.nodeName=="OBJECT"){storedAltContent=abstractAltContent(obj);storedAltContentId=null;}else{storedAltContent=obj;storedAltContentId=replaceElemIdStr;}att.id=EXPRESS_INSTALL_ID;if(typeof att.width==UNDEF||(!/%$/.test(att.width)&&parseInt(att.width,10)<310)){att.width="310";}if(typeof att.height==UNDEF||(!/%$/.test(att.height)&&parseInt(att.height,10)<137)){att.height="137";}doc.title=doc.title.slice(0,47)+" - Flash Player Installation";var pt=ua.ie&&ua.win?"ActiveX":"PlugIn",fv="MMredirectURL="+win.location.toString().replace(/&/g,"%26")+"&MMplayerType="+pt+"&MMdoctitle="+doc.title;if(typeof par.flashvars!=UNDEF){par.flashvars+="&"+fv;}else{par.flashvars=fv;}if(ua.ie&&ua.win&&obj.readyState!=4){var newObj=createElement("div");replaceElemIdStr+="SWFObjectNew";newObj.setAttribute("id",replaceElemIdStr);obj.parentNode.insertBefore(newObj,obj);obj.style.display="none";(function(){if(obj.readyState==4){obj.parentNode.removeChild(obj);}else{setTimeout(arguments.callee,10);}})();}createSWF(att,par,replaceElemIdStr);}}function displayAltContent(obj){if(ua.ie&&ua.win&&obj.readyState!=4){var el=createElement("div");obj.parentNode.insertBefore(el,obj);el.parentNode.replaceChild(abstractAltContent(obj),el);obj.style.display="none";(function(){if(obj.readyState==4){obj.parentNode.removeChild(obj);}else{setTimeout(arguments.callee,10);}})();}else{obj.parentNode.replaceChild(abstractAltContent(obj),obj);}}function abstractAltContent(obj){var ac=createElement("div");if(ua.win&&ua.ie){ac.innerHTML=obj.innerHTML;}else{var nestedObj=obj.getElementsByTagName(OBJECT)[0];if(nestedObj){var c=nestedObj.childNodes;if(c){var cl=c.length;for(var i=0;i<cl;i++){if(!(c[i].nodeType==1&&c[i].nodeName=="PARAM")&&!(c[i].nodeType==8)){ac.appendChild(c[i].cloneNode(true));}}}}}return ac;}function createSWF(attObj,parObj,id){var r,el=getElementById(id);if(ua.wk&&ua.wk<312){return r;}if(el){if(typeof attObj.id==UNDEF){attObj.id=id;}if(ua.ie&&ua.win){var att="";for(var i in attObj){if(attObj[i]!=Object.prototype[i]){if(i.toLowerCase()=="data"){parObj.movie=attObj[i];}else{if(i.toLowerCase()=="styleclass"){att+=' class="'+attObj[i]+'"';}else{if(i.toLowerCase()!="classid"){att+=" "+i+'="'+attObj[i]+'"';}}}}}var par="";for(var j in parObj){if(parObj[j]!=Object.prototype[j]){par+='<param name="'+j+'" value="'+parObj[j]+'" />';}}el.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+att+">"+par+"</object>";objIdArr[objIdArr.length]=attObj.id;r=getElementById(attObj.id);}else{var o=createElement(OBJECT);o.setAttribute("type",FLASH_MIME_TYPE);for(var m in attObj){if(attObj[m]!=Object.prototype[m]){if(m.toLowerCase()=="styleclass"){o.setAttribute("class",attObj[m]);}else{if(m.toLowerCase()!="classid"){o.setAttribute(m,attObj[m]);}}}}for(var n in parObj){if(parObj[n]!=Object.prototype[n]&&n.toLowerCase()!="movie"){createObjParam(o,n,parObj[n]);}}el.parentNode.replaceChild(o,el);r=o;}}return r;}function createObjParam(el,pName,pValue){var p=createElement("param");p.setAttribute("name",pName);p.setAttribute("value",pValue);el.appendChild(p);}function removeSWF(id){var obj=getElementById(id);if(obj&&obj.nodeName=="OBJECT"){if(ua.ie&&ua.win){obj.style.display="none";(function(){if(obj.readyState==4){removeObjectInIE(id);}else{setTimeout(arguments.callee,10);}})();}else{obj.parentNode.removeChild(obj);}}}function removeObjectInIE(id){var obj=getElementById(id);if(obj){for(var i in obj){if(typeof obj[i]=="function"){obj[i]=null;}}obj.parentNode.removeChild(obj);}}function getElementById(id){var el=null;try{el=doc.getElementById(id);}catch(e){}return el;}function createElement(el){return doc.createElement(el);}function addListener(target,eventType,fn){target.attachEvent(eventType,fn);listenersArr[listenersArr.length]=[target,eventType,fn];}function hasPlayerVersion(rv){var pv=ua.pv,v=rv.split(".");v[0]=parseInt(v[0],10);v[1]=parseInt(v[1],10)||0;v[2]=parseInt(v[2],10)||0;return(pv[0]>v[0]||(pv[0]==v[0]&&pv[1]>v[1])||(pv[0]==v[0]&&pv[1]==v[1]&&pv[2]>=v[2]))?true:false;}function createCSS(sel,decl,media,newStyle){if(ua.ie&&ua.mac){return;}var h=doc.getElementsByTagName("head")[0];if(!h){return;}var m=(media&&typeof media=="string")?media:"screen";if(newStyle){dynamicStylesheet=null;dynamicStylesheetMedia=null;}if(!dynamicStylesheet||dynamicStylesheetMedia!=m){var s=createElement("style");s.setAttribute("type","text/css");s.setAttribute("media",m);dynamicStylesheet=h.appendChild(s);if(ua.ie&&ua.win&&typeof doc.styleSheets!=UNDEF&&doc.styleSheets.length>0){dynamicStylesheet=doc.styleSheets[doc.styleSheets.length-1];}dynamicStylesheetMedia=m;}if(ua.ie&&ua.win){if(dynamicStylesheet&&typeof dynamicStylesheet.addRule==OBJECT){dynamicStylesheet.addRule(sel,decl);}}else{if(dynamicStylesheet&&typeof doc.createTextNode!=UNDEF){dynamicStylesheet.appendChild(doc.createTextNode(sel+" {"+decl+"}"));}}}function setVisibility(id,isVisible){if(!autoHideShow){return;}var v=isVisible?"visible":"hidden";if(isDomLoaded&&getElementById(id)){getElementById(id).style.visibility=v;}else{createCSS("#"+id,"visibility:"+v);}}function urlEncodeIfNecessary(s){var regex=/[\\\"<>\.;]/;var hasBadChars=regex.exec(s)!=null;return hasBadChars&&typeof encodeURIComponent!=UNDEF?encodeURIComponent(s):s;}var cleanup=function(){if(ua.ie&&ua.win){window.attachEvent("onunload",function(){var ll=listenersArr.length;for(var i=0;i<ll;i++){listenersArr[i][0].detachEvent(listenersArr[i][1],listenersArr[i][2]);}var il=objIdArr.length;for(var j=0;j<il;j++){removeSWF(objIdArr[j]);}for(var k in ua){ua[k]=null;}ua=null;for(var l in swfobject){swfobject[l]=null;}swfobject=null;});}}();return{registerObject:function(objectIdStr,swfVersionStr,xiSwfUrlStr,callbackFn){if(ua.w3&&objectIdStr&&swfVersionStr){var regObj={};regObj.id=objectIdStr;regObj.swfVersion=swfVersionStr;regObj.expressInstall=xiSwfUrlStr;regObj.callbackFn=callbackFn;regObjArr[regObjArr.length]=regObj;setVisibility(objectIdStr,false);}else{if(callbackFn){callbackFn({success:false,id:objectIdStr});}}},getObjectById:function(objectIdStr){if(ua.w3){return getObjectById(objectIdStr);}},embedSWF:function(swfUrlStr,replaceElemIdStr,widthStr,heightStr,swfVersionStr,xiSwfUrlStr,flashvarsObj,parObj,attObj,callbackFn){var callbackObj={success:false,id:replaceElemIdStr};if(ua.w3&&!(ua.wk&&ua.wk<312)&&swfUrlStr&&replaceElemIdStr&&widthStr&&heightStr&&swfVersionStr){setVisibility(replaceElemIdStr,false);addDomLoadEvent(function(){widthStr+="";heightStr+="";var att={};if(attObj&&typeof attObj===OBJECT){for(var i in attObj){att[i]=attObj[i];}}att.data=swfUrlStr;att.width=widthStr;att.height=heightStr;var par={};if(parObj&&typeof parObj===OBJECT){for(var j in parObj){par[j]=parObj[j];}}if(flashvarsObj&&typeof flashvarsObj===OBJECT){for(var k in flashvarsObj){if(typeof par.flashvars!=UNDEF){par.flashvars+="&"+k+"="+flashvarsObj[k];}else{par.flashvars=k+"="+flashvarsObj[k];}}}if(hasPlayerVersion(swfVersionStr)){var obj=createSWF(att,par,replaceElemIdStr);if(att.id==replaceElemIdStr){setVisibility(replaceElemIdStr,true);}callbackObj.success=true;callbackObj.ref=obj;}else{if(xiSwfUrlStr&&canExpressInstall()){att.data=xiSwfUrlStr;showExpressInstall(att,par,replaceElemIdStr,callbackFn);return;}else{setVisibility(replaceElemIdStr,true);}}if(callbackFn){callbackFn(callbackObj);}});}else{if(callbackFn){callbackFn(callbackObj);}}},switchOffAutoHideShow:function(){autoHideShow=false;},ua:ua,getFlashPlayerVersion:function(){return{major:ua.pv[0],minor:ua.pv[1],release:ua.pv[2]};},hasFlashPlayerVersion:hasPlayerVersion,createSWF:function(attObj,parObj,replaceElemIdStr){if(ua.w3){return createSWF(attObj,parObj,replaceElemIdStr);}else{return undefined;}},showExpressInstall:function(att,par,replaceElemIdStr,callbackFn){if(ua.w3&&canExpressInstall()){showExpressInstall(att,par,replaceElemIdStr,callbackFn);}},removeSWF:function(objElemIdStr){if(ua.w3){removeSWF(objElemIdStr);}},createCSS:function(selStr,declStr,mediaStr,newStyleBoolean){if(ua.w3){createCSS(selStr,declStr,mediaStr,newStyleBoolean);}},addDomLoadEvent:addDomLoadEvent,addLoadEvent:addLoadEvent,getQueryParamValue:function(param){var q=doc.location.search||doc.location.hash;if(q){if(/\?/.test(q)){q=q.split("?")[1];}if(param==null){return urlEncodeIfNecessary(q);}var pairs=q.split("&");for(var i=0;i<pairs.length;i++){if(pairs[i].substring(0,pairs[i].indexOf("="))==param){return urlEncodeIfNecessary(pairs[i].substring((pairs[i].indexOf("=")+1)));}}}return"";},expressInstallCallback:function(){if(isExpressInstallActive){var obj=getElementById(EXPRESS_INSTALL_ID);if(obj&&storedAltContent){obj.parentNode.replaceChild(storedAltContent,obj);if(storedAltContentId){setVisibility(storedAltContentId,true);if(ua.ie&&ua.win){storedAltContent.style.display="block";}}if(storedCallbackFn){storedCallbackFn(storedCallbackObj);}}isExpressInstallActive=false;}}};}();
