(function(A){A.fn.extend({flowembed:function(E,C,D){return this.each(function(){new B(A(this),E,C,D)})}});function B(D,H,E,C){var G={oneInstance:true,activeClass:"playing",overlayClass:"playButton",fallback:null};A.extend(G,C);var F=null;E=E||{};if(typeof H=="string"){H={src:H}}D.click(function(J){J.preventDefault();if(D.find("embed, object").length){return false}if(G.oneInstance){onClipDone()}D.addClass(G.activeClass).data("html",D.html());var I=D.attr("href");E.videoFile=I;if(G.fallback&&!flashembed.isSupported([9,115])){E.videoFile=I.substring(0,I.lastIndexOf(".")+1)+G.fallback}F=flashembed(this,H,{config:E})});D.append(A("<div/>").addClass(G.overlayClass));if(G.oneInstance&&!A.isFunction("onClipDone")){window.onClipDone=function(){A("."+G.activeClass).each(function(){A(this).html(A(this).data("html")).removeClass(G.activeClass)})}}}})(jQuery);
