/**
*	OneScreen Inc.
*	Player 1.7.1
**/
(function(){if(window.com){if(!window.com.onescreen)window.com.onescreen={}}else window.com={onescreen:{}};if(!window.com.onescreen.player)window.com.onescreen.player={},window.com.onescreen.player.callbacks=[];if("undefined"===typeof swfobject){var a=document.getElementsByTagName("head")[0],f=document.createElement("SCRIPT");f.setAttribute("src","http://cdn.onescreen.net/os/static/mediaplayer/swfobject.js");a.appendChild(f)}})();
com.onescreen.player.init=function(a){function f(a,b,c){var d=a+"_"+r;window[d]=function(){b&&b();c&&c();if(document.createEvent){var d=document.createEvent("Event");d.initEvent(a,!0,!0);e.dispatchEvent(d)}else if(document.createEventObject)e.currEvent=a};return d}function n(){if(!0==a.forceCompanions){g=e.getCompanions();for(var b=g.length,c=0;c<b;c++){var f=g[c].id;if(!document.getElementById(f)){var d=document.createElement("DIV");d.setAttribute("id",f);if(!1==a.companionTarget)d.style.position=
"absolute",d.style.top=e.style.height,d.style.left=e.style.left,d.style.marginTop="-3px",d.style.display="block",d.style.zIndex="999",e.parentNode.appendChild(d);else switch(typeof a.companionTarget){default:case "string":document.getElementById(a.companionTarget).appendChild(d);break;case "object":console.log(a.companionTarget),a.companionTarget.appendChild(d)}}}}}function o(){for(var a=g.length;a--;)try{document.getElementById(g[a].id).parentNode.removeChild(document.getElementById(g[a].id))}catch(b){}}
this.did=a.div_id;var e,g=[],r=Math.round(1E5*Math.random());if(!document.getElementById(a.div_id))return!1;var k="http://player.onescreen.net/1.7/s/Preloader.swf",c,b={width:a.width,height:a.height,config:"undefined"!==typeof a.config?a.config:"",player:"http://player.onescreen.net/1.7/s/MediaPlayer.swf",referrer:""===document.referrer?encodeURIComponent(window.location.href):encodeURIComponent(document.referrer)};if("undefined"===typeof a.forceCompanions)a.forceCompanions=!1;if("undefined"===typeof a.companionTarget)a.companionTarget=
!1;if("undefined"!==typeof a.ads)b.ads=encodeURIComponent(a.ads);if("undefined"!==typeof a.skin)b.skin=encodeURIComponent(a.skin);if("undefined"!==typeof a.mediaType)b.mediaType=a.mediaType;if("undefined"!==typeof a.media)b.media=encodeURIComponent(a.media);if("undefined"!==typeof a.volume)b.volume=a.volume;if("undefined"!==typeof a.autoPlay)b.autoPlay=a.autoPlay;if("undefined"!==typeof a.autoNext)b.autoNext=a.autoNext;if("undefined"!==typeof a.startIndex)b.startIndex=a.startIndex;if("undefined"!==
typeof a.random)b.random=a.random;"undefined"!==typeof a.playlistX?b.playlistX=a.playlistX:a.playlistX=0;"undefined"!==typeof a.playlistY?b.playlistY=a.playlistY:a.playlistY=0;if("undefined"!==typeof a.playlistWidth)b.playlistWidth=a.playlistWidth;if("undefined"!==typeof a.playlistHeight)b.playlistHeight=a.playlistHeight;if("undefined"!==typeof a.dock)b.dock=a.dock;if("undefined"!==typeof a.bitRate)b.bitRate=a.bitRate;if("undefined"!==typeof a.logoUrl)b.logoUrl=encodeURIComponent(a.logoUrl);if("undefined"!==
typeof a.enhanced)b.enhanced=a.enhanced;if("undefined"!==typeof a.referrer)b.referrer=a.referrer;if("undefined"!==typeof a.playlistCycles)b.playlistCycles=a.playlistCycles;if("undefined"!==typeof a.cv1)b.cv1=a.cv1;if("undefined"!==typeof a.cv2)b.cv2=a.cv2;if("undefined"!==typeof a.cv3)b.cv2=a.cv3;if("undefined"!==typeof a.showOverlay)b.showOverlay=a.showOverlay;if("undefined"!==typeof a.socialNetworking)b.socialNetworking=a.socialNetworking;if("undefined"!==typeof a.showEmbed)b.showEmbed=a.showEmbed;
if("undefined"!==typeof a.embedded)b.embedded=a.embedded;if("undefined"!==typeof a.version)k="http://player.onescreen.net/"+a.version+"/s/Preloader.swf",c="http://player.onescreen.net/"+a.version+"/s/MediaPlayer.swf",b.player=c;var h=a.height,i=a.width;"undefined"!==typeof a.playlistX&&0<a.playlistX&&(i=a.playlistX>i?i+a.playlistWidth+(a.playlistX-i):i+a.playlistWidth);"undefined"!==typeof a.playlistY&&0<a.playlistY&&(h=a.playlistY>h?h+a.playlistHeight+(a.playlistY-h):h+a.playlistHeight);var l={allowScriptAccess:"always",
allowFullScreen:"true"};if("undefined"!==typeof a.wmode)l.wmode=a.wmode;var p={};this.getPlayer=function(){return e};this.setSrc=function(a){b.media=a};this.setInd=function(a){b.startIndex=a};this.setSkin=function(a){b.skin=a};this.setAuto=function(a){b.autoPlay=a};this.go=function(c){swfobject.removeSWF(c+"_os");var f=document.getElementById(c),g=document.createElement("DIV");if(document.getElementById(a.div_id+"_os")){var d=document.getElementById(a.div_id+"_os");d.parentNode.removeChild(d)}g.setAttribute("id",
c+"_os");f.appendChild(g);swfobject.embedSWF(k,c+"_os",i,h,"9.0.0","http://cdn.onescreen.net/oscdn/resources/mediaplayer/expressInstall.swf",b,l,p,function(a){if(a.success)e=a.ref,e.currEvent="";else return!1})};c=a.callbacks;if("undefined"!==typeof c&&c){if(!0===c){var q="adCompanion,prerollEnd,adLoad,adStart,adEnd,adUnload,videoLoad,videoStart,videoPause,videoEnd,videoUnload,playerLoad,playerEnterFS,playerExitFS,playerVolume,playerMute,playerSeek,playerResize".split(",");c={};for(var m=0;m<q.length;++m)j=
q[m],c[j]=function(){}}for(var j in c)b[j+"Callback"]=f(j,c[j])}"undefined"!==typeof c?(b.adCompanionCallback=f("adCompanion",c.adCompanion,n),b.prerollEndCallback=f("prerollEnd",c.prerollEnd,o)):(b.adCompanionCallback=f("adCompanion",n),b.prerollEndCallback=f("prerollEnd",o));this.pause=function(){e.jsPauseVideo(null)};this.play=function(){e.jsPlayVideo(null)};this.setVolume=function(a){("."===a.substr(0,1)||0==a||1==a)&&e.jsPlayerVolume(a)};this.mute=function(){e.mediaPlayerMute(!0)};this.unmute=
function(){e.mediaPlayerMute(!1)};this.getVolume=function(){return e.getVolume()};var s=window.setInterval(function(){if("undefined"!==typeof swfobject){window.clearInterval(s);var c=document.getElementById(a.div_id),f=document.createElement("DIV");if(document.getElementById(a.div_id+"_os")){var g=document.getElementById(a.div_id+"_os");g.parentNode.removeChild(g)}f.setAttribute("id",a.div_id+"_os");c.appendChild(f);swfobject.embedSWF(k,a.div_id+"_os",i,h,"9.0.0","http://cdn.onescreen.net/oscdn/resources/mediaplayer/expressInstall.swf",
b,l,p,function(a){if(a.success)e=a.ref,e.currEvent="";else return!1})}},10);return this};
