(function(a){a.fn.extend({plebBox:function(n){if(typeof(swfobject)==="undefined"){console.error("SWFObject not found");return}a(window).resize(function(){d();g()});a(document).scroll(function(){g()});var f={overlayOpacity:0.8,overlayAnimate:true,overlaySpeed:500,overlayId:"plebBox-overlay",containerId:"plebBox-container",containerAnimate:true,containerSpeed:500,flashId:"plebBox-flash",closeId:"plebBox-close",globalFlashParams:{},globalFlashVars:{}};n=a.extend(f,n);var k=a("<div/>").hide().attr("id",n.overlayId).css({position:"absolute",top:0,left:0,zIndex:10000}).click(function(){b()}).appendTo("body"),m=a("<div/>").hide().attr("id",n.containerId).css({position:"absolute",top:0,left:0,zIndex:10001}).appendTo("body"),e={visible:false},h;l();a("<a/>").attr({id:n.closeId,href:"#"}).css({position:"absolute",zIndex:10002}).click(function(){b();return false}).appendTo(m);return this.each(function(){var o=a(this);o.click(function(){var p=o.attr("rel").split("|");if(swfobject.hasFlashPlayerVersion(p[2])===false){alert("Please update your flash player version to at least version "+p[2])}e={width:parseInt(p[0]),height:parseInt(p[1]),path:o.attr("href"),version:p[2]};g();d();if(n.overlayAnimate===true){k.fadeTo(n.overlaySpeed,n.overlayOpacity,function(){i()})}else{k.show();i()}return false})});function i(){if(n.containerAnimate===true){m.fadeIn(n.containerSpeed,function(){j()})}else{m.show();j()}}function c(){if(n.overlayAnimate===true){k.fadeOut(n.overlaySpeed,function(){l()})}else{k.hide();l()}}function j(){swfobject.embedSWF(e.path,n.flashId,e.width,e.height,e.version,null,n.globalFlashVars,n.globalFlashParams)}function l(){m.find("#"+n.flashId).remove().end().append(a("<div/>").attr("id",n.flashId).css("float","left"))}function g(){var o=a(window);m.css({left:(o.width()/2)-(e.width/2),top:((o.height()/2)-(e.height/2))+o.scrollTop(),width:e.width,height:e.height})}function d(){var o=a(document);k.css({height:0,width:0});k.css({height:o.height(),width:o.width()})}function b(){if(n.containerAnimate===true){m.fadeOut(n.containerSpeed,function(){c()})}else{m.hide();c()}}}})})(jQuery);$(function(){$("a.previewImage,a.previewButton").plebBox({globalFlashVars:{menu:false,skin:"/swf/player_skin.swf",autostart:true},globalFlashParams:{allowfullscreen:true,menu:false,wmode:"transparent"}})});