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 l,a,t,o,s,n,r,d,h,m,p,g,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(){m=c(window).width(),p=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(){m=c(window).width(),p=c(window).height(),null==B&&(B=l.defaultHeight),B>=p-l.imgPadding&&X/m<=Z/p&&!f.hasClass("mediaboxckmobile")?(n=c(window).scrollTop()+c(window).height()/2,tmpHeight=p-l.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()):_>=m-l.imgPadding&&B/p<_/m&&!f.hasClass("mediaboxckmobile")?(n=c(window).scrollTop()+c(window).height()/2,tmpWidth=m-l.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()):_<m-l.imgPadding&&!f.hasClass("mediaboxckmobile")&&(n=c(window).scrollTop()+c(window).height()/2,tmpWidth=_,tmpHeight=B,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(l.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(l.keyboardStop)return!1}function ae(){return ce(),we(o)}function oe(){return ce(),we(s)}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(ne),j=c('<a id="mbPauseLink" href="#" />').click(re),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&&(d="50%",f.css({left:d,marginLeft:-X/2-q}))},open:function(e,t,i){return l={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"},l=c.extend({},l,i),"string"==typeof e&&(e=[[e,t,i]],t=0),a=e,l.loop=l.loop&&1<a.length,"1"==l.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(l.buttonText[0]),M.html(l.buttonText[1]),closeLink.html(l.buttonText[2]),T.html(l.buttonText[3]),j.html(l.buttonText[4]).hide(),"1"!=l.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"==l.toolbarSize&&v.addClass("mbBottomBig"),b.addClass("paused"),J(),w.css("display",""),c(window).off("keydown",ie),l.keyboard&&c(window).bind("keydown",ie),l.isMobileEnable&&l.isMobile&&(f.addClass("mediaboxckmobile"),D.addClass("mediaboxckmobile")),n=c(window).scrollTop()+c(window).height()/2,d="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:n,left:d,width:l.initialWidth,height:l.initialHeight,marginTop:-l.initialHeight/2,marginLeft:-l.initialWidth/2,display:""}),1<a.length&&D.css({top:c(window).scrollTop(),left:d,display:""}),c("#mbOverlay").css("opacity",0).fadeTo(360,l.overlayOpacity),"1"==l.showToolbar&&1<a.length&&(c(document.body).append(D),D.delay(200).css("opacity",0).fadeTo(360,1)),"1"==l.diapoAutoplay&&ne(),we(t)},pagination:function(e){var s,n=e.find(".mediaboxck-pagination");n.length&&"1"!==n.data("done")&&(n.data("done","1"),s=parseInt(n.attr("data-perpage")),n.find("a.mediaboxck-pagination-link").click(function(){n.find("li").removeClass("active"),c(this).parent().addClass("active");var e=parseInt(c(this).attr("data-page"));let t=c(this).closest(".mediaboxck_cont");var i=t.find(".mediaboxck_cont_inner"),a=s*(e-1)+1,e=a+s-1,o=t.find(".mediaboxck_link:nth-child(n+"+a+"):nth-child(-n+"+e+")");i.css("height",i.height()),t.find(".mediaboxck_link").stop().animate({opacity:"0"},500,function(){c(this).hide(),o.css({display:"inline-block",opacity:"0"}).stop().animate({opacity:"1"},500,function(){i.css("height","")})})}),e.find(".mediaboxck-navigation-prev").click(function(){n.find("li.active").prev().length&&(n.find(".mediaboxck-navigation-disabled").removeClass("mediaboxck-navigation-disabled"),n.find("li.active").prev().find("a").trigger("click"),n.find("li.active").prev().length||c(this).addClass("mediaboxck-navigation-disabled"))}),e.find(".mediaboxck-navigation-next").click(function(){n.find("li.active").next().length&&(n.find(".mediaboxck-navigation-disabled").removeClass("mediaboxck-navigation-disabled"),n.find("li.active").next().find("a").trigger("click"),n.find("li.active").next().length||c(this).addClass("mediaboxck-navigation-disabled"))}))}},E=0;var se=.005;function ne(){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()))},l.diapoTime*se))}function ce(){clearInterval(A),E=0,S.css("width","0")}function re(){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,n="";return(i=i||"")&&(s=i.split(".").pop(),i=i.replace("."+s,""),a=l.medialoop?"loop":"",o=l.autoplay?"autoplay":"",n+=(s="mp3"==s||"ogg"==s||"aac"==s||"wav"==s)?"<audio "+a+" "+o+' 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 "+a+" "+o+' 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&&(n+=s?"</audio>":"</video>"),"1"==l.addmediadownloadbutton&&(n+=s?'<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(n)}function we(e){return 0<=e&&(b.html(""),L.hide(),me(),o=((t=e)||!l.loop?t:a.length)-1,(s=t+1)==a.length&&(s=l.loop?0:-1),u&&("inline"!=Q||l.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&&!l.inlineClone&&u.adopt(b.getChildren()),Q="",a[e][2]||(a[e][2]=""),z=a[e][2].split(" "),O=z.length,"1"==l.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=l.defaultWidth.match("%")?c(window).width()*(parseInt(l.defaultWidth)/100)-10:"",l.defaultHeight.match("%")?c(window).height()*(parseInt(l.defaultHeight)/100)-10:""),V=a[e][0],y=null!=a[t][1]?a[t][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|\.webp|\.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||l.defaultWidth,Z=Z||l.defaultHeight,u=ue(0,{id:"mbVideo",width:"100%",height:"100%",params:{wmode:l.wmodeNB,bgcolor:l.bgcolor,allowscriptaccess:l.scriptaccess,allowfullscreen:l.fullscreen}},V),fe()):V.match(/\.mp3|\.aac|tweetmic\.com|tmic\.fm/i)||"audio"==Q?(Q="audio",X=X||l.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(0,{id:"mbAudio",width:X,height:Z,params:{wmode:l.wmode,bgcolor:l.bgcolor,allowscriptaccess:l.scriptaccess,allowfullscreen:l.fullscreen}},V),fe()):V.match(/\.swf/i)||"flash"==Q?(Q="obj",X=X||l.defaultWidth,Z=Z||l.defaultHeight,u=ue(0,{id:"mbFlash",width:X,height:Z,params:{wmode:l.wmode,bgcolor:l.bgcolor,allowscriptaccess:l.scriptaccess,allowfullscreen:l.fullscreen}}),fe()):V.match(/blip\.tv/i)?(Q="obj",u=ue(0,{src:V,width:X=X||"640",height:Z=Z||"390",params:{wmode:l.wmode,bgcolor:l.bgcolor,allowscriptaccess:l.scriptaccess,allowfullscreen:l.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:l.wmode,bgcolor:l.bgcolor,allowscriptaccess:l.scriptaccess,allowfullscreen:l.fullscreen}}),fe()):V.match(/dailymotion\.com/i)?(mediaSplit_video=V.split("video/"),mediaSplit_swf=V.split("swf/"),u=l.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:l.wmode,bgcolor:l.bgcolor,allowscriptaccess:l.scriptaccess,allowfullscreen:l.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:l.wmode,bgcolor:l.bgcolor,allowscriptaccess:l.scriptaccess,allowfullscreen:l.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="+l.flInfo,wmode:l.wmode,bgcolor:l.bgcolor,allowscriptaccess:l.scriptaccess,allowfullscreen:l.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:l.wmode,bgcolor:l.bgcolor,allowscriptaccess:l.scriptaccess,allowfullscreen:l.fullscreen}}),fe()):V.match(/google\.com\/videoplay/i)?(Q="obj",X=X||"400",Z=Z||"326",Y=V.split("="),$=Y[1],u=ue(l.autoplayNum,{id:$,width:X,height:Z,params:{wmode:l.wmode,bgcolor:l.bgcolor,allowscriptaccess:l.scriptaccess,allowfullscreen:l.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:l.wmode,bgcolor:l.bgcolor,allowscriptaccess:l.scriptaccess,allowfullscreen:l.fullscreen}}),fe()):V.match(/metacafe\.com\/watch/i)?(Q="obj",X=X||"400",Z=Z||"345",Y=V.split("/"),$=Y[4],u=ue(l.autoplayYes,{id:$,width:X,height:Z,params:{wmode:l.wmode,bgcolor:l.bgcolor,allowscriptaccess:l.scriptaccess,allowfullscreen:l.fullscreen}}),fe()):V.match(/vids\.myspace\.com/i)?(Q="obj",u=ue(0,{id:$,width:X=X||"425",height:Z=Z||"360",params:{wmode:l.wmode,bgcolor:l.bgcolor,allowscriptaccess:l.scriptaccess,allowfullscreen:l.fullscreen}}),fe()):V.match(/revver\.com/i)?(Q="obj",X=X||"480",Z=Z||"392",Y=V.split("/"),$=Y[4],u=ue((l.revverID,l.revverFullscreen,l.autoplay,l.revverBack,l.revverFront,l.revverGrad),{id:$,width:X,height:Z,params:{wmode:l.wmode,bgcolor:l.bgcolor,allowscriptaccess:l.scriptaccess,allowfullscreen:l.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:l.wmode,bgcolor:l.bgcolor,allowscriptaccess:l.scriptaccess,allowfullscreen:l.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:l.wmode,bgcolor:l.bgcolor,allowscriptaccess:l.scriptaccess,allowfullscreen:l.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:l.wmode,bgcolor:l.bgcolor,allowscriptaccess:l.scriptaccess,allowfullscreen:l.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:l.wmode,bgcolor:l.bgcolor,allowscriptaccess:l.scriptaccess,allowfullscreen:l.fullscreen}}),fe()):V.match(/ustream\.tv/i)?(Q="obj",X=X||"400",Z=Z||"326",u=ue((l.usViewers,l.autoplay),{width:X,height:Z,params:{wmode:l.wmode,bgcolor:l.bgcolor,allowscriptaccess:l.scriptaccess,allowfullscreen:l.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:l.wmode,bgcolor:l.bgcolor,allowscriptaccess:l.scriptaccess,allowfullscreen:l.fullscreen}}),fe()):V.match(/youtube\.com\/watch/i)?(Y=V.split("v="),u=l.html5?(Q="url",X=X||l.defaultWidth,Z=Z||l.defaultHeight,$="mediaId_"+(new Date).getTime(),c("<iframe />",{src:"//www.youtube.com/embed/"+Y[1],id:$,width:X,height:Z,allowfullscreen:l.fullscreen,frameborder:0})):(Q="obj",$=Y[1],X=X||"480",Z=Z||"385",ue((l.autoplayNum,l.fullscreenNum,l.ytBorder,l.ytColor1,l.ytColor2,l.ytRel,l.ytInfo,l.ytSearch),{id:$,width:X,height:Z,params:{wmode:l.wmode,bgcolor:l.bgcolor,allowscriptaccess:l.scriptaccess,allowfullscreen:l.fullscreen}})),fe()):V.match(/youtube\.com\/view/i)?(Q="obj",Y=V.split("p="),$=Y[1],X=X||"480",Z=Z||"385",u=ue((l.autoplayNum,l.fullscreenNum,l.ytBorder,l.ytColor1,l.ytColor2,l.ytRel,l.ytInfo,l.ytSearch),{id:$,width:X,height:Z,params:{wmode:l.wmode,bgcolor:l.bgcolor,allowscriptaccess:l.scriptaccess,allowfullscreen:l.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(l.AutoplayNum,{id:$,width:X,height:Z,params:{wmode:l.wmode,bgcolor:l.bgcolor,allowscriptaccess:l.scriptaccess,allowfullscreen:l.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:l.wmode,bgcolor:l.bgcolor,allowscriptaccess:l.scriptaccess,allowfullscreen:l.fullscreen,id:"viddler_"+$,movie:V}}),fe()):V.match(/vimeo\.com/i)?(X=X||l.defaultWidth,Z=Z||l.defaultHeight,Y=V.split("/"),$=Y[3],e=-1!=V.indexOf("player.vimeo.com/video")?V:"//player.vimeo.com/video/"+Y[3]+"?portrait="+l.vmPortrait,Q="url",$="mediaId_"+(new Date).getTime(),u=c("<iframe />",{src:e,id:$,width:X,height:Z,allowfullscreen:l.fullscreen,frameborder:0}),fe()):V.match(/\#mb_/i)?(Q="inline",X=X||l.defaultWidth,Z=Z||l.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||l.defaultWidth,Z=Z||l.defaultHeight,$="mediaId_"+(new Date).getTime(),u=c("<iframe />",{src:V,id:$,width:X,height:Z,allowfullscreen:l.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,_=X,B=Z,l.imgBackground?b.css({backgroundImage:"url("+V+")",display:""}):(Z>=p-l.imgPadding&&X/m<=Z/p?(Z=p-l.imgPadding,X=parseInt(Z/u.height*X,10)):X>=m-l.imgPadding&&Z/p<X/m&&(X=m-l.imgPadding,Z=parseInt(X/u.width*Z,10)),l.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:""}),l.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=l.DefaultWidth,Z=l.DefaultHeight):(b.css({backgroundImage:"none",display:""}),b.html(l.flashText),X=l.defaultWidth,Z=l.defaultHeight),_=_||X,B=B||Z,"img"!=Q&&(Z>=p-l.imgPadding&&X/m<=Z/p?(Z=p-l.imgPadding,X=parseInt(Z/u.height*X,10)):X>=m-l.imgPadding&&Z/p<X/m&&(X=m-l.imgPadding,Z=parseInt(X/u.width*Z,10))),c(window).bind("resize",J),k.empty().html(l.showCaption?y[0]:""),x.empty().html(l.showCaption&&1<y.length?y[1]:""),I.empty().html(l.showCounter&&1<a.length?l.counterText.replace(/\{x\}/,l.countBack?a.length-t:t+1).replace(/\{y\}/,a.length):""),0<=o&&a[o][0].match(/\.gif|\.jpg|\.jpeg|\.png|\.webp|twitpic\.com/i)&&(G.src=a[o][0].replace(/twitpic\.com/i,"twitpic.com/show/full")),0<=s&&a[s][0].match(/\.gif|\.jpg|\.jpeg|\.png|\.webp|twitpic\.com/i)&&(U.src=a[s][0].replace(/twitpic\.com/i,"twitpic.com/show/full")),o<0&&s<0||(C.css("display",""),M.css("display",""),o<0?C.attr("data-state","0"):C.attr("data-state","1"),s<0?M.attr("data-state","0"):M.attr("data-state","1")),0<=s&&b.hasClass("paused")&&T.css("display",""),0<=s&&!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(),r=n+n<=Z?-n:-Z/2,h=d+d<=X?-d:-X/2;var e=K();l.resizeOpening?f.animate({width:e.width,height:e.height,top:e.top,marginTop:e.marginTop,marginLeft:e.marginLeft},l.resizeDuration,be):(f.css({width:X,height:Z,marginTop:r,marginLeft:h}),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<=t){for(var e in"inline"!=Q||l.inlineClone||u.adopt(b.getChildren()),u.onload=function(){},b.empty(),g)g[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,_e=0,Be=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,_e=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;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))),t=Math.abs(xe.x1-xe.x0),i=Math.abs(xe.y1-xe.y0),i=Math.round(Math.sqrt(Math.pow(t,2)+Math.pow(i,2))),Be=i/a,(t=b.find("img")).attr("data-width")||t.attr("data-width",_e),(t.width()>t.attr("data-width")||t.width()<=t.attr("data-width")&&1<Be)&&(t.width()/X<10||Be<1)?(1<Be&&(Be=.5*(Be-1)+1),De=c(window).width()/2,Fe=c(window).height()/2,i=De-parseInt(He),a=Fe-parseInt(Le),i=i*Be-De,a=a*Be-Fe,t.addClass("zoomingck").css({"max-width":"none","max-height":"none"}),t.css({width:_e*Be,"margin-left":-i+"px","margin-top":-a+"px"})):t.width()<=t.attr("data-width")&&Xe()):Ne()}function Oe(e){var t,i;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))),t=Math.atan2(i,t),(je=Math.round(180*t/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,Be=1,Ae=Se=Fe=De=_e=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,n,l){if(!t)return!1;n=n||function(e){return 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(n),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))});var e=c(".mediaboxck-pagination").closest(".mediaboxck_cont");return e.length&&Mediabox.pagination(e),t}}(jQuery),function(a,o,e){function i(e){var t,i=[];for(t in e)i.push(['<param name="',t,'" value="',function e(t){if(typeof t!=s)return t;var i,a,o=[];for(a in t)i=typeof t[a]==s?e(t[a]):[a,n?encodeURI(t[a]):t[a]].join("="),o.push(i);return o.join("&")}(e[t]),'" />'].join(""));return i.join("")}var s="object",n=!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||""},n=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,i=[];for(t in e)e[t]&&i.push([t,'="',e[t],'"'].join(""));return i.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);