From 5f4287f3829e5f5a2cc33c8bad010f7977d09460 Mon Sep 17 00:00:00 2001 From: johnnychedid Date: Sun, 3 Apr 2016 12:21:59 +0300 Subject: [PATCH] adds a callback when the caption is loaded --- jquery.poptrox.js | 8 ++++++-- jquery.poptrox.min.js | 3 +-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/jquery.poptrox.js b/jquery.poptrox.js index 215a8c9..7638214 100644 --- a/jquery.poptrox.js +++ b/jquery.poptrox.js @@ -68,7 +68,8 @@ popupNavPreviousSelector: '.nav-previous', // (Advanced) Popup Nav Previous selector popupNavNextSelector: '.nav-next', // (Advanced) Popup Nav Next selector onPopupClose: null, // Called when popup closes - onPopupOpen: null // Called when popup opens + onPopupOpen: null, // Called when popup opens + onCaptionLoaded: null // Called when caption is loaded }, options); @@ -275,6 +276,9 @@ $caption.html(s); + if (settings.onCaptionLoaded) + (settings.onCaptionLoaded)($popup); + }); $closer @@ -870,4 +874,4 @@ }; -})(jQuery); \ No newline at end of file +})(jQuery); diff --git a/jquery.poptrox.min.js b/jquery.poptrox.min.js index 60f5136..148c0d2 100644 --- a/jquery.poptrox.min.js +++ b/jquery.poptrox.min.js @@ -1,2 +1 @@ -/* jquery.poptrox.js v2.5.1 | (c) n33 | n33.co | MIT licensed */ -!function(e){e.fn.poptrox_disableSelection=function(){return e(this).css("user-select","none").css("-khtml-user-select","none").css("-moz-user-select","none").css("-o-user-select","none").css("-webkit-user-select","none")},e.fn.poptrox=function(o){function t(){p=e(window).width(),s=e(window).height()+r.windowHeightPad;var o=Math.abs(x.width()-x.outerWidth()),t=Math.abs(x.height()-x.outerHeight()),i=(w.width(),w.height(),p-2*r.windowMargin-o),n=s-2*r.windowMargin-t;x.css("min-width",r.popupWidth).css("min-height",r.popupHeight),v.children().css("max-width",i).css("max-height",n)}if(0==this.length)return e(this);if(this.length>1){for(var i=0;i'),u=e(window),d=[],h=0,g=!1,f=new Array;r.usePopupLoader||(r.popupLoaderSelector=null),r.usePopupCloser||(r.popupCloserSelector=null),r.usePopupCaption||(r.popupCaptionSelector=null),r.usePopupNav||(r.popupNavPreviousSelector=null,r.popupNavNextSelector=null);var x;x=e(r.popupSelector?r.popupSelector:'
'+(r.popupLoaderSelector?'
'+r.popupLoaderText+"
":"")+'
'+(r.popupCaptionSelector?'
':"")+(r.popupCloserSelector?''+r.popupCloserText+"":"")+(r.popupNavPreviousSelector?'':"")+(r.popupNavNextSelector?'':"")+"
");var v=x.find(".pic"),w=e(),b=x.find(r.popupLoaderSelector),m=x.find(r.popupCaptionSelector),y=x.find(r.popupCloserSelector),S=x.find(r.popupNavNextSelector),C=x.find(r.popupNavPreviousSelector),P=S.add(C);if(r.usePopupDefaultStyling&&(x.css("background",r.popupBackgroundColor).css("color",r.popupTextColor).css("padding",r.popupPadding+"px"),m.length>0&&(x.css("padding-bottom",r.popupCaptionHeight+"px"),m.css("position","absolute").css("left","0").css("bottom","0").css("width","100%").css("text-align","center").css("height",r.popupCaptionHeight+"px").css("line-height",r.popupCaptionHeight+"px"),r.popupCaptionTextSize&&m.css("font-size",popupCaptionTextSize)),y.length>0&&y.html(r.popupCloserText).css("font-size",r.popupCloserTextSize).css("background",r.popupCloserBackgroundColor).css("color",r.popupCloserTextColor).css("display","block").css("width","40px").css("height","40px").css("line-height","40px").css("text-align","center").css("position","absolute").css("text-decoration","none").css("outline","0").css("top","0").css("right","-40px"),b.length>0&&b.html("").css("position","relative").css("font-size",r.popupLoaderTextSize).on("startSpinning",function(o){var t=e("
"+r.popupLoaderText+"
");t.css("height",Math.floor(r.popupHeight/2)+"px").css("overflow","hidden").css("line-height",Math.floor(r.popupHeight/2)+"px").css("text-align","center").css("margin-top",Math.floor((x.height()-t.height()+(m.length>0?m.height():0))/2)).css("color",r.popupTextColor?r.popupTextColor:"").on("xfin",function(){t.fadeTo(300,.5,function(){t.trigger("xfout")})}).on("xfout",function(){t.fadeTo(300,.05,function(){t.trigger("xfin")})}).trigger("xfin"),b.append(t)}).on("stopSpinning",function(e){var o=b.find("div");o.remove()}),2==P.length)){P.css("font-size","75px").css("text-align","center").css("color","#fff").css("text-shadow","none").css("height","100%").css("position","absolute").css("top","0").css("opacity","0.35").css("cursor","pointer").css("box-shadow","inset 0px 0px 10px 0px rgba(0,0,0,0)").poptrox_disableSelection();var k,T;r.usePopupEasyClose?(k="100px",T="100px"):(k="75%",T="25%"),S.css("right","0").css("width",k).html('
>
'),C.css("left","0").css("width",T).html('
<
')}return u.on("resize orientationchange",function(){t()}),m.on("update",function(e,o){o&&0!=o.length||(o=r.popupBlankCaptionText),m.html(o)}),y.css("cursor","pointer").on("click",function(e){return e.preventDefault(),e.stopPropagation(),x.trigger("poptrox_close"),!0}),S.on("click",function(e){e.stopPropagation(),e.preventDefault(),x.trigger("poptrox_next")}),C.on("click",function(e){e.stopPropagation(),e.preventDefault(),x.trigger("poptrox_previous")}),l.css("position","fixed").css("left",0).css("top",0).css("z-index",r.baseZIndex).css("width","100%").css("height","100%").css("text-align","center").css("cursor","pointer").appendTo(r.parent).prepend('
').append('
').hide().on("touchmove",function(e){return!1}).on("click",function(e){e.preventDefault(),e.stopPropagation(),x.trigger("poptrox_close")}),x.css("display","inline-block").css("vertical-align","middle").css("position","relative").css("z-index",1).css("cursor","auto").appendTo(l).hide().on("poptrox_next",function(){var e=h+1;e>=d.length&&(e=0),x.trigger("poptrox_switch",[e])}).on("poptrox_previous",function(){var e=h-1;0>e&&(e=d.length-1),x.trigger("poptrox_switch",[e])}).on("poptrox_reset",function(){t(),x.data("width",r.popupWidth).data("height",r.popupHeight),b.hide().trigger("stopSpinning"),m.hide(),y.hide(),P.hide(),v.hide(),w.attr("src","").detach()}).on("poptrox_open",function(e,o){return g?!0:(g=!0,r.useBodyOverflow&&a.css("overflow","hidden"),r.onPopupOpen&&r.onPopupOpen(),void l.fadeTo(r.fadeSpeed,1,function(){x.trigger("poptrox_switch",[o,!0])}))}).on("poptrox_switch",function(o,i,p){var s;if(!p&&g)return!0;if(g=!0,x.css("width",x.data("width")).css("height",x.data("height")),m.hide(),w.attr("src")&&w.attr("src",""),w.detach(),s=d[i],w=s.object,w.off("load"),v.css("text-indent","-9999px").show().append(w),"ajax"==s.type?e.get(s.src,function(e){w.html(e),w.trigger("load")}):w.attr("src",s.src),"image"!=s.type){var n,a;n=s.width,a=s.height,"%"==n.slice(-1)&&(n=parseInt(n.substring(0,n.length-1))/100*u.width()),"%"==a.slice(-1)&&(a=parseInt(a.substring(0,a.length-1))/100*u.height()),w.css("position","relative").css("outline","0").css("z-index",r.baseZIndex+100).width(n).height(a)}b.trigger("startSpinning").fadeIn(300),x.show(),r.popupIsFixed?(x.width(r.popupWidth).height(r.popupHeight),w.load(function(){w.off("load"),b.hide().trigger("stopSpinning"),m.trigger("update",[s.captionText]).fadeIn(r.fadeSpeed),y.fadeIn(r.fadeSpeed),v.css("text-indent",0).hide().fadeIn(r.fadeSpeed,function(){g=!1}),h=i,P.fadeIn(r.fadeSpeed)})):w.load(function(){t(),w.off("load"),b.hide().trigger("stopSpinning");var e=w.width(),o=w.height(),p=function(){m.trigger("update",[s.captionText]).fadeIn(r.fadeSpeed),y.fadeIn(r.fadeSpeed),v.css("text-indent",0).hide().fadeIn(r.fadeSpeed,function(){g=!1}),h=i,P.fadeIn(r.fadeSpeed),x.data("width",e).data("height",o).css("width","auto").css("height","auto")};e==x.data("width")&&o==x.data("height")?p():x.animate({width:e,height:o},r.popupSpeed,"swing",p)}),"image"!=s.type&&w.trigger("load")}).on("poptrox_close",function(){return g&&!r.usePopupForceClose?!0:(g=!0,x.hide().trigger("poptrox_reset"),r.onPopupClose&&r.onPopupClose(),void l.fadeOut(r.fadeSpeed,function(){r.useBodyOverflow&&a.css("overflow","auto"),g=!1}))}).trigger("poptrox_reset"),r.usePopupEasyClose?(m.on("click","a",function(e){e.stopPropagation()}),x.css("cursor","pointer").on("click",function(e){e.stopPropagation(),e.preventDefault(),x.trigger("poptrox_close")})):x.on("click",function(e){e.stopPropagation()}),u.keydown(function(e){if(x.is(":visible"))switch(e.keyCode){case 37:case 32:if(r.usePopupNav)return x.trigger("poptrox_previous"),!1;break;case 39:if(r.usePopupNav)return x.trigger("poptrox_next"),!1;break;case 27:return x.trigger("poptrox_close"),!1}}),n.find(r.selector).each(function(o){var t,i,p=e(this),s=p.find("img"),n=p.data("poptrox");if("ignore"!=n&&p.attr("href")){if(t={src:p.attr("href"),captionText:s.attr("title"),width:null,height:null,type:null,object:null,options:null},r.caption){if("function"==typeof r.caption)c=r.caption(p);else if("selector"in r.caption){var a;a=p.find(r.caption.selector),"attribute"in r.caption?c=a.attr(r.caption.attribute):(c=a.html(),r.caption.remove===!0&&a.remove())}}else c=s.attr("title");if(t.captionText=c,n){var l=n.split(",");0 in l&&(t.type=l[0]),1 in l&&(i=l[1].match(/([0-9%]+)x([0-9%]+)/),i&&3==i.length&&(t.width=i[1],t.height=i[2])),2 in l&&(t.options=l[2])}if(!t.type)switch(i=t.src.match(/\/\/([a-z0-9\.]+)\/.*/),(!i||i.length<2)&&(i=[!1]),i[1]){case"api.soundcloud.com":t.type="soundcloud";break;case"youtu.be":t.type="youtube";break;case"vimeo.com":t.type="vimeo";break;case"wistia.net":t.type="wistia";break;case"bcove.me":t.type="bcove";break;default:t.type="image"}switch(i=t.src.match(/\/\/[a-z0-9\.]+\/(.*)/),t.type){case"iframe":t.object=e(''),t.object.on("click",function(e){e.stopPropagation()}).css("cursor","auto"),t.width&&t.height||(t.width="600",t.height="400");break;case"ajax":t.object=e('
'),t.object.on("click",function(e){e.stopPropagation()}).css("cursor","auto").css("overflow","auto"),t.width&&t.height||(t.width="600",t.height="400");break;case"soundcloud":t.object=e(''),t.src="//w.soundcloud.com/player/?url="+escape(t.src)+(t.options?"&"+t.options:""),t.width="600",t.height="166";break;case"youtube":t.object=e(''),t.src="//www.youtube.com/embed/"+i[1]+(t.options?"?"+t.options:""),t.width&&t.height||(t.width="800",t.height="480");break;case"vimeo":t.object=e(''),t.src="//player.vimeo.com/video/"+i[1]+(t.options?"?"+t.options:""),t.width&&t.height||(t.width="800",t.height="480");break;case"wistia":t.object=e(''),t.src="//fast.wistia.net/"+i[1]+(t.options?"?"+t.options:""),t.width&&t.height||(t.width="800",t.height="480");break;case"bcove":t.object=e(''),t.src="//bcove.me/"+i[1]+(t.options?"?"+t.options:""),t.width&&t.height||(t.width="640",t.height="360");break;default:if(t.object=e(''),r.preload){var i=document.createElement("img");i.src=t.src,f.push(i)}t.width=p.attr("width"),t.height=p.attr("height")}"file:"==window.location.protocol&&t.src.match(/^\/\//)&&(t.src="http:"+t.src),d.push(t),s.attr("title",""),p.attr("href","").css("outline",0).on("click",function(e){e.preventDefault(),e.stopPropagation(),x.trigger("poptrox_open",[o])})}}),e(this)}}(jQuery); \ No newline at end of file +!function(e){e.fn.poptrox_disableSelection=function(){return e(this).css("user-select","none").css("-khtml-user-select","none").css("-moz-user-select","none").css("-o-user-select","none").css("-webkit-user-select","none")},e.fn.poptrox=function(o){function t(){p=e(window).width(),s=e(window).height()+n.windowHeightPad;var o=Math.abs(x.width()-x.outerWidth()),t=Math.abs(x.height()-x.outerHeight()),i=(w.width(),w.height(),p-2*n.windowMargin-o),r=s-2*n.windowMargin-t;x.css("min-width",n.popupWidth).css("min-height",n.popupHeight),v.children().css("max-width",i).css("max-height",r)}if(0==this.length)return e(this);if(this.length>1){for(var i=0;i'),u=e(window),d=[],h=0,g=!1,f=new Array;n.usePopupLoader||(n.popupLoaderSelector=null),n.usePopupCloser||(n.popupCloserSelector=null),n.usePopupCaption||(n.popupCaptionSelector=null),n.usePopupNav||(n.popupNavPreviousSelector=null,n.popupNavNextSelector=null);var x;x=e(n.popupSelector?n.popupSelector:'
'+(n.popupLoaderSelector?'
'+n.popupLoaderText+"
":"")+'
'+(n.popupCaptionSelector?'
':"")+(n.popupCloserSelector?''+n.popupCloserText+"":"")+(n.popupNavPreviousSelector?'':"")+(n.popupNavNextSelector?'':"")+"
");var v=x.find(".pic"),w=e(),b=x.find(n.popupLoaderSelector),m=x.find(n.popupCaptionSelector),C=x.find(n.popupCloserSelector),y=x.find(n.popupNavNextSelector),S=x.find(n.popupNavPreviousSelector),P=y.add(S);if(n.usePopupDefaultStyling&&(x.css("background",n.popupBackgroundColor).css("color",n.popupTextColor).css("padding",n.popupPadding+"px"),m.length>0&&(x.css("padding-bottom",n.popupCaptionHeight+"px"),m.css("position","absolute").css("left","0").css("bottom","0").css("width","100%").css("text-align","center").css("height",n.popupCaptionHeight+"px").css("line-height",n.popupCaptionHeight+"px"),n.popupCaptionTextSize&&m.css("font-size",popupCaptionTextSize)),C.length>0&&C.html(n.popupCloserText).css("font-size",n.popupCloserTextSize).css("background",n.popupCloserBackgroundColor).css("color",n.popupCloserTextColor).css("display","block").css("width","40px").css("height","40px").css("line-height","40px").css("text-align","center").css("position","absolute").css("text-decoration","none").css("outline","0").css("top","0").css("right","-40px"),b.length>0&&b.html("").css("position","relative").css("font-size",n.popupLoaderTextSize).on("startSpinning",function(o){var t=e("
"+n.popupLoaderText+"
");t.css("height",Math.floor(n.popupHeight/2)+"px").css("overflow","hidden").css("line-height",Math.floor(n.popupHeight/2)+"px").css("text-align","center").css("margin-top",Math.floor((x.height()-t.height()+(m.length>0?m.height():0))/2)).css("color",n.popupTextColor?n.popupTextColor:"").on("xfin",function(){t.fadeTo(300,.5,function(){t.trigger("xfout")})}).on("xfout",function(){t.fadeTo(300,.05,function(){t.trigger("xfin")})}).trigger("xfin"),b.append(t)}).on("stopSpinning",function(e){var o=b.find("div");o.remove()}),2==P.length)){P.css("font-size","75px").css("text-align","center").css("color","#fff").css("text-shadow","none").css("height","100%").css("position","absolute").css("top","0").css("opacity","0.35").css("cursor","pointer").css("box-shadow","inset 0px 0px 10px 0px rgba(0,0,0,0)").poptrox_disableSelection();var k,T;n.usePopupEasyClose?(k="100px",T="100px"):(k="75%",T="25%"),y.css("right","0").css("width",k).html('
>
'),S.css("left","0").css("width",T).html('
<
')}return u.on("resize orientationchange",function(){t()}),m.on("update",function(e,o){o&&0!=o.length||(o=n.popupBlankCaptionText),m.html(o),n.onCaptionLoaded&&n.onCaptionLoaded(x)}),C.css("cursor","pointer").on("click",function(e){return e.preventDefault(),e.stopPropagation(),x.trigger("poptrox_close"),!0}),y.on("click",function(e){e.stopPropagation(),e.preventDefault(),x.trigger("poptrox_next")}),S.on("click",function(e){e.stopPropagation(),e.preventDefault(),x.trigger("poptrox_previous")}),l.css("position","fixed").css("left",0).css("top",0).css("z-index",n.baseZIndex).css("width","100%").css("height","100%").css("text-align","center").css("cursor","pointer").appendTo(n.parent).prepend('
').append('
').hide().on("touchmove",function(e){return!1}).on("click",function(e){e.preventDefault(),e.stopPropagation(),x.trigger("poptrox_close")}),x.css("display","inline-block").css("vertical-align","middle").css("position","relative").css("z-index",1).css("cursor","auto").appendTo(l).hide().on("poptrox_next",function(){var e=h+1;e>=d.length&&(e=0),x.trigger("poptrox_switch",[e])}).on("poptrox_previous",function(){var e=h-1;0>e&&(e=d.length-1),x.trigger("poptrox_switch",[e])}).on("poptrox_reset",function(){t(),x.data("width",n.popupWidth).data("height",n.popupHeight),b.hide().trigger("stopSpinning"),m.hide(),C.hide(),P.hide(),v.hide(),w.attr("src","").detach()}).on("poptrox_open",function(e,o){return g?!0:(g=!0,n.useBodyOverflow&&a.css("overflow","hidden"),n.onPopupOpen&&n.onPopupOpen(),void l.fadeTo(n.fadeSpeed,1,function(){x.trigger("poptrox_switch",[o,!0])}))}).on("poptrox_switch",function(o,i,p){var s;if(!p&&g)return!0;if(g=!0,x.css("width",x.data("width")).css("height",x.data("height")),m.hide(),w.attr("src")&&w.attr("src",""),w.detach(),s=d[i],w=s.object,w.off("load"),v.css("text-indent","-9999px").show().append(w),"ajax"==s.type?e.get(s.src,function(e){w.html(e),w.trigger("load")}):w.attr("src",s.src),"image"!=s.type){var r,a;r=s.width,a=s.height,"%"==r.slice(-1)&&(r=parseInt(r.substring(0,r.length-1))/100*u.width()),"%"==a.slice(-1)&&(a=parseInt(a.substring(0,a.length-1))/100*u.height()),w.css("position","relative").css("outline","0").css("z-index",n.baseZIndex+100).width(r).height(a)}b.trigger("startSpinning").fadeIn(300),x.show(),n.popupIsFixed?(x.width(n.popupWidth).height(n.popupHeight),w.load(function(){w.off("load"),b.hide().trigger("stopSpinning"),m.trigger("update",[s.captionText]).fadeIn(n.fadeSpeed),C.fadeIn(n.fadeSpeed),v.css("text-indent",0).hide().fadeIn(n.fadeSpeed,function(){g=!1}),h=i,P.fadeIn(n.fadeSpeed)})):w.load(function(){t(),w.off("load"),b.hide().trigger("stopSpinning");var e=w.width(),o=w.height(),p=function(){m.trigger("update",[s.captionText]).fadeIn(n.fadeSpeed),C.fadeIn(n.fadeSpeed),v.css("text-indent",0).hide().fadeIn(n.fadeSpeed,function(){g=!1}),h=i,P.fadeIn(n.fadeSpeed),x.data("width",e).data("height",o).css("width","auto").css("height","auto")};e==x.data("width")&&o==x.data("height")?p():x.animate({width:e,height:o},n.popupSpeed,"swing",p)}),"image"!=s.type&&w.trigger("load")}).on("poptrox_close",function(){return g&&!n.usePopupForceClose?!0:(g=!0,x.hide().trigger("poptrox_reset"),n.onPopupClose&&n.onPopupClose(),void l.fadeOut(n.fadeSpeed,function(){n.useBodyOverflow&&a.css("overflow","auto"),g=!1}))}).trigger("poptrox_reset"),n.usePopupEasyClose?(m.on("click","a",function(e){e.stopPropagation()}),x.css("cursor","pointer").on("click",function(e){e.stopPropagation(),e.preventDefault(),x.trigger("poptrox_close")})):x.on("click",function(e){e.stopPropagation()}),u.keydown(function(e){if(x.is(":visible"))switch(e.keyCode){case 37:case 32:if(n.usePopupNav)return x.trigger("poptrox_previous"),!1;break;case 39:if(n.usePopupNav)return x.trigger("poptrox_next"),!1;break;case 27:return x.trigger("poptrox_close"),!1}}),r.find(n.selector).each(function(o){var t,i,p=e(this),s=p.find("img"),r=p.data("poptrox");if("ignore"!=r&&p.attr("href")){if(t={src:p.attr("href"),captionText:s.attr("title"),width:null,height:null,type:null,object:null,options:null},n.caption){if("function"==typeof n.caption)c=n.caption(p);else if("selector"in n.caption){var a;a=p.find(n.caption.selector),"attribute"in n.caption?c=a.attr(n.caption.attribute):(c=a.html(),n.caption.remove===!0&&a.remove())}}else c=s.attr("title");if(t.captionText=c,r){var l=r.split(",");0 in l&&(t.type=l[0]),1 in l&&(i=l[1].match(/([0-9%]+)x([0-9%]+)/),i&&3==i.length&&(t.width=i[1],t.height=i[2])),2 in l&&(t.options=l[2])}if(!t.type)switch(i=t.src.match(/\/\/([a-z0-9\.]+)\/.*/),(!i||i.length<2)&&(i=[!1]),i[1]){case"api.soundcloud.com":t.type="soundcloud";break;case"youtu.be":t.type="youtube";break;case"vimeo.com":t.type="vimeo";break;case"wistia.net":t.type="wistia";break;case"bcove.me":t.type="bcove";break;default:t.type="image"}switch(i=t.src.match(/\/\/[a-z0-9\.]+\/(.*)/),t.type){case"iframe":t.object=e(''),t.object.on("click",function(e){e.stopPropagation()}).css("cursor","auto"),t.width&&t.height||(t.width="600",t.height="400");break;case"ajax":t.object=e('
'),t.object.on("click",function(e){e.stopPropagation()}).css("cursor","auto").css("overflow","auto"),t.width&&t.height||(t.width="600",t.height="400");break;case"soundcloud":t.object=e(''),t.src="//w.soundcloud.com/player/?url="+escape(t.src)+(t.options?"&"+t.options:""),t.width="600",t.height="166";break;case"youtube":t.object=e(''),t.src="//www.youtube.com/embed/"+i[1]+(t.options?"?"+t.options:""),t.width&&t.height||(t.width="800",t.height="480");break;case"vimeo":t.object=e(''),t.src="//player.vimeo.com/video/"+i[1]+(t.options?"?"+t.options:""),t.width&&t.height||(t.width="800",t.height="480");break;case"wistia":t.object=e(''),t.src="//fast.wistia.net/"+i[1]+(t.options?"?"+t.options:""),t.width&&t.height||(t.width="800",t.height="480");break;case"bcove":t.object=e(''),t.src="//bcove.me/"+i[1]+(t.options?"?"+t.options:""),t.width&&t.height||(t.width="640",t.height="360");break;default:if(t.object=e(''),n.preload){var i=document.createElement("img");i.src=t.src,f.push(i)}t.width=p.attr("width"),t.height=p.attr("height")}"file:"==window.location.protocol&&t.src.match(/^\/\//)&&(t.src="http:"+t.src),d.push(t),s.attr("title",""),p.attr("href","").css("outline",0).on("click",function(e){e.preventDefault(),e.stopPropagation(),x.trigger("poptrox_open",[o])})}}),e(this)}}(jQuery);