text: !function(o){o.fn.popeasy=function(i){function e(){if(i.loadExternal){var e=n.attr("data-path");n.load(e)}c=n.attr("data-video"),n.find("."+i.videoClass).attr("src",c),s.hide(),n.css({top:o(window).height()/2-n.outerHeight()/2+o(window).scrollTop(),left:o(window).width()/2-n.outerWidth()/2+o(window).scrollLeft()}),f===!1?(l.css({opacity:i.maskOpacity,backgroundColor:"#"+i.background}),s.css({opacity:i.modalOpacity}),l[i.animationEffect](i.animationSpeed),n.delay(i.animationSpeed)[i.animationEffect](i.animationSpeed)):n.show(),f=!0}function a(){s.stop(!0).animate({top:o(window).height()/2-s.outerHeight()/2+o(window).scrollTop(),left:o(window).width()/2-s.outerWidth()/2+o(window).scrollLeft()},i.moveModalSpeed)}function t(){return n.find("."+i.videoClass).attr("src",""),f=!1,s.fadeOut(100,function(){"slideDown"===i.animationEffect?l.slideUp():"fadeIn"===i.animationEffect&&l.fadeOut()}),!1}i=o.extend({trigger:".popeasy",olay:"div.overlay",modals:"div.modal",loadExternal:!1,animationEffect:"fadeIn",animationSpeed:400,moveModalSpeed:"slow",background:"000",maskOpacity:.8,modalOpacity:1,openOnLoad:!1,docClose:!0,closeByEscape:!0,moveOnScroll:!0,resizeWindow:!0,videoClass:"video",close:".closeBtn"},i);var n,d,c,l=o(i.olay),s=o(i.modals),f=!1;return"fadein"===i.animationEffect&&(i.animationEffect="fadeIn"),"slidedown"===i.animationEffect&&(i.animationEffect="slideDown"),o(".modal").each(function(){o(this).find(i.videoClass)&&(c=o(this).find("."+i.videoClass).attr("src"),o(this).attr("data-video",c))}),l.css({opacity:0}),i.openOnLoad?(n=o(".modal").first(),e()):(l.hide(),s.hide()),o(i.trigger).on("click",function(i){i.preventDefault(),o(".popeasy").length>1?(d=o(this).attr("href"),n=o(d)):n=o(".modal"),e()}),i.docClose&&l.bind("click",t),o(document).on("click",i.close,t),i.closeByEscape&&o(window).bind("keyup",function(o){27===o.which&&t()}),i.resizeWindow?(o(window).bind("resize",a),i.moveOnScroll?void o(window).bind("scroll",a):!1):!1}}(jQuery);