/* * speedo.popup.min.js * * Speedo Popup v2.0.1 * * Speedo Popup is a lightweight jQuery plugin * with powerful customization settings. * * http://www.artflow.ro * http://www.agapastudio.com * * Copyright (c) 2012-2013 By Artflow & Agapa Studio.All rights reserved. */ (function(c,k){var d=function(){return new d.fn.init};d.fn=d.prototype={version:"1.0.1",constructor:d,init:function(){return this}};d.fn.init.prototype=d.fn;k.speedo=d})(jQuery,window); (function(c,k){var d=k.fn,f={},a=["opera","chrome","safari","firefox"],b;b=document.createElement("div");b.innerHTML="\x3c!--[if IE]>'+('');f+='';f+="";return c(f)}function l(a){27==(a.keyCode||a.charCode||a.which)&&h.hidePopup()}var h=this,p=0,w=0,q=0,r=0,g=null,n=null,u=null,s=null,t=null,v=!1,x=/\.(jpg|jpeg|gif|png|bmp|tiff)(.*)?$/i,y={swf:{regex:/[^\.]\.(swf)\s*$/i},youtube:{regex:/youtube\.com\/watch/i,url:"http://www.youtube.com/embed/{id}?autoplay=1&fs=1&rel=0",token:"=",iframe:1,index:1},google:{regex:/google\.com\/videoplay/i,url:"http://video.google.com/googleplayer.swf?autoplay=1&hl=en&docId={id}", token:"=",index:1},vimeo:{regex:/vimeo\.com/i,url:"http://player.vimeo.com/video/{id}?hd=1&autoplay=1&show_title=1&show_byline=1&show_portrait=0&color=&fullscreen=1",token:"/",iframe:1,index:3},metacafe:{regex:/metacafe\.com\/watch/i,url:"http://www.metacafe.com/fplayer/{id}/.swf?playerVars=autoPlay=yes",token:"/",index:4}};this.instance_name="instance_"+5233*Math.random();this.extend=new d;this.overlay=this.container=null;this.create_popup=function(){a.theme=a.theme.toLowerCase(); var e=a.theme&&"default"!=a.theme?" speedo-theme-"+a.theme:"";if(0=a.startCount)return;d++;k().utility.set_cookie("speedo-popup-start-count",d,a.interval)}c("body").addClass("speedo-popup-ready");g=c(document.createElement("div"));g.addClass("speedo-container"+e);h.container=g;a.css3Effects&&"none"!=a.css3Effects&&g.addClass("speedo-effect-"+a.css3Effects.toLowerCase());g.css({display:"none",width:a.width?a.width: "auto",height:a.height?a.height:"auto","min-width":150,"min-height":150,left:"center"==a.left?"50%":a.left,top:"center"==a.top?"50%":a.top});g.appendTo("body");a.caption&&""!=a.caption&&(d=c(document.createElement("p")),d.addClass("speedo-popup-caption"),d.html(a.caption),g.append(d));u=c(document.createElement("div"));u.addClass("speedo-popup-loading");g.append(u);s=c(document.createElement("div"));s.addClass("speedo-content-holder");s.appendTo(g);d=b(a.buttons);!1!==d&&g.append(d);d=f();h.setContent("html"!= d?a.href:a.htmlContent,d);a.close&&(n=c(document.createElement("a")),n.addClass("speedo-ui-close"),n.attr("href","javascript: void(0);"),n.click(function(g){a.onClose(g);h.hidePopup()}),n.html(a.closeCaption),g.append(n));a.overlay&&(t=c(document.createElement("div")),t.addClass("speedo-overlay"+e),t.appendTo("body"),h.overlay=t,"object"==typeof a.overlay&&c.extend({opacity:0.7,zindex:1E4},a.overlay),a.overlayClose&&t.click(function(g){a.onClose(g);h.hidePopup()}));this.modules.execute(h,a);a.onBeforeShow(g.get(0)); h.centerPopup();c(window).resize(function(){h.centerPopup()});h.showPopup();setTimeout(function(){h.centerPopup()},100)};this.init=function(){a.esc&&c(document).bind("keydown",l)};this.showPopup=function(){if(v){var c=f();h.setContent(a.href,c)}h.extend.trigger("show")&&null!=a.effectIn&&"none"!=a.effectOut||(g.show(),t&&t.show());h.centerPopup();a.onShow(g.get(0));a.autoClose&&setTimeout(function(){h.hidePopup()},a.autoClose)};this.hidePopup=function(){h.extend.trigger("hide")&&null!=a.effectOut&& "none"!=a.effectOut||(g.hide(),t&&t.hide(),h.remove_embeded_object(),a.unload&&(t&&t.remove(),g.remove()));a.onHide(g.get(0))};this.centerPopup=function(){0>=q&&(q=g.width(),r=g.height(),150 Default content

",esc:!0,overlay:{opacity:0.75, zindex:1E5},caption:null,href:null,overlayClose:!0,autoClose:!1,autoShow:!1,startCount:0,interval:30,effectIn:"none",effectOut:"none",css3Effects:!1,showOnEvent:"click",useFrame:!1,useAjax:!1,loadingImage:!1,unload:!1,draggable:!1,responsive:!0,ajaxContent:{url:"",type:"POST",data:null},groupGallery:!1,groupIndex:0,groupAutoPlay:!0,groupWait:5E3,loop:!0,buttons:null,onBeforeShow:function(){},onShow:function(){},onComplete:function(){},onHide:function(){},onClose:function(){}},d);var a=null;!this.data("unique-speedo-instance")|| d.unload?(a=k().popup(d),d.autoShow?setTimeout(function(){a.create_popup()},d.autoShow):a.create_popup(),this.data("unique-speedo-instance",a)):(a=this.data("unique-speedo-instance"),d.autoShow?setTimeout(function(){a.showPopup()},d.autoShow):(a.showPopup(),a.centerPopup()));return a};c(function(){c.speedoPopup={};c.speedoPopup.smartSkins={};c.speedoPopup.browser_ie=k().browser.is_ie;c.speedoPopup.registerSmartSkin=function(d,f){c.speedoPopup.smartSkins[d]=f};c(document).on("click tap",".speedo-popup", function(d){d.preventDefault();var f=c(this);d=f.attr("href");var a=[],b=f.attr("rel");b&&""!=b&&c('.speedo-popup[rel="'+b+'"]').each(function(b){b=c(this);b.get(0);f.get(0);a.push({url:b.attr("href"),title:b.attr("title")})});b=void 0!=c(this).data("speedoOptions")?c(this).data("speedoOptions"):k().utility.query_parameters(d);b=c.extend({htmlContent:!1,effectIn:"fade",effectOut:"fade"},b);b.useAjax&&(b.ajaxContent={url:d,type:"GET",data:null});b.href=d;c(this).speedoPopup(b);return!1})})})(jQuery, speedo);(function(c,k){var d=function(){return new d.fn.init};d.fn=d.prototype={version:"1.0.1",constructor:d,init:function(){var f={};this.register_module=function(a,b){f[a]=b};this.deregister_module=function(a){f[a]=null};this.clear=function(){f={}};this.execute=function(a,b){for(key in f){var d=f[key];c.isFunction(d)&&(d=d.apply(a,[b]),null!=d&&d.init())}return null};return this}};d.fn.init.prototype=d.fn;k.fn.modules=d()})(jQuery,speedo().popup); (function(c,k){k.fn.modules.register_module("draggable",function(d){function f(c){var d=l.position();e.bind("mousemove",{startX:c.clientX,startY:c.clientY,offset:d},a).bind("mouseup",b)}function a(a){var b=a.data.offset;l.css({left:a.clientX-a.data.startX+b.left,top:a.clientY-a.data.startY+b.top})}function b(){e.unbind("mousemove",a).unbind("mouseup",b)}var m=null,e=c(window),l=this.container;this.init=function(){d.draggable&&(m=c(document.createElement("div")),m.addClass("speedo-popup-drag-area"), m.bind("mousedown",f),l.append(m))};return this})})(jQuery,speedo().popup); (function(c,k,d){k.fn.modules.register_module("effects",function(f){function a(a,b,k,s,m){if(b&&"none"!=b&&(!d().browser.is_ie||9=d().browser.version.high&&l.get(0).style.removeAttribute("filter",!1)})};return h})})(jQuery,speedo().popup,speedo); (function(c,k,d,f){k.fn.modules.register_module("smartskin",function(a){function b(){k.SmartSkin.run_skin(a.theme,l);if(void 0!=c.speedoPopup.smartSkins[a.theme])c.speedoPopup.smartSkins[a.theme](e,d)}c(f);var d=this.container,e=this.overlay,l=this;this.init=function(){l.extend.add_action("show",b)};return l});k.SmartSkin=new function(){var a={};this.register_skin=function(b,c){a[b]=c};this.run_skin=function(b,c){if(void 0!=a[b])a[b](c.overlay,c.container)}}})(jQuery,speedo().popup,speedo,window); (function(c,k,d,f){k.fn.modules.register_module("audio",function(a){function b(){e.load_audio(a.mp3Path,a.oggPath)}function d(){e.audio_element.stop().animate({volume:0},"slow",function(){e.audio_element.remove()})}c(f);var e=this;this.audio_element=null;this.init=function(){a=c.extend(a,{autoplayAudio:!0,loop:!1,mp3Path:void 0,oggPath:void 0,volume:1,onAudioStart:function(){},onAudioStop:function(){}});if(void 0!=a.mp3Path||void 0!=a.oggPath)e.extend.add_action("show",b),e.extend.add_action("hide", d)};this.load_audio=function(b,f){var d=c(document.createElement("audio"));a.autoplayAudio&&d.attr("autoplay","autoplay");a.loop&&d.attr("loop","loop");d.get(0).volume=0;d.bind("play",function(b){a.onAudioStart(b);e.audio_element.stop().animate({volume:a.volume},2E3)});d.bind("stop pause ended",a.onAudioStop);var k=c(document.createElement("source"));k.attr("src",f).attr("type","audio/ogg");d.append(k);k=c(document.createElement("source"));k.attr("src",b).attr("type","audio/mpeg");d.append(k);c("body").append(d); e.audio_element=d};this.play_audio=function(){null!=e.audio_element&&e.audio_element.get(0).play()};this.stop_audio=function(){null!=e.audio_element&&e.audio_element.get(0).pause()};this.get_audio_element=function(){return this.audio_element};return e})})(jQuery,speedo().popup,speedo,window);