| Current Path : /home/g/i/t/giteleslfp/www/plugins/system/mediabox_ck/assets/ |
| Current File : /home/g/i/t/giteleslfp/www/plugins/system/mediabox_ck/assets/mediaboxck.min.js |
var Mediabox;!function(c){var e;null==c.browser&&(e=navigator.userAgent.toLowerCase(),c.browser={version:(e.match(/.+(?:rv|it|ra|ie|me)[/: ]([d.]+)/)||[])[1],chrome:/chrome/.test(e),safari:/webkit/.test(e)&&!/chrome/.test(e),opera:/opera/.test(e),msie:/msie/.test(e)&&!/opera/.test(e),ios:/(iPod|iPhone|iPad)/.test(e),mozilla:/mozilla/.test(e)&&!/(compatible|webkit)/.test(e)});var n,a,o,s,r,l,d,h,m,p,g,t,u,w,f,b,v,y,k,x,I,C,M,j,T,P,W,H,L,B,_,D,F,S,A,E,V,z,O,N,X,Z,Y,q,R,G=new Image,U=new Image,Q="none",$="mediaBox";function J(){p=c(window).width(),g=c(window).height();var e=K();f.css({width:e.width,height:e.height,top:e.top,marginTop:e.marginTop,marginLeft:e.marginLeft}),te(),ee()}function K(){p=c(window).width(),g=c(window).height(),null==_&&(_=n.defaultHeight),_>=g-n.imgPadding&&X/p<=Z/g&&!f.hasClass("mediaboxckmobile")?(l=c(window).scrollTop()+c(window).height()/2,tmpHeight=g-n.imgPadding,tmpWidth=parseInt(tmpHeight/_*B,10),b.css({width:tmpWidth,height:tmpHeight}),v.css({width:tmpWidth-R+"px"}),x.css({width:tmpWidth-R+"px"}),tmpWidth=b.outerWidth(),tmpHeight=b.outerHeight()+v.outerHeight()):B>=p-n.imgPadding&&_/g<B/p&&!f.hasClass("mediaboxckmobile")?(l=c(window).scrollTop()+c(window).height()/2,tmpWidth=p-n.imgPadding,tmpHeight=parseInt(tmpWidth/B*_,10),b.css({width:tmpWidth,height:tmpHeight}),v.css({width:tmpWidth-R+"px"}),x.css({width:tmpWidth-R+"px"}),tmpWidth=b.outerWidth(),tmpHeight=b.outerHeight()+v.outerHeight()):B<p-n.imgPadding&&!f.hasClass("mediaboxckmobile")&&(l=c(window).scrollTop()+c(window).height()/2,tmpWidth=B,tmpHeight=_,b.css({width:tmpWidth,height:tmpHeight}),v.css({width:tmpWidth-R+"px"}),x.css({width:tmpWidth-R+"px"}),tmpWidth=b.outerWidth(),tmpHeight=b.outerHeight()+v.outerHeight());var e=new Array;return centerw=b.outerWidth(),centerh=b.outerHeight()+v.outerHeight(),e.width=centerw,e.height=centerh,e.top=c(window).scrollTop()+c(window).height()/2,e.marginTop=-centerh/2,e.marginLeft=-centerw/2,e}function ee(){f.hasClass("mediaboxckmobile")?b.find("object,iframe, video, audio").height("calc(100% - "+parseInt(v.height())+"px)"):b.find("object, iframe, video, audio").height(b.height())}function te(){var e=b.find("img");f.hasClass("mediaboxckmobile")?e.css({top:"0%",marginTop:(c(window).height()-e.height())/2,left:"0%",marginLeft:(c(window).width()-e.width())/2}):e.css({top:"0%",marginTop:"0"})}function ie(e){if(n.keyboardAlpha)switch(e.code){case 27:case 88:case 67:ye();break;case 37:case 80:ae();break;case 39:case 78:oe()}else switch(e.keyCode){case 27:ye();break;case 37:ae();break;case 39:oe()}if(n.keyboardStop)return!1}function ae(){return ce(),we(s)}function oe(){return ce(),we(r)}jQuery(document).ready(function(){w=c('<div id="mbOverlay" />').css("display","none").click(ye),f=c('<div id="mbCenter" />').css("display","none"),D=c('<div id="mbToolbar" />').css("display","none"),c(document.body).append(w,f),f.append(c('<div id="mbContainer" />')),container=c("#mbContainer"),container.append(c('<div id="mbMedia" />')),b=c("#mbMedia"),f.append(v=c('<div id="mbBottom">')),closeLink=c('<a id="mbCloseLink" href="#" />').click(ye),M=c('<a id="mbNextLink" href="#" />').click(oe),C=c('<a id="mbPrevLink" href="#" />').click(ae),T=c('<a id="mbPlayLink" href="#" />').click(re),j=c('<a id="mbPauseLink" href="#" />').click(ne),L=c('<span id="mbZoomBar"></span>'),k=c('<div id="mbTitle" />'),I=c('<div id="mbNumber" />'),x=c('<div id="mbCaption" />'),F=c('<div id="mbPieLoader" />'),S=c('<div id="mbPieLoaderBar" />'),F.append(S),document.documentMode&&function(){var e=c("figure.mediaboxck");for(i=0;i<e.length;i++){c(e[i]).addClass("mediaboxckie");var t=c(e[i]).find("img");t.wrap('<div class="iefake"></div>');var a=e[i].children[0];t.css("opacity","0"),c(a).css("backgroundImage","url('"+t.attr("src")+"')")}}()}),Mediabox={close:function(){ye()},recenter:function(){f&&(h="50%",f.css({left:h,marginLeft:-X/2-q}))},open:function(e,t,i){return n={buttonText:["<big>«</big>","<big>»</big>","<big>×</big>","<big>►</big>","<big>❙❙</big>"],counterText:"({x} of {y})",linkText:'<a href="{x}" target="_new">{x}</a><br/>open in a new tab</div>',flashText:'<b>Error</b><br/>Adobe Flash is either not installed or not up to date, please visit <a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" title="Get Flash" target="_new">Adobe.com</a> to download the free player.',center:!1,loop:!1,keyboard:!0,keyboardAlpha:!1,keyboardStop:!1,overlayOpacity:.8,resizeOpening:!0,resizeDuration:240,initialWidth:320,initialHeight:180,defaultWidth:640,defaultHeight:360,showCaption:!0,showCounter:!0,countBack:!1,clickBlock:!0,iOShtml:!0,isMobileEnable:!0,isMobile:!1,mobileResolution:"640",imgBackground:!1,imgPadding:100,overflow:"auto",inlineClone:!1,html5:"true",scriptaccess:"true",fullscreen:"true",fullscreenNum:"1",autoplay:"true",autoplayNum:"1",autoplayYes:"yes",volume:"100",medialoop:"true",bgcolor:"#000000",wmode:"transparent",addmediadownloadbutton:"0",playerpath:"plugins/system/mediabox_ck/mediabox_ck/assets/NonverBlaster.swf",showTimecode:"false",controlColor:"0xFFFFFF",controlBackColor:"0x0000000",playerBackColor:"",wmodeNB:"transparent",controller:"true",flInfo:"true",revverID:"187866",revverFullscreen:"true",revverBack:"000000",revverFront:"ffffff",revverGrad:"000000",usViewers:"true",ytBorder:"0",ytColor1:"000000",ytColor2:"333333",ytRel:"0",ytInfo:"1",ytSearch:"0",vuPlayer:"basic",vmTitle:"1",vmByline:"1",vmPortrait:"1",vmColor:"ffffff",attribType:"rel",showToolbar:"1",diapoTime:1e3,diapoAutoplay:"false",showZoom:"0",toolbarSize:"normal"},n=c.extend({},n,i),"string"==typeof e&&(e=[[e,t,i]],t=0),a=e,n.loop=n.loop&&1<a.length,"1"==n.showToolbar&&1<a.length?(D.append(closeLink,M,j,T,C,L,F),v.append(k,x,I)):v.append(closeLink,M,C,L,k,I,x),C.html(n.buttonText[0]),M.html(n.buttonText[1]),closeLink.html(n.buttonText[2]),T.html(n.buttonText[3]),j.html(n.buttonText[4]).hide(),"1"!=n.showZoom||c("#mbZoomMinus").length||(P=c('<a id="mbZoomMinus" href="#" ><big>-</big></a>').click(he),(W=c('<a id="mbZoomPlus" href="javascript:void(0)" />').click(de)).html("<big>+</big>"),H=c('<a id="mbZoomValue" href="#"><big>100 %</big></a>').click(me),L.append(P,H,W)),"big"==n.toolbarSize&&v.addClass("mbBottomBig"),b.addClass("paused"),J(),function(e){w.css("display",e?"":"none"),c(window).off("keydown",ie),n.keyboard&&c(window).bind("keydown",ie);n.isMobileEnable&&n.isMobile&&(f.addClass("mediaboxckmobile"),D.addClass("mediaboxckmobile"))}(!0),l=c(window).scrollTop()+c(window).height()/2,h="50%",mediaLeftMargin="auto"==b.css("margin-left")?0:b.css("margin-left"),q=parseInt(f.css("padding-left"))+parseInt(mediaLeftMargin)+parseInt(b.css("padding-left")),R=parseInt(v.css("margin-left"))+parseInt(v.css("padding-left"))+parseInt(v.css("margin-right"))+parseInt(v.css("padding-right")),f.css({top:l,left:h,width:n.initialWidth,height:n.initialHeight,marginTop:-n.initialHeight/2,marginLeft:-n.initialWidth/2,display:""}),1<a.length&&D.css({top:c(window).scrollTop(),left:h,display:""}),c("#mbOverlay").css("opacity",0).fadeTo(360,n.overlayOpacity),"1"==n.showToolbar&&1<a.length&&(c(document.body).append(D),D.delay(200).css("opacity",0).fadeTo(360,1)),"1"==n.diapoAutoplay&&re(),we(t)}},E=0;var se=.005;function re(){return b.hasClass("paused")&&(b.removeClass("paused"),j.show(),T.hide()),le(),!1}function le(){b.hasClass("paused")||(clearInterval(A),A=setInterval(function(){E<1&&!b.hasClass("paused")?(1<(E+=se)&&(E=1),S.css({width:100*E+"%"})):E<=1&&b.hasClass("paused")||(clearInterval(A),b.hasClass("paused")||(ce(),oe()))},n.diapoTime*se))}function ce(){clearInterval(A),E=0,S.css("width","0")}function ne(){return clearInterval(A),S.stop(!0,!0),b.addClass("paused"),j.hide(),T.show(),!1}function de(){c("#mbMedia").addClass("mbZooming");var e=((e=pe())+10)/100;return b.find("img").css("transform","scale("+e+")"),ge(100*e),!1}function he(){c("#mbMedia").addClass("mbZooming");var e=pe();return e<=10||(e=(e-10)/100,b.find("img").css("transform","scale("+e+")"),ge(100*e)),!1}function me(){c("#mbMedia").removeClass("mbZooming");return b.find("img").css("transform","scale(1)"),ge(100),!1}function pe(){return parseInt(c("#mbZoomValue big").text())}function ge(e){c("#mbZoomValue big").text(parseInt(e)+"%")}function ue(e,t,i){var a,o,s,r,l="";return(i=i||"")&&(a=i.split(".").pop(),i=i.replace("."+a,""),o=n.medialoop?"loop":"",s=n.autoplay?"autoplay":"",l+=(r="mp3"==a||"ogg"==a||"aac"==a||"wav"==a)?"<audio "+o+" "+s+' controls="controls" style="width:100%"><source src="'+i+'.mp3" type="audio/mp3" /><source src="'+i+'.ogg" type="audio/ogg" /><source src="'+i+'.aac" type="audio/aac" /><source src="'+i+'.wav" type="audio/wav" />':"<video "+o+" "+s+' controls="controls" poster="'+i+'.jpg" width="'+t.width+'" height="'+t.height+'"><source src="'+i+'.mp4" type="video/mp4" /><source src="'+i+'.webm" type="video/webm" /><source src="'+i+'.ogv" type="video/ogg" />'),i&&(l+=r?"</audio>":"</video>"),"1"==n.addmediadownloadbutton&&(l+=r?'<p><strong>Download audio file:</strong> <a href="'+i+'.mp3">MP3 format</a> | <a href=" '+i+'.ogg">Ogg format</a> | <a href=" '+i+'.aac">Aac format</a></p>':'<p><strong>Download video:</strong> <a href="'+i+'.mp4">MP4 format</a> | <a href=" '+i+'.ogv">Ogg format</a> | <a href=" '+i+'.webm">WebM format</a></p>'),c(l)}function we(e){var t;return 0<=e&&(b.html(""),L.hide(),me(),s=((o=e)||!n.loop?o:a.length)-1,(r=o+1)==a.length&&(r=n.loop?0:-1),function(){u&&("inline"!=Q||n.inlineClone||u.adopt(b.getChildren()),u.onload=function(){});C.css("display","none"),M.css("display","none"),T.css("display","none"),j.css("display","none")}(),f.addClass("mbLoading"),u&&"inline"==Q&&!n.inlineClone&&u.adopt(b.getChildren()),Q="",a[e][2]||(a[e][2]=""),z=a[e][2].split(" "),O=z.length,"1"==n.fullWidth?(Z=X="",f.addClass("mediaboxckfullwidth")):Z=1<O?(X=z[O-2].match("%")?c(window).width()*(.01*z[O-2].replace("%","")):z[O-2],z[O-1].match("%")?c(window).height()*(.01*z[O-1].replace("%","")):z[O-1]):(X=n.defaultWidth.match("%")?c(window).width()*(parseInt(n.defaultWidth)/100)-10:"",n.defaultHeight.match("%")?c(window).height()*(parseInt(n.defaultHeight)/100)-10:""),V=a[e][0],y=null!=a[o][1]?a[o][1].split("::"):"",V.match(/quietube\.com/i)?V=(Y=V.split("v.php/"))[1]:V.match(/\/\/yfrog/i)&&((Q=V.substring(V.length-1)).match(/b|g|j|p|t/i)&&(Q="image"),"s"==Q&&(Q="flash"),Q.match(/f|z/i)&&(Q="video"),V+=":iphone"),V.match(/\.gif|\.jpg|\.jpeg|\.png|twitpic\.com/i)||"image"==Q?(f.removeClass("mediaboxckfullwidth"),Q="img",V=V.replace(/twitpic\.com/i,"twitpic.com/show/full"),(u=new Image).onload=fe,u.src=V,L.show()):V.match(/\.flv|\.mp4/i)||"video"==Q?(Q="video",X=X||n.defaultWidth,Z=Z||n.defaultHeight,u=ue((n.playerpath,n.autoplay,n.showTimecode,n.medialoop,n.controlColor,n.controlBackColor,n.playerBackColor,n.volume),{id:"mbVideo",width:X,height:Z,params:{wmode:n.wmodeNB,bgcolor:n.bgcolor,allowscriptaccess:n.scriptaccess,allowfullscreen:n.fullscreen}},V),fe()):V.match(/\.mp3|\.aac|tweetmic\.com|tmic\.fm/i)||"audio"==Q?(Q="audio",X=X||n.defaultWidth,Z=Z||"17",V.match(/tweetmic\.com|tmic\.fm/i)&&((V=V.split("/"))[4]=V[4]||V[3],V="//media4.fjarnet.net/tweet/tweetmicapp-"+V[4]+".mp3"),u=ue((n.playerpath,n.autoplay,n.showTimecode,n.medialoop,n.controlColor,n.controlBackColor,n.volume),{id:"mbAudio",width:X,height:Z,params:{wmode:n.wmode,bgcolor:n.bgcolor,allowscriptaccess:n.scriptaccess,allowfullscreen:n.fullscreen}},V),fe()):V.match(/\.swf/i)||"flash"==Q?(Q="obj",X=X||n.defaultWidth,Z=Z||n.defaultHeight,u=ue(0,{id:"mbFlash",width:X,height:Z,params:{wmode:n.wmode,bgcolor:n.bgcolor,allowscriptaccess:n.scriptaccess,allowfullscreen:n.fullscreen}}),fe()):V.match(/blip\.tv/i)?(Q="obj",u=ue(0,{src:V,width:X=X||"640",height:Z=Z||"390",params:{wmode:n.wmode,bgcolor:n.bgcolor,allowscriptaccess:n.scriptaccess,allowfullscreen:n.fullscreen}}),fe()):V.match(/break\.com/i)?(Q="obj",X=X||"464",Z=Z||"376",$=V.match(/\d{6}/g),u=ue(0,{width:X,height:Z,params:{wmode:n.wmode,bgcolor:n.bgcolor,allowscriptaccess:n.scriptaccess,allowfullscreen:n.fullscreen}}),fe()):V.match(/dailymotion\.com/i)?(mediaSplit_video=V.split("video/"),mediaSplit_swf=V.split("swf/"),u=n.html5&&(1<mediaSplit_video.length||1<mediaSplit_swf.length)?(Q="url",X=X||"640",Z=Z||"381",$=mediaSplit_video[1]||mediaSplit_swf[1],c("<iframe />",{src:"//www.dailymotion.com/embed/video/"+$,id:$,width:X,height:Z,frameborder:0})):(Q="obj",ue(0,{id:$=mediaSplit_swf[1],width:X=X||"480",height:Z=Z||"381",params:{wmode:n.wmode,bgcolor:n.bgcolor,allowscriptaccess:n.scriptaccess,allowfullscreen:n.fullscreen}})),fe()):V.match(/facebook\.com/i)?(Q="obj",X=X||"320",Z=Z||"240",Y=(Y=V.split("v="))[1].split("&"),$=Y[0],u=ue(0,{movie:"//www.facebook.com/v/"+$,classid:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",width:X,height:Z,params:{wmode:n.wmode,bgcolor:n.bgcolor,allowscriptaccess:n.scriptaccess,allowfullscreen:n.fullscreen}}),fe()):V.match(/flickr\.com(?!.+\/show\/)/i)?(Q="obj",X=X||"500",Z=Z||"375",Y=V.split("/"),$=Y[5],u=ue(0,{id:$,classid:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",width:X,height:Z,params:{flashvars:"photo_id="+$+"&show_info_box="+n.flInfo,wmode:n.wmode,bgcolor:n.bgcolor,allowscriptaccess:n.scriptaccess,allowfullscreen:n.fullscreen}}),fe()):V.match(/gametrailers\.com/i)?(Q="obj",X=X||"480",Z=Z||"392",$=V.match(/\d{5}/g),u=ue(0,{id:$,width:X,height:Z,params:{wmode:n.wmode,bgcolor:n.bgcolor,allowscriptaccess:n.scriptaccess,allowfullscreen:n.fullscreen}}),fe()):V.match(/google\.com\/videoplay/i)?(Q="obj",X=X||"400",Z=Z||"326",Y=V.split("="),$=Y[1],u=ue(n.autoplayNum,{id:$,width:X,height:Z,params:{wmode:n.wmode,bgcolor:n.bgcolor,allowscriptaccess:n.scriptaccess,allowfullscreen:n.fullscreen}}),fe()):V.match(/megavideo\.com/i)?(Q="obj",X=X||"640",Z=Z||"360",Y=V.split("="),$=Y[1],u=ue(0,{id:$,width:X,height:Z,params:{wmode:n.wmode,bgcolor:n.bgcolor,allowscriptaccess:n.scriptaccess,allowfullscreen:n.fullscreen}}),fe()):V.match(/metacafe\.com\/watch/i)?(Q="obj",X=X||"400",Z=Z||"345",Y=V.split("/"),$=Y[4],u=ue(n.autoplayYes,{id:$,width:X,height:Z,params:{wmode:n.wmode,bgcolor:n.bgcolor,allowscriptaccess:n.scriptaccess,allowfullscreen:n.fullscreen}}),fe()):V.match(/vids\.myspace\.com/i)?(Q="obj",u=ue(0,{id:$,width:X=X||"425",height:Z=Z||"360",params:{wmode:n.wmode,bgcolor:n.bgcolor,allowscriptaccess:n.scriptaccess,allowfullscreen:n.fullscreen}}),fe()):V.match(/revver\.com/i)?(Q="obj",X=X||"480",Z=Z||"392",Y=V.split("/"),$=Y[4],u=ue((n.revverID,n.revverFullscreen,n.autoplay,n.revverBack,n.revverFront,n.revverGrad),{id:$,width:X,height:Z,params:{wmode:n.wmode,bgcolor:n.bgcolor,allowscriptaccess:n.scriptaccess,allowfullscreen:n.fullscreen}}),fe()):V.match(/rutube\.ru/i)?(Q="obj",X=X||"470",Z=Z||"353",Y=V.split("="),$=Y[1],u=ue(0,{movie:"//video.rutube.ru/"+$,width:X,height:Z,params:{wmode:n.wmode,bgcolor:n.bgcolor,allowscriptaccess:n.scriptaccess,allowfullscreen:n.fullscreen}}),fe()):V.match(/tudou\.com/i)?(Q="obj",X=X||"400",Z=Z||"340",Y=V.split("/"),$=Y[5],u=ue(0,{width:X,height:Z,params:{wmode:n.wmode,bgcolor:n.bgcolor,allowscriptaccess:n.scriptaccess,allowfullscreen:n.fullscreen}}),fe()):V.match(/twitcam\.com/i)?(Q="obj",X=X||"320",Z=Z||"265",Y=V.split("/"),$=Y[3],u=ue(0,{width:X,height:Z,params:{wmode:n.wmode,bgcolor:n.bgcolor,allowscriptaccess:n.scriptaccess,allowfullscreen:n.fullscreen}}),fe()):V.match(/twitvid\.com/i)?(Q="obj",X=X||"600",Z=Z||"338",Y=V.split("/"),$=Y[3],u=ue(0,{width:X,height:Z,params:{wmode:n.wmode,bgcolor:n.bgcolor,allowscriptaccess:n.scriptaccess,allowfullscreen:n.fullscreen}}),fe()):V.match(/ustream\.tv/i)?(Q="obj",X=X||"400",Z=Z||"326",u=ue((n.usViewers,n.autoplay),{width:X,height:Z,params:{wmode:n.wmode,bgcolor:n.bgcolor,allowscriptaccess:n.scriptaccess,allowfullscreen:n.fullscreen}}),fe()):V.match(/youku\.com/i)?(Q="obj",X=X||"480",Z=Z||"400",Y=V.split("id_"),$=Y[1],u=ue(0,{width:X,height:Z,params:{wmode:n.wmode,bgcolor:n.bgcolor,allowscriptaccess:n.scriptaccess,allowfullscreen:n.fullscreen}}),fe()):V.match(/youtube\.com\/watch/i)?(Y=V.split("v="),u=n.html5?(Q="url",X=X||n.defaultWidth,Z=Z||n.defaultHeight,$="mediaId_"+(new Date).getTime(),c("<iframe />",{src:"//www.youtube.com/embed/"+Y[1],id:$,width:X,height:Z,allowfullscreen:n.fullscreen,frameborder:0})):(Q="obj",$=Y[1],X=X||"480",Z=Z||"385",ue((n.autoplayNum,n.fullscreenNum,n.ytBorder,n.ytColor1,n.ytColor2,n.ytRel,n.ytInfo,n.ytSearch),{id:$,width:X,height:Z,params:{wmode:n.wmode,bgcolor:n.bgcolor,allowscriptaccess:n.scriptaccess,allowfullscreen:n.fullscreen}})),fe()):V.match(/youtube\.com\/view/i)?(Q="obj",Y=V.split("p="),$=Y[1],X=X||"480",Z=Z||"385",u=ue((n.autoplayNum,n.fullscreenNum,n.ytBorder,n.ytColor1,n.ytColor2,n.ytRel,n.ytInfo,n.ytSearch),{id:$,width:X,height:Z,params:{wmode:n.wmode,bgcolor:n.bgcolor,allowscriptaccess:n.scriptaccess,allowfullscreen:n.fullscreen}}),fe()):V.match(/veoh\.com/i)?(Q="obj",X=X||"410",Z=Z||"341",V=V.replace("%3D","/"),Y=V.split("watch/"),$=Y[1],u=ue(n.AutoplayNum,{id:$,width:X,height:Z,params:{wmode:n.wmode,bgcolor:n.bgcolor,allowscriptaccess:n.scriptaccess,allowfullscreen:n.fullscreen}}),fe()):V.match(/viddler\.com/i)?(Q="obj",X=X||"437",Z=Z||"370",Y=V.split("/"),$=Y[4],u=ue(0,{id:"viddler_"+$,movie:V,classid:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",width:X,height:Z,params:{wmode:n.wmode,bgcolor:n.bgcolor,allowscriptaccess:n.scriptaccess,allowfullscreen:n.fullscreen,id:"viddler_"+$,movie:V}}),fe()):V.match(/vimeo\.com/i)?(X=X||n.defaultWidth,Z=Z||n.defaultHeight,Y=V.split("/"),$=Y[3],t=-1!=V.indexOf("player.vimeo.com/video")?V:"//player.vimeo.com/video/"+Y[3]+"?portrait="+n.vmPortrait,Q="url",$="mediaId_"+(new Date).getTime(),u=c("<iframe />",{src:t,id:$,width:X,height:Z,allowfullscreen:n.fullscreen,frameborder:0}),fe()):V.match(/\#mb_/i)?(Q="inline",X=X||n.defaultWidth,Z=Z||n.defaultHeight,URLsplit=V.split("#"),u=c("#"+URLsplit[1]),fe()):V.match(/googleusercontent/i)?(Q="img",(u=new Image).onload=fe,u.src=V):(Q="url",X=X||n.defaultWidth,Z=Z||n.defaultHeight,$="mediaId_"+(new Date).getTime(),u=c("<iframe />",{src:V,id:$,width:X,height:Z,allowfullscreen:n.fullscreen,frameborder:0}),fe())),!1}function fe(){b.css("opacity",0),B=_="",b.off("click",oe),"img"==Q&&b.on("click",oe),"img"==Q?(X=u.width,Z=u.height,B=X,_=Z,n.imgBackground?b.css({backgroundImage:"url("+V+")",display:""}):(Z>=g-n.imgPadding&&X/p<=Z/g?(Z=g-n.imgPadding,X=parseInt(Z/u.height*X,10)):X>=p-n.imgPadding&&Z/g<X/p&&(X=p-n.imgPadding,Z=parseInt(X/u.width*Z,10)),n.clickBlock&&c(u).on("mousedown",function(e){e.stopPropagation()}).on("contextmenu",function(e){e.stopPropagation()}),b.css({backgroundImage:"none",display:""}),b.append(u))):"inline"==Q?(b.css({backgroundImage:"none",display:""}),n.inlineClone?b.grab(u.get("html")):b.adopt(u.getChildren())):"qt"==Q||"url"==Q||"video"==Q||"audio"==Q?(b.css({backgroundImage:"none",display:""}),b.append(u)):"obj"==Q?c.flash.hasVersion(8)?(b.css({backgroundImage:"none",display:""}),b.append(u)):(b.css({backgroundImage:"none",display:""}),b.html('<div id="mbError"><b>Error</b><br/>Adobe Flash is either not installed or not up to date, please visit <a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" title="Get Flash" target="_new">Adobe.com</a> to download the free player.</div>'),X=n.DefaultWidth,Z=n.DefaultHeight):(b.css({backgroundImage:"none",display:""}),b.html(n.flashText),X=n.defaultWidth,Z=n.defaultHeight),B=B||X,_=_||Z,"img"!=Q&&(Z>=g-n.imgPadding&&X/p<=Z/g?(Z=g-n.imgPadding,X=parseInt(Z/u.height*X,10)):X>=p-n.imgPadding&&Z/g<X/p&&(X=p-n.imgPadding,Z=parseInt(X/u.width*Z,10))),c(window).bind("resize",J),k.empty().html(n.showCaption?y[0]:""),x.empty().html(n.showCaption&&1<y.length?y[1]:""),I.empty().html(n.showCounter&&1<a.length?n.counterText.replace(/\{x\}/,n.countBack?a.length-o:o+1).replace(/\{y\}/,a.length):""),0<=s&&a[s][0].match(/\.gif|\.jpg|\.jpeg|\.png|twitpic\.com/i)&&(G.src=a[s][0].replace(/twitpic\.com/i,"twitpic.com/show/full")),0<=r&&a[r][0].match(/\.gif|\.jpg|\.jpeg|\.png|twitpic\.com/i)&&(U.src=a[r][0].replace(/twitpic\.com/i,"twitpic.com/show/full")),s<0&&r<0||(C.css("display",""),M.css("display",""),s<0?C.attr("data-state","0"):C.attr("data-state","1"),r<0?M.attr("data-state","0"):M.attr("data-state","1")),0<=r&&b.hasClass("paused")&&T.css("display",""),0<=r&&!b.hasClass("paused")&&j.css("display",""),b.css({width:X+"px",height:Z+"px"}),v.css({width:X-R+"px"}),x.css({width:X-R+"px"}),X=b.outerWidth(),Z=b.outerHeight()+v.outerHeight(),d=l+l<=Z?-l:-Z/2,m=h+h<=X?-h:-X/2;var e,t=K();n.resizeOpening?f.animate({width:t.width,height:t.height,top:t.top,marginTop:t.marginTop,marginLeft:t.marginLeft},n.resizeDuration,be):(f.css({width:X,height:Z,marginTop:d,marginLeft:m}),be()),te(),ee(),"img"==Q&&((e=document.getElementById("mbMedia")).addEventListener("touchstart",Ve,!1),e.addEventListener("touchmove",ze,!1),e.addEventListener("touchend",Oe,!1),e.addEventListener("touchcancel",Ne,!1))}function be(){b.animate({opacity:1},360,ve)}function ve(){le(),f.removeClass("mbLoading"),v.animate({opacity:1},240)}function ye(){if(b.addClass("paused"),ce(),0<=o){for(var e in"inline"!=Q||n.inlineClone||u.adopt(b.getChildren()),u.onload=function(){},b.empty(),t)t[e].cancel();f.css("display","none"),D.css("display","none"),c("#mbOverlay").fadeTo(360,0,function(){c(this).css("display","none")})}return!1}var ke=new Array,xe=new Array,Ie=0;ke.x0=0,ke.y0=0,xe.x0=0,xe.y0=0;var Ce=72,Me=0,je=null,Te=null,Pe=null,We=null,He=0,Le=0,Be=0,_e=1,De=0,Fe=0,Se=0,Ae=0,Ee=0;function Ve(e){e.preventDefault(),Ie=e.touches.length,Ee++,1==Ie?setTimeout(function(){1==Ee||2==Ee&&(Xe(),Ee=0),Ee=0},300):Ee=0,Be=b.find("img").width(),b.find("img").height(),1==Ie?(ke.x0=e.touches[0].pageX,ke.y0=e.touches[0].pageY,He=b.find("img").css("marginLeft"),Le=b.find("img").css("marginTop")):2==Ie?(ke.x0=e.touches[0].pageX,ke.x1=e.touches[1].pageX,ke.y0=e.touches[0].pageY,ke.y1=e.touches[1].pageY,De=Math.abs(ke.x1+ke.x0)/2,Fe=Math.abs(ke.y1+ke.y0)/2):Ne()}function ze(e){var t,i,a,o,s,r;e.preventDefault(),1==e.touches.length?(xe.x0=e.touches[0].pageX,xe.y0=e.touches[0].pageY,b.find("img").hasClass("zoomingck")&&function(){var e=b.find("img");Se=Se||e.css("margin-left"),Ae=Ae||e.css("margin-top"),Pe=Pe||event.touches[0].pageX,We=We||event.touches[0].pageY;var t=Pe-event.touches[0].pageX,i=We-event.touches[0].pageY;e.width()>c(window).width()&&(parseInt(He)-t<0&&c(window).width()-(parseInt(He)-t)<e.width()?e.css("margin-left",parseInt(Se)-t):(c(window).width(),parseInt(He),e.width()));e.height()>c(window).height()&&(parseInt(Le)-i<0&&c(window).height()-(parseInt(Le)-i)<e.height()?e.css("margin-top",parseInt(Ae)-i):(c(window).height(),parseInt(Le),e.height()))}()):2==e.touches.length?(xe.x0=e.touches[0].pageX,xe.x1=e.touches[1].pageX,xe.y0=e.touches[0].pageY,xe.y1=e.touches[1].pageY,t=Math.abs(ke.x1-ke.x0),i=Math.abs(ke.y1-ke.y0),a=Math.round(Math.sqrt(Math.pow(t,2)+Math.pow(i,2))),o=Math.abs(xe.x1-xe.x0),s=Math.abs(xe.y1-xe.y0),r=Math.round(Math.sqrt(Math.pow(o,2)+Math.pow(s,2))),_e=r/a,function(){var e=b.find("img");e.attr("data-width")||e.attr("data-width",Be);{var t,i,a,o;(e.width()>e.attr("data-width")||e.width()<=e.attr("data-width")&&1<_e)&&(e.width()/X<10||_e<1)?(1<_e&&(_e=.5*(_e-1)+1),De=c(window).width()/2,Fe=c(window).height()/2,t=De-parseInt(He),i=Fe-parseInt(Le),a=t*_e-De,o=i*_e-Fe,e.addClass("zoomingck").css({"max-width":"none","max-height":"none"}),e.css({width:Be*_e,"margin-left":-a+"px","margin-top":-o+"px"})):e.width()<=e.attr("data-width")&&Xe()}}()):Ne()}function Oe(e){var t,i,a;e.preventDefault(),1==Ie&&0!=xe.x0&&(Me=Math.round(Math.sqrt(Math.pow(xe.x0-ke.x0,2)+Math.pow(xe.y0-ke.y0,2))),Ce<=Me&&!b.find("img").hasClass("zoomingck")&&(t=ke.x0-xe.x0,i=xe.y0-ke.y0,Math.round(Math.sqrt(Math.pow(t,2)+Math.pow(i,2))),a=Math.atan2(i,t),(je=Math.round(180*a/Math.PI))<0&&(je=360-Math.abs(je)),"left"==(Te=je<=45&&0<=je||je<=360&&315<=je?"left":135<=je&&je<=225?"right":45<je&&je<135?"down":"up")?oe():"right"==Te&&ae())),Ne()}function Ne(e){Ie=0,ke.x0=0,ke.y0=0,xe.x0=0,xe.y0=0,We=Pe=Te=je=null,initialPinchDistance=Me=0,endPinchDistance=0,_e=1,Ae=Se=Fe=De=Be=0,Ee=2<Ee?0:Ee}function Xe(){var e=b.find("img");e.width(e.attr("data-width")).css("max-width","100%").css("max-height","100%").css("margin-left","0").removeClass("zoomingck"),te()}window.Mediaboxck=function(t,s,r,l){return!!t&&(r=r||function(e){return N=(N=c(e).attr(s.attribType).split(/[\[\]]/))[1],[c(e).attr("href"),c(e).attr("data-title"),N]},l=l||function(){return!0},t.map(function(){c(this).data("mediaboxck_done","1").attr("data-title",c(this).attr("title")).removeAttr("title")}),t.on("click",function(e){curlink=this,e.preventDefault();var i=t.filter(function(){return l(curlink,this)}),a=[],o=[];return i.each(function(e,t){o.indexOf(t.toString())<0&&(a.push(i[e]),o.push(i[e].toString()))}),Mediabox.open(a.map(r),o.indexOf(this.toString()),s)}),t.each(function(){var e;"1"==c(this).attr("data-autoload")&&(c(this).trigger("click"),0<(e=parseInt(c(this).attr("data-fadeout")))&&setTimeout(function(){ye()},e))}),t)}}(jQuery),function(a,o,e){function i(e){var t=[];for(var i in e)t.push(['<param name="',i,'" value="',function e(t){if(typeof t!=s)return t;var i=[],a="";for(var o in t)a=typeof t[o]==s?e(t[o]):[o,r?encodeURI(t[o]):t[o]].join("="),i.push(a);return i.join("&")}(e[i]),'" />'].join(""));return t.join("")}var s="object",r=!0;try{var t=e.description||new e("ShockwaveFlash.ShockwaveFlash").GetVariable("$version")}catch(e){t="Unavailable"}var l=t.match(/\d+/g)||[0];a[o]={available:0<l[0],activeX:e&&!e.name,version:{original:t,array:l,string:l.join("."),major:parseInt(l[0],10)||0,minor:parseInt(l[1],10)||0,release:parseInt(l[2],10)||0},hasVersion:function(e){return e=/string|number/.test(typeof e)?e.toString().split("."):/object/.test(typeof e)?[e.major,e.minor]:e||[0,0],function e(t,i){var a=(t[0]||0)-(i[0]||0);return 0<a||!a&&0<t.length&&e(t.slice(1),i.slice(1))}(l,e)},encodeParams:!0,expressInstall:"expressInstall.swf",expressInstallIsActive:!1,create:function(e){if(!e.swf||this.expressInstallIsActive||!this.available&&!e.hasVersionFail)return!1;if(!this.hasVersion(e.hasVersion||1)){if(this.expressInstallIsActive=!0,"function"==typeof e.hasVersionFail&&!e.hasVersionFail.apply(e))return!1;e={swf:e.expressInstall||this.expressInstall,height:137,width:214,flashvars:{MMredirectURL:location.href,MMplayerType:this.activeX?"ActiveX":"PlugIn",MMdoctitle:document.title.slice(0,47)+" - Flash Player Installation"}}}attrs={data:e.swf,type:"application/x-shockwave-flash",id:e.id||"flash_"+Math.floor(999999999*Math.random()),width:e.width||320,height:e.height||180,style:e.style||""},r=void 0!==e.useEncode?e.useEncode:this.encodeParams,e.movie=e.swf,e.wmode=e.wmode||"opaque",delete e.fallback,delete e.hasVersion,delete e.hasVersionFail,delete e.height,delete e.id,delete e.swf,delete e.useEncode,delete e.width;var t=document.createElement("div");return t.innerHTML=["<object ",function(e){var t=[];for(var i in e)e[i]&&t.push([i,'="',e[i],'"'].join(""));return t.join(" ")}(attrs),">",i(e),"</object>"].join(""),t.firstChild}},a.fn[o]=function(i){var e=this.find(s).andSelf().filter(s);return/string|object/.test(typeof i)&&this.each(function(){var e,t=a(this);(i=typeof i==s?i:{swf:i}).fallback=this,(e=a[o].create(i))&&(t.children().remove(),t.html(e))}),"function"==typeof i&&e.each(function(){var e=this;e.jsInteractionTimeoutMs=e.jsInteractionTimeoutMs||0,e.jsInteractionTimeoutMs<660&&(e.clientWidth||e.clientHeight?i.call(e):setTimeout(function(){a(e)[o](i)},e.jsInteractionTimeoutMs+66))}),e}}(jQuery,"flash",navigator.plugins["Shockwave Flash"]||window.ActiveXObject);