/** * @package WordPress * @subpackage Industrial * @since Industrial 1.0 * * Template Scripts * Created by CMSMasters * */ /* --------------------------------------------- */ /* Author: http://codecanyon.net/user/CodingJack */ /* --------------------------------------------- */ function jackboxFrameReady(){$.fn.jackBox("frameReady")}(function(e){function vr(){qt=e(window);Zt=e("body");En=e("body, html");_t=e("
").addClass("jackbox-modal");en=e("
").addClass("jackbox-holder");wt=e("
").addClass("jackbox-wrapper");tt=e("
").addClass("jackbox-preloader");G=e("").addClass("jackbox-panel jackbox-panel-left");$=e("").addClass("jackbox-panel jackbox-panel-right");var t=jt.createDocumentFragment();t.appendChild(wt[0]);t.appendChild(tt[0]);_t[0].appendChild(t);t=jt.createDocumentFragment();t.appendChild(G[0]);t.appendChild($[0]);t.appendChild(en[0]);wt[0].appendChild(t);et=e("
").addClass("jackbox-container");if(!$t){K=e("").addClass("jackbox-pre-inside").appendTo(tt)}n*=2;Q=0;t=jt.createDocumentFragment();if(!!g){U=e(g).hide();t.appendChild(U[0])}t.appendChild(et[0]);if(!!y){w=e(y).hide();t.appendChild(w[0])}en[0].appendChild(t);k=-(zn+r);rt=[];Ht=[];Vt=[];zt=[];tn.each(mr);if(An){e.address.internalChange(wr);e.address.externalChange(br)}Un=true;if(Gt){An?setTimeout(Gt,250):Gt();Gt=null}tn=Ht=g=y=rt=null}function mr(){var t=e(this).attr("data-group").split(" ").join("").toLowerCase();if(!$t){if(zt.indexOf(t)===-1)gr(t)}else{var n=zt.length,r=false;while(n--){if(zt[n]===t){r=true;break}}if(!r)gr(t)}}function gr(t){zt[zt.length]=t;Ht=[];e(".jackbox[data-group="+t+"]").each(yr);Vt[Vt.length]=Ht;Yn++}function yr(t){if(!isNaN(t)){Pt=e(this).data({id:t,cat:Yn});Ht[t]=Pt}else{Pt=t}Ft=Pt.attr("href")||Pt.attr("data-href");if(!Ft)return;var n,r;if(Ft.charAt(0)!=="#"){n=Ft.toLowerCase().split(".").pop()}else{n="inline"}r=mi(Ft,n);if(r){Pt.data("type",r);if(!Pt.attr("data-thumbnail")){if(r==="vimeo"){fi(Pt,Ft)}else if(r==="youtube"){Pt.attr("data-thumbnail","http://img.youtube.com/vi/"+Ft.split("http://www.youtube.com/watch?v=")[1]+"/1.jpg")}}}else if(vi(n)){Pt.data("type","image")}else{switch(n){case"mp3":Pt.data("type","audio");break;case"swf":Pt.data("type","swf");break;case"inline":Pt.data("type","inline");break;default:Pt.data("type","iframe")}}Pt.on("click.jackbox",xr);yn=Pt.attr("data-description");if(!yn)return;if(rt){var i=rt.indexOf(yn);if(i===-1){yn=e(yn);if(!yn.length)return;rt[rt.length]=yn}else{yn=rt[i]}}else{yn=e(yn);if(!yn.length)return}Pt.data("description",yn)}function br(e){if(er){er=false;var t=jt.URL,n=t.split("?url=");if(n.length===2){window.location=n[0]+"#/"+n[1];return}}clearTimeout(sn);Er(e.value);if(Gn!==-1){if(Zn){Zn=false;wr()}else{sn=setTimeout(wr,750)}}else if(bn){ni()}}function wr(e){if(typeof e==="object"){clearTimeout(sn);Er(e.value)}if(Gn!==-1){Ar()}else if(bn){ni()}}function Er(e){if(Nn&&!Tn&&!jn)Yt[Qn].removeClass("jb-thumb-active");if(e!=="/"){var t=e.split("/");if(t.length===3){Qn=parseInt(t[2],10)-1;if(isNaN(Qn))Qn=0;Xt=t[1]}else{if(isNaN(t[1])){Qn=0;Xt=t[1]}else{Qn=parseInt(t[1],10)-1;Xt="/"}}}else{Xt="/";Qn=0}if(Xt!=="/"){var n=Yn;while(n--){if(zt[n]===Xt){Gn=n;Rt=Vt[Gn].length;xt=Rt!==1;break}}}else{Gn=-1}jn=false}function Sr(){clearTimeout(b);b=setTimeout(pr,100)}function xr(t){t.stopPropagation();t.preventDefault();var n=e(this).data();Tr(n.cat,n.id,true)}function Tr(t,n,r){clearTimeout(sn);if(!r)Br();if(An){e.address.value(zt[t]+"/"+(n+1))}else{if(Nn&&!Tn&&!jn)Yt[Qn].removeClass("jb-thumb-active");Qn=n;Gn=t;Rt=Vt[Gn].length;xt=Rt!==1;Ar()}}function Nr(e){if(e){e.stopPropagation();if(xn)return false}if(!bn)return;if(Nn&&!Tn)Yt[Qn].removeClass("jb-thumb-active");Qn0?Qn--:Qn=Vt[Gn].length-1;jn=true;Tr(Gn,Qn)}function kr(){var e=[_t[0],wt[0],en[0],et[0]],t=4;while(t--){e[t].addEventListener("touchstart",oi,false);e[t].addEventListener("touchmove",oi,false);e[t].addEventListener("touchend",oi,false)}}function Lr(){var e=[_t[0],wt[0],en[0],et[0]],t=4;while(t--){e[t].removeEventListener("touchstart",oi,false);e[t].removeEventListener("touchmove",oi,false);e[t].removeEventListener("touchend",oi,false)}}function Ar(){Ln=Vt[Gn];Pt=Ln[Qn];if(!Pt)return;if(Lt)kr();Ft=Pt.attr("href")||Pt.attr("data-href");if(bn){xn=true;Zr();Dr()}else{bn=true;if(!Lt){En.stop();Q=qt.scrollTop()}else{jt.addEventListener("touchmove",oi,false)}_t.appendTo(Zt).one("click.jackbox",ei);vn=_t.parents().each(Or);if(!wn){wn=true;_=parseInt(en.css("padding-left"),10)+parseInt(en.css("padding-right"),10);M=parseInt(en.css("padding-top"),10)+parseInt(en.css("padding-bottom"),10);H=parseInt(G.css("width"),10)+14;At=M+n;N=zn+(r<<1);Tt=parseInt(tt.css("margin-top"),10);Pn=Tt-(N>>1);S=parseInt(en.css("padding-left"),10);x=parseInt(en.css("padding-top"),10);J=e(".jackbox-fullscreen");if(!J.length)J=null;E=!Lt&&mn!=="safari"&&("webkitRequestFullScreen"in _t[0]||"mozFullScreenEnabled"in jt)}ft=!$n&&Sn&&xt?0:k;ln=qt.width();cn=qt.height();en.css({width:ln,height:cn,marginLeft:-(ln>>1)-S,marginTop:-(cn>>1)-x});Jacked.fadeIn(_t[0],{callback:_r});Qt=setTimeout(Dr,250);wt.on("click.jackbox",yi)}}function Or(){e(this).addClass("jackbox-overflow")}function Mr(){e(this).removeClass("jackbox-overflow")}function _r(){qt[0].scrollTo(0,0)}function Dr(){if(!B&&K){K.addClass("jackbox-pre-ready");B=true}if(Nn){Yt[Qn].addClass("jb-thumb-active");Tn?Tn=false:cr(false,true)}var t=Pt.attr("data-autoplay")?Pt.attr("data-autoplay"):qn,n=Pt.data("description")||null,r=Pt.attr("title")||"",i;Ct=Pt.attr("data-scaleUp")==="true";ht=n?n.html():false;dn=Pt.data("type");if(r){st=r;Y=escape(st)}else{Y=false;if(typeof Dt!=="undefined"){if(Dt.data("links"))Dt.data("links").off(".jackbox");Dt.empty()}}if(Lt)ot=dn==="image"||dn==="inline";if(dn!=="image")Gr();if(ln>568){tt.css("margin-top",ft===0?Pn:Tt)}else{tt.css("margin-top",Tt)}wt.show();tt.addClass("jackbox-spin-preloader");switch(dn){case"image":fn=true;un=e("").addClass("jackbox-content").one("load.jackbox",rr).prependTo(et);if(Lt){un[0].addEventListener("touchstart",oi,false);un[0].addEventListener("touchmove",oi,false);un[0].addEventListener("touchend",oi,false)}un.attr("src",Ft);break;case"youtube":nr(m.split("{url}").join(Ft.split("watch?v=")[1]).split("{autoplay}").join(t==="true"?1:0));break;case"vimeo":nr(v.split("{url}").join(Ft.substring(Ft.lastIndexOf("/"))).split("{autoplay}").join(t));break;case"local":var s=Pr(),o=Pt.attr("data-flashHasPriority")?Pt.attr("data-flashHasPriority"):Wn.toString();i=o==="false"&&E&&mn!=="firefox";if(Pt.attr("data-poster")){s+=Pt.attr("data-poster")}else{s="false"}nr(h+"?video="+Ft+"&autoplay="+t+"&flashing="+o+"&width="+nn+"&height="+an+"&poster="+s,true);break;case"audio":Pr();nr(p+"?audio="+Ft+"&title="+(Pt.attr("data-audiotitle")?Pt.attr("data-audiotitle"):Y)+"&autoplay="+t);break;case"swf":Pr();nr(l+"?swf="+Ft+"&width="+(It.toString()+"&height="+Wt.toString()));break;case"inline":var u=e(Ft);un=e("
").addClass("jackbox-content jackbox-html").html(u.length?u.html():"").prependTo(et);un.css("width",It);Pt.attr("data-height",un.outerHeight(true));Gr();rr();break;default:nr(Ft,false,true)}if(!E)return;!i?J.show():J.hide()}function Pr(){if(Ft.search("http")!==-1)return;var e=jt.URL.split("#")[0];if(e[e.length-1]!=="/"){e=e.substring(0,e.lastIndexOf("/")+1)}Ft=e+Ft;return e}function Hr(){if(Nn){var e=Yt.length;while(e--)Yt[e].on("click.jackbox",Xr)}G.on("click.jackbox",Cr);$.on("click.jackbox",Nr);if(Lt&&ot)un.cjSwipe("touchSwipe",si)}function Br(){if(Nn){var e=Yt.length;while(e--)Yt[e].off("click.jackbox")}G.off(".jackbox");$.off(".jackbox");if(Lt&&ot)un.cjSwipe("unbindSwipe")}function jr(){P.css("visibility","hidden")}function Fr(){var t=jt.createDocumentFragment(),n=zn>>1;_n=e("
").addClass("jackbox-thumb-holder").css("height",zn).appendTo(_t);I=e("
").addClass("jackbox-thumb-panel").css("height",zn);R=e("
").addClass("jackbox-thumb-right");Z=e("
").addClass("jackbox-thumb-left");t.appendChild(I[0]);t.appendChild(R[0]);t.appendChild(Z[0]);I[0].cjThumbs=true;_n[0].appendChild(t);F=e("
").addClass("jackbox-thumb-strip").appendTo(I);Z.css("top",n);R.css("top",n)}function Ir(){var t=Vt[Gn],n=[],r=Rt,i,s,o,u,a,f,l,h,p;In=true;while(r--){o=t[r];if(o.attr("data-thumbnail")){n[r]=false;continue}a=o.children("img");if(a.length){o.attr("data-thumbnail",a.attr("src"));n[r]=a}else if(o.data("type")==="image"){o.attr("data-thumbnail",o.attr("href")||o.attr("data-href"));n[r]=false}else{o.attr("data-thumbnail",c);n[r]=false}}Yt=[];if(!_n)Fr();u=jt.createDocumentFragment();for(r=0;r").data("id",r).addClass("jackbox-thumb").css({width:Rn,height:zn,left:gn*r}).on("click.jackbox",Xr);if(vt){i=Ln[r].attr("data-thumbTooltip")||Ln[r].attr("title");if(i)s.data("theTitle",i).on("mouseenter.jackbox",ar).on("mouseleave.jackbox",Rr)}u.appendChild(s[0]);f=e("").addClass("jb-thumb").one("load.jackbox",Wr).appendTo(s);s.data("theThumb",f);if(n[r]){l=n[r].attr("width")||n[r].width();h=n[r].attr("height")||n[r].height()}else{l=Rn;h=zn}if(l>Rn&&h>zn){p=l0){bt--;hr(false,true)}}function Wr(t){t.stopPropagation();var n=e(this).parent();n.addClass("jb-thumb-fadein");if(!Lt)n.addClass("jb-thumb-hover");if(n.data("id")===Qn)n.addClass("jb-thumb-active")}function Xr(t){t.stopPropagation();if(xn)return false;var n=e(this),r=n.data("id");if(r===Qn)return;if(Nn)Yt[Qn].removeClass("jb-thumb-active");Qn=r;Tn=true;Tr(Gn,Qn)}function Vr(){Dn=true;if(E)J.on("click.jackbox",$r);if(ct)ct.one("click.jackbox",ei);if(Bt)Bt.on("click.jackbox",ur);if(!xt)return;if(St)St.on("click.jackbox",Nr);if(Nt)Nt.on("click.jackbox",Cr);if(vt&&I)I.on("mouseenter.jackbox",qr)}function $r(){if(!L){qt.off(".jackbox");L=true;if(jt.mozFullScreenEnabled){jt.addEventListener("mozfullscreenchange",Jr,false);_t[0].mozRequestFullScreen()}else if(_t[0].webkitRequestFullScreen){jt.addEventListener("webkitfullscreenchange",Jr,false);_t[0].webkitRequestFullScreen()}}else{Qr()}}function Jr(){if(jt.webkitIsFullScreen||jt.mozFullScreen){pr()}else{Qr(true)}}function Kr(e){jt.removeEventListener(e.type,Kr,false);pr();qt.on("resize.jackbox",Sr)}function Qr(e){L=false;if(jt.mozFullScreenEnabled){jt.removeEventListener("mozfullscreenchange",Jr,false);if(e){pr();qt.on("resize.jackbox",Sr)}else{jt.addEventListener("mozfullscreenchange",Kr,false);jt.mozCancelFullScreen()}}else if(_t[0].webkitRequestFullScreen){jt.removeEventListener("webkitfullscreenchange",Jr,false);if(e){pr();qt.on("resize.jackbox",Sr)}else{jt.addEventListener("webkitfullscreenchange",Kr,false);jt.webkitCancelFullScreen()}}}function Gr(){fn=false;nn=Pt.attr("data-width")?parseInt(Pt.attr("data-width"),10):Jn;an=Pt.attr("data-height")?parseInt(Pt.attr("data-height"),10):Kn;Ct=Pt.attr("data-scaleUp")==="true";Yr()}function Yr(){hn=nn+_+H+n;pn=an+At;pr("true")}function Zr(){clearTimeout(Qt);Jacked.stopTween(en[0]);qt.off(".jackbox");if(un){Jacked.stopTween(un[0]);un.remove();un=null}if(Mn){Mn.remove();Mn=null}if(U){Jacked.stopTween(U[0],true);U.hide()}if(w){Jacked.stopTween(w[0],true);w.hide()}if(!Bt)return;Bt.removeClass("jb-info-inactive");Jacked.stopTween(z[0]);z.empty().hide()}function ei(t){t.stopPropagation();An?e.address.value(""):ni()}function ti(){Jacked.stopTween(_n[0]);_n.off(".jackbox").hide();var e;while(Yt.length){e=Yt[0];Jacked.stopTween(e[0]);e.remove();Yt.shift()}Z.off(".jackbox").hide();R.off(".jackbox").hide();if(Lt)I.cjSwipe("unbindSwipe");Jacked.stopTween(F[0]);F.empty().css("margin-left",0);if(lt){lt.off(".jackbox");if(lt){X.hide();V.show()}}Nn=Yt=null}function ni(){clearTimeout(sn);Zr();_t.unbind(".jackbox");if(xt){if(Nt)Nt.off(".jackbox");if(St)St.off(".jackbox");if(vt&&I)I.off(".jackbox");Jacked.stopTween($[0],true);Jacked.stopTween(G[0],true);var e={opacity:0,visibility:"hidden"};$.off(".jackbox").css(e);G.off(".jackbox").css(e)}else{if(pt)pt.show();if(lt)lt.show()}wt.hide().off(".jackbox");tt.removeClass("jackbox-spin-preloader");if(typeof Dt!=="undefined"){if(Dt.data("links"))Dt.data("links").off(".jackbox");Dt.empty()}if(E)J.off(".jackbox");if(ct)ct.unbind(".jackbox");if(Bt)Bt.off(".jackbox");if(Nn)ti();vn.each(Mr);Jacked.fadeOut(_t[0],{duration:1e3,callback:ii});en.css({marginLeft:Hn,marginTop:Cn});if(!Lt){setTimeout(ri,10)}else{Lr();jt.removeEventListener("touchmove",oi,false)}if(P)P.css("visibility","hidden");if(K)K.removeClass("jackbox-pre-ready");Pt=bn=L=Tn=kn=Dn=jn=In=ut=B=null}function ri(){if(Q!==0)En.animate({scrollTop:Q},{duration:300,queue:false})}function ii(){_t.detach()}function si(e){!e?Nr():Cr()}function oi(e){e.preventDefault()}function ui(){dt=true;Mt=e(".jb-total");Bt=e(".jackbox-info");gt=e(".jb-divider");Et=e(".jb-current");ct=e(".jackbox-close");Ot=e(".jackbox-title-text");Dt=e(".jackbox-title-txt");pt=e(".jackbox-controls");Nt=e(".jackbox-arrow-left");On=e(".jackbox-social");St=e(".jackbox-arrow-right");lt=e(".jackbox-button-thumbs");X=e(".jackbox-show-thumbs");V=e(".jackbox-hide-thumbs");if(!Dt.length)Dt=null;if(!Ot.length)Ot=null;if(!Nt.length)Nt=null;if(!gt.length)gt=null;if(!St.length)St=null;if(!pt.length)pt=null;if(!ct.length)ct=null;if(!On.length)On=null;if(!Et.length||!Mt.length)Et=null;if(E){e(".jackbox-ns").hide();if(!J.length)J=E=null}else if(J){J.hide()}if(Sn){if(lt.length&&X.length&&V.length){X.hide()}else{lt=X=V=null}}else{lt.hide();lt=X=V=null}if(Bt.length){P=e("
").addClass("jackbox-info-text").appendTo(et).css("visibility","hidden");z=e("
").addClass("jackbox-description-text").appendTo(P)}else{Bt=null}if(!vt)return;at=e("").addClass("jackbox-thumb-tip").css("bottom",zn);T=e("").addClass("jackbox-thumb-tip-text").text("render me").appendTo(at);at.appendTo(_t);O=(parseInt(at.css("padding-left"),10)<<1)-(r<<1)}function ai(t,n){if(bn||n.toLowerCase()!=="success"||!t)return;var r=t.length,i=document.URL;i=i.substring(0,i.lastIndexOf("/"));while(r--){e("").attr("src",u+"/"+t[r].split("../").join(""))}}function fi(t,n){e.getJSON("http://vimeo.com/api/v2/video/"+n.split("http://vimeo.com/")[1]+".json?callback=?",{format:"json"},function(e){t.attr("data-thumbnail",e[0].thumbnail_small)})}function li(){var t=e(this),n=t.next("img"),r,i=n.attr("src");if(!n.length)return;r=e("").attr({width:n.attr("width"),height:n.attr("height")}).data("parent",t).one("load.jackbox",ci).insertAfter(n);n.remove();r.attr("src",i)}function ci(){var t=e(this),n=t.data("parent"),r=parseInt(n.css("width"),10)||n.width(),i=parseInt(n.css("height"),10)||n.height(),s=e("").addClass("jackbox-canvas-blur").attr({width:r,height:i}).insertBefore(n),o=Date.now(),u=o+1,a=o+2;t.attr("id",u);s.attr("id",a);StackBlurImage(u,a,29)}function hi(){var t=e(this);t.parent().data({tip:t,tipWidth:t.width()-27,tipHeight:t.height()+17}).on("mouseenter.jackbox",pi).on("mouseleave.jackbox",di)}function pi(){var t=e(this),n=t.offset(),r=t.data();r.tipX=n.left,r.tipY=n.top,r.tip.css({opacity:1,visibility:"visible"});t.on("mousemove.jackbox",dr)}function di(){var t=e(this).off("mousemove.jackbox");if(!$t){t.data("tip").css({opacity:0,visibility:"hidden"})}else{t.data("tip").css("opacity",0)}}function vi(e){return e==="jpg"||e==="png"||e==="jpeg"||e==="gif"}function mi(e,t){if(e.search("youtube.com")!==-1){return"youtube"}else if(e.search("vimeo.com")!==-1){return"vimeo"}else if(t==="mp4"){return"local"}else{return false}}function gi(e){e.stopImmediatePropagation()}function yi(t){if(!e(t.target).is("a")){t.stopPropagation();t.preventDefault()}}var t={useThumbs:true,deepLinking:true,autoPlayVideo:false,flashVideoFirst:false,defaultVideoWidth:960,defaultVideoHeight:540,thumbnailWidth:75,thumbnailHeight:50,useThumbTooltips:true,preloadGraphics:true,showInfoByDefault:false,thumbsStartHidden:false,fullscreenScalesContent:true,defaultShareImage:"jackbox/img/default_share.jpg"},n=10,r=2,i=160,s=200,o=21,u="jackbox",a="../img/graphics/",f=u+"/php/graphics.php",l="jackbox/modules/jackbox_swf.html",c="jackbox/img/thumbs/default.jpg",h="jackbox/modules/jackbox_video.html",p="jackbox/modules/jackbox_audio.html",d="jackbox/modules/jackbox_social.php",v="http://player.vimeo.com/video{url}?title=0&byline=0&portrait=0&autoplay={autoplay}&color=FFFFFF&wmode=transparent",m="http://www.youtube.com/embed/{url}?autoplay={autoplay}&autohide=1&hd=1&iv_load_policy=3&showinfo=0&showsearch=0&wmode=transparent",g='
'+'
'+'
'+''+''+"
"+"
",y='
'+'
'+''+''+"
"+'
'+'/'+''+"
"+'
'+''+''+"
"+"
",b,w,E,S,x,T,N,C,k,L,A,O,M,_,D,P,H,B,j,F,I,q,R,U,z,W,X,V,$,J,K,Q,G,Y,Z,et,tt,nt,rt,it,st,ot,ut,at,ft,lt,ct,ht,pt,dt,vt,mt,gt,yt,bt,wt,Et,St,xt,Tt,Nt,Ct,kt,Lt,At,Ot,Mt,_t,Dt,Pt,Ht,Bt,jt,Ft,It,qt,Rt,Ut,zt,Wt,Xt,Vt,$t,Jt,Kt,Qt,Gt,Yt,Zt,en,tn,nn,rn,sn,on,un,an,fn,ln,cn,hn,pn,dn,vn,mn,gn,yn,bn,wn,En,Sn,xn,Tn,Nn,Cn,kn,Ln,An,On,Mn,_n,Dn,Pn,Hn,Bn,jn,Fn,In,qn,Rn,Un,zn,Wn,Xn,Vn,$n,Jn,Kn,Qn=1,Gn=-1,Yn=0,Zn=true,er=true,tr={init:function(n,i){if(!Bn){if(typeof Jacked==="undefined")return;if(i)e.extend(t,i);Sn=t.useThumbs;An=t.deepLinking;vt=t.useThumbTooltips;qn=t.autoPlayVideo;Rn=t.thumbnailWidth;on=t.fullscreenScalesContent;zn=t.thumbnailHeight;Wn=t.flashVideoFirst;Vn=t.showInfoByDefault;$n=t.thumbsStartHidden;Xn=t.defaultShareImage;Jn=t.defaultVideoWidth;Kn=t.defaultVideoHeight;jt=document;Bn=true;gn=Rn+r;rn=jt.URL.search("file:///")!==-1;Jacked.setEngines({ios:true,safari:true,opera:true,firefox:true});if(t.preloadGraphics&&!rn){e.getJSON(f+"?path="+a,ai)}tn=n;t=null;$t=Jacked.getIE();Lt=Jacked.getMobile();mn=Jacked.getBrowser();Ut=mn==="ie";if(typeof e.address!=="undefined"&&An){if(!Ut){e.address.init(vr)}else{vr();e.address.update()}}else{An=false;vr()}if(typeof StackBlurImage!=="undefined"&&!rn&&!$t){e(".jackbox-hover-blur").each(li)}e(".jackbox-tooltip").each(hi)}},frameReady:function(){if(bn)rr()},newItem:function(e,t){var n=zt.length,r=-1,i,s,o,u;if(t&&typeof t==="object"){var a,f,l;for(a in t){if(a!=="trigger"){f="data-"+a;l=t[a];e.attr(f,l);if(a==="group")o=l}}}else{t=null}if(!o)o=e.attr("data-group");if(!o)return;u=o.split(" ").join("").toLowerCase();while(n--){if(zt[n]===u){r=n;break}}if(r>-1){s=Vt[r];if(s.indexOf(e)!==-1){e.trigger("click");i=true}if(i)return;n=s.length;s[n]=e}else{r=zt.length;n=Vt.length;zt[r]=u;Yn++;Vt[n]=[e];n=0}yr(e);e.data({id:n,cat:r});if(t&&t.trigger)e.trigger("click")}},nr=function(){var t={type:"text/html",frameborder:0,mozallowfullscreen:"mozallowfullscreen",webkitallowfullscreen:"webkitallowfullscreen",allowfullscreen:"allowfullscreen"};return function(n,r,i){t.width=It;t.height=Wt;t.scrolling=!i?"no":"auto";un=e("