

if(typeof clipdealer=='undefined'){var clipdealer={};}
clipdealer.prevplayer={container:null,host:'',imghost:'',timeout:0,timer:null,variants:{'3':302,'6':226,'7':226,'8':226,'14':226,'15':226,'17':226,'18':226,'22':402,'23':402,'24':402,'25':402,'30':402,'31':402},types:{'3':'mp4','6':'mp4','7':'mp4','8':'mp4','14':'mp3','15':'mp3','17':'mp3','18':'mp3','22':'jpg','23':'jpg','24':'jpg','25':'jpg','30':'jpg','31':'jpg'},h:0,setup:function(host,imghost,timeout)
{this.host=host;this.imghost=(imghost||'');this.timeout=(timeout||250);var d=document.createElement('div');d.className='prevplayer';d.style.position='absolute';d.style.top='0px';d.style.left='0px';d.style.visibility='hidden';lima.getByTagName('body')[0].appendChild(d);this.container=d;lima.events.connect(lima.events,'captureMove',this,'move');},move:function()
{if(this.h<=0){return;}
var pos=lima.events.getMousePos();lima.position.prepare();var vp=lima.getViewport();var pX=pos.x-lima.position.deltaX;var pY=pos.y-lima.position.deltaY;var mX=pos.x+10;var mY=pos.y+10;if(pX+442>vp.w){mX=pos.x-412;}
if(pY+this.h+20>vp.h){mY=pos.y-this.h-10;}
this.container.style.top=mY+'px';this.container.style.left=mX+'px';},show:function(mid,vid)
{if(this.container==null||typeof this.variants[vid]=='undefined'||typeof this.types[vid]=='undefined'){return;}
if(this.timer!=null){window.clearTimeout(this.timer);}
this.h=this.variants[vid];this.container.style.width='402px';this.container.style.height=this.h+'px';var me=this;var cb=function(){if(me.types[vid]=='jpg'){lima.appendTo(me.container,[{'img':{'src':'/resources/images/shim.gif','styles':{'width':'402px','height':'402px','backgroundImage':'url('+me.imghost+mid+'/player/1.jpg)','backgroundRepeat':'no-repeat','backgroundPosition':'center'}}}]);}else{var so=new SWFObject('/resources/swfplayer/mediaplayer.swf','mpl','402',me.h,'9');so.addVariable('height',me.h);so.addVariable('width','402');so.addVariable('file',me.host+mid+'.'+me.types[vid]);if(me.types[vid]=='mp3'){so.addVariable('image',me.imghost+mid+'/player/1.jpg');}
so.addVariable('displayheight',me.h);so.addVariable('displaywidth','402');so.addVariable('searchbar','false');so.addVariable('showicons','true');so.addVariable('shownavigation','false');so.addVariable('thumbsinplaylist','false');so.addVariable('showdigits','false');so.addVariable('playlist','false');so.addVariable('autostart','true');so.addVariable('repeat','true');so.write(me.container);}
me.container.style.visibility='visible';}
this.timer=window.setTimeout(function(){me.timer=null;if(me.h>0){cb();}},this.timeout);},hide:function()
{if(this.container!=null){this.container.style.visibility='hidden';this.h=0;lima.removeChildren(this.container);}}}