/**
 * tools.flashembed 1.0.3 - The future of Flash embedding.
 * 
 * Copyright (c) 2009 Tero Piirainen
 * http://flowplayer.org/tools/flash-embed.html
 *
 * Dual licensed under MIT and GPL 2+ licenses
 * http://www.opensource.org/licenses
 *
 * Launch  : March 2008
 * Date: 2009-06-03 07:16:50 +0000 (Wed, 03 Jun 2009)
 * Revision: 1870 
 */
(function(){var G=typeof jQuery=="function";function F(){if(C.done)return false;var $=document;if($&&$.getElementsByTagName&&$.getElementById&&$.body){clearInterval(C.timer);C.timer=null;for(var _=0;_<C.ready.length;_++)C.ready[_].call();C.ready=null;C.done=true}}var C=G?jQuery:function($){if(C.done)return $();if(C.timer)C.ready.push($);else{C.ready=[$];C.timer=setInterval(F,13)}};function A($,_){if(_)for(key in _)if(_.hasOwnProperty(key))$[key]=_[key];return $}function E(A){switch(D(A)){case"string":A=A.replace(new RegExp("([\"\\\\])","g"),"\\$1");A=A.replace(/^\s?(\d+)%/,"$1pct");return"\""+A+"\"";case"array":return"["+B(A,function($){return E($)}).join(",")+"]";case"function":return"\"function()\"";case"object":var $=[];for(var _ in A)if(A.hasOwnProperty(_))$.push("\""+_+"\":"+E(A[_]));return"{"+$.join(",")+"}"}return String(A).replace(/\s/g," ").replace(/\'/g,"\"")}function D($){if($===null||$===undefined)return false;var _=typeof $;return(_=="object"&&$.push)?"array":_}if(window.attachEvent)window.attachEvent("onbeforeunload",function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){}});function B($,_){var B=[];for(var A in $)if($.hasOwnProperty(A))B[A]=_($[A]);return B}function _(D,B){var _=A({},D),C=document.all,F="<object width=\""+_.width+"\" height=\""+_.height+"\"";if(C&&!_.id)_.id="_"+(""+Math.random()).substring(9);if(_.id)F+=" id=\""+_.id+"\"";if(_.w3c||!C)F+=" data=\""+_.src+"\" type=\"application/x-shockwave-flash\"";else F+=" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\"";F+=">";if(_.w3c||C)F+="<param name=\"movie\" value=\""+_.src+"\" />";_.width=_.height=_.id=_.w3c=_.src=null;for(var G in _)if(_[G]!==null)F+="<param name=\""+G+"\" value=\""+_[G]+"\" />";var $="";if(B){for(var H in B)if(B[H]!==null)$+=H+"="+(typeof B[H]=="object"?E(B[H]):B[H])+"&";$=$.substring(0,$.length-1);F+="<param name=\"flashvars\" value='"+$+"' />"}F+="</object>";return F}function $(C,B,D){var H=flashembed.getVersion();A(this,{getContainer:function(){return C},getConf:function(){return B},getVersion:function(){return H},getFlashvars:function(){return D},getApi:function(){return C.firstChild},getHTML:function(){return _(B,D)}});var G=B.version,F=B.expressInstall,E=!G||flashembed.isSupported(G);if(E){B.onFail=B.version=B.expressInstall=null;C.innerHTML=_(B,D)}else if(G&&F&&flashembed.isSupported([6,65])){A(B,{src:F});D={MMredirectURL:location.href,MMplayerType:"PlugIn",MMdoctitle:document.title};C.innerHTML=_(B,D)}else if(C.innerHTML.replace(/\s/g,"")!=="");else{C.innerHTML="<h2>Flash version "+G+" or greater is required</h2>"+"<h3>"+(H[0]>0?"Your version is "+H:"You have no flash plugin installed")+"</h3>"+(C.tagName=="A"?"<p>Click here to download latest version</p>":"<p>Download latest version from <a href='http://www.adobe.com/go/getflashplayer'>here</a></p>");if(C.tagName=="A")C.onclick=function(){location.href="http://www.adobe.com/go/getflashplayer"}}if(!E&&B.onFail){var $=B.onFail.call(this);if(typeof $=="string")C.innerHTML=$}if(document.all)window[B.id]=document.getElementById(B.id)}window.flashembed=function(D,F,E){if(typeof D=="string"){var B=document.getElementById(D);if(B)D=B;else{C(function(){flashembed(D,F,E)});return}}if(!D)return;var _={width:"100%",height:"100%",allowfullscreen:true,allowscriptaccess:"always",quality:"high",version:null,onFail:null,expressInstall:null,w3c:false};if(typeof F=="string")F={src:F};A(_,F);return new $(D,_,E)};A(window.flashembed,{getVersion:function(){var F=[0,0];if(navigator.plugins&&typeof navigator.plugins["Shockwave Flash"]=="object"){var D=navigator.plugins["Shockwave Flash"].description;if(typeof D!="undefined"){D=D.replace(/^.*\s+(\S+\s+\S+$)/,"$1");var A=parseInt(D.replace(/^(.*)\..*$/,"$1"),10),C=/r/.test(D)?parseInt(D.replace(/^.*r(.*)$/,"$1"),10):0;F=[A,C]}}else if(window.ActiveXObject){try{var B=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(_){try{B=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");F=[6,0];B.AllowScriptAccess="always"}catch($){if(F[0]==6)return F}try{B=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(E){}}if(typeof B=="object"){D=B.GetVariable("$version");if(typeof D!="undefined"){D=D.replace(/^\S+\s+(.*)$/,"$1").split(",");F=[parseInt(D[0],10),parseInt(D[2],10)]}}}return F},isSupported:function(A){var _=flashembed.getVersion(),$=(_[0]>A[0])||(_[0]==A[0]&&_[1]>=A[1]);return $},domReady:C,asString:E,getHTML:_});if(G){jQuery.tools=jQuery.tools||{version:{}};jQuery.tools.version.flashembed="1.0.3";jQuery.fn.flashembed=function(A,_){var $=null;this.each(function(){$=flashembed(this,A,_)});return A.api===false?this:$}}})()

