/*
 * @name           SWFObject2.2 - Modified by Trapeze
 *
 * @description    A SWFObject wrapper
 *
 * @author         Adrian Borrmann
 *
 * @requires       Trapeze jQuery Distribution - based on jQuery 1.3.2
 *
 */
 var swfobject=function(){function m(){if(!w){try{var a=i.getElementsByTagName("body")[0].appendChild(s("span"));a.parentNode.removeChild(a)}catch(b){return}w=true;a=E.length;for(var c=0;c<a;c++)E[c]()}}function A(a){if(w)a();else E[E.length]=a}function B(a){if(typeof n.addEventListener!=j)n.addEventListener("load",a,false);else if(typeof i.addEventListener!=j)i.addEventListener("load",a,false);else if(typeof n.attachEvent!=j)ca(n,"onload",a);else if(typeof n.onload=="function"){var b=n.onload;n.onload=
function(){b();a()}}else n.onload=a}function y(){V?da():N()}function da(){var a=i.getElementsByTagName("body")[0],b=s(p);b.setAttribute("type",F);var c=a.appendChild(b);if(c){var d=0;(function(){if(typeof c.GetVariable!=j){var e;try{e=c.GetVariable("$version")}catch(g){try{console.log("Error detecting Flash version: "+g)}catch(h){}e="ERROR 8,0,0,0"}if(e){e=e.split(" ")[1].split(",");f.pv=[parseInt(e[0],10),parseInt(e[1],10),parseInt(e[2],10)]}}else if(d<10){d++;setTimeout(arguments.callee,10);return}a.removeChild(b);
c=null;N()})()}else N()}function N(){var a=t.length;if(a>0)for(var b=0;b<a;b++){var c=t[b].id,d=t[b].callbackFn,e={success:false,id:c};if(f.pv[0]>0){var g=o(c);if(g)if(G(t[b].swfVersion)&&!(f.wk&&f.wk<312)){x(c,true);if(d){e.success=true;e.ref=O(c);d(e)}}else if(t[b].expressInstall&&P()){e={};e.data=t[b].expressInstall;e.width=g.getAttribute("width")||"0";e.height=g.getAttribute("height")||"0";if(g.getAttribute("class"))e.styleclass=g.getAttribute("class");if(g.getAttribute("align"))e.align=g.getAttribute("align");
var h={};g=g.getElementsByTagName("param");for(var k=g.length,l=0;l<k;l++)if(g[l].getAttribute("name").toLowerCase()!="movie")h[g[l].getAttribute("name")]=g[l].getAttribute("value");Q(e,h,c,d)}else{ea(g);d&&d(e)}}else{x(c,true);if(d){if((c=O(c))&&typeof c.SetVariable!=j){e.success=true;e.ref=c}d(e)}}}}function O(a){var b=null;if((a=o(a))&&a.nodeName=="OBJECT")if(typeof a.SetVariable!=j)b=a;else if(a=a.getElementsByTagName(p)[0])b=a;return b}function P(){return!H&&G("6.0.65")&&(f.win||f.mac)&&!(f.wk&&
f.wk<312)}function Q(a,b,c,d){H=true;R=d||null;W={success:false,id:c};var e=o(c);if(e){if(e.nodeName=="OBJECT"){C=S(e);I=null}else{C=e;I=c}a.id=X;if(typeof a.width==j||!/%$/.test(a.width)&&parseInt(a.width,10)<310)a.width="310";if(typeof a.height==j||!/%$/.test(a.height)&&parseInt(a.height,10)<137)a.height="137";i.title=i.title.slice(0,47)+" - Flash Player Installation";d=f.ie&&f.win?"ActiveX":"PlugIn";d="MMredirectURL="+n.location.toString().replace(/&/g,"%26")+"&MMplayerType="+d+"&MMdoctitle="+
i.title;if(typeof b.flashvars!=j)b.flashvars+="&"+d;else b.flashvars=d;if(f.ie&&f.win&&e.readyState!=4){d=s("div");c+="SWFObjectNew";d.setAttribute("id",c);e.parentNode.insertBefore(d,e);e.style.display="none";(function(){e.readyState==4?e.parentNode.removeChild(e):setTimeout(arguments.callee,10)})()}T(a,b,c)}}function ea(a){if(f.ie&&f.win&&a.readyState!=4){var b=s("div");a.parentNode.insertBefore(b,a);b.parentNode.replaceChild(S(a),b);a.style.display="none";(function(){a.readyState==4?a.parentNode.removeChild(a):
setTimeout(arguments.callee,10)})()}else a.parentNode.replaceChild(S(a),a)}function S(a){var b=s("div");if(f.win&&f.ie)b.innerHTML=a.innerHTML;else if(a=a.getElementsByTagName(p)[0])if(a=a.childNodes)for(var c=a.length,d=0;d<c;d++)!(a[d].nodeType==1&&a[d].nodeName=="PARAM")&&a[d].nodeType!=8&&b.appendChild(a[d].cloneNode(true));return b}function T(a,b,c){var d,e=o(c);if(f.wk&&f.wk<312)return d;if(e){if(typeof a.id==j)a.id=c;if(f.ie&&f.win){var g="";for(var h in a)if(a[h]!=Object.prototype[h])if(h.toLowerCase()==
"data")b.movie=a[h];else if(h.toLowerCase()=="styleclass")g+=' class="'+a[h]+'"';else if(h.toLowerCase()!="classid")g+=" "+h+'="'+a[h]+'"';h="";for(var k in b)if(b[k]!=Object.prototype[k])h+='<param name="'+k+'" value="'+b[k]+'" />';e.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+g+">"+h+"</object>";J[J.length]=a.id;d=o(a.id)}else{k=s(p);k.setAttribute("type",F);for(g in a)if(a[g]!=Object.prototype[g])if(g.toLowerCase()=="styleclass")k.setAttribute("class",a[g]);else g.toLowerCase()!=
"classid"&&k.setAttribute(g,a[g]);for(var l in b)b[l]!=Object.prototype[l]&&l.toLowerCase()!="movie"&&fa(k,l,b[l]);e.parentNode.replaceChild(k,e);d=k}}return d}function fa(a,b,c){var d=s("param");d.setAttribute("name",b);d.setAttribute("value",c);a.appendChild(d)}function Y(a){var b=o(a);if(b&&b.nodeName=="OBJECT")if(f.ie&&f.win){b.style.display="none";(function(){b.readyState==4?ga(a):setTimeout(arguments.callee,10)})()}else b.parentNode.removeChild(b)}function ga(a){if(a=o(a)){for(var b in a)if(typeof a[b]==
"function")a[b]=null;a.parentNode.removeChild(a)}}function o(a){var b=null;try{b=i.getElementById(a)}catch(c){}return b}function s(a){return i.createElement(a)}function ca(a,b,c){a.attachEvent(b,c);z[z.length]=[a,b,c]}function G(a){var b=f.pv;a=a.split(".");a[0]=parseInt(a[0],10);a[1]=parseInt(a[1],10)||0;a[2]=parseInt(a[2],10)||0;return b[0]>a[0]||b[0]==a[0]&&b[1]>a[1]||b[0]==a[0]&&b[1]==a[1]&&b[2]>=a[2]?true:false}function Z(a,b,c,d){if(!(f.ie&&f.mac)){var e=i.getElementsByTagName("head")[0];if(e){c=
c&&typeof c=="string"?c:"screen";if(d)U=q=null;if(!q||U!=c){d=s("style");d.setAttribute("type","text/css");d.setAttribute("media",c);q=e.appendChild(d);if(f.ie&&f.win&&typeof i.styleSheets!=j&&i.styleSheets.length>0)q=i.styleSheets[i.styleSheets.length-1];U=c}if(f.ie&&f.win)q&&typeof q.addRule==p&&q.addRule(a,b);else q&&typeof i.createTextNode!=j&&q.appendChild(i.createTextNode(a+" {"+b+"}"))}}}function x(a,b){if(aa){b=b?"visible":"hidden";if(w&&o(a))o(a).style.visibility=b;else Z("#"+a,"visibility:"+
b)}}function ba(a){return/[\\\"<>\.;]/.exec(a)!=null&&typeof encodeURIComponent!=j?encodeURIComponent(a):a}var j="undefined",p="object",F="application/x-shockwave-flash",X="SWFObjectExprInst",n=window,i=document,u=navigator,V=false,E=[y],t=[],J=[],z=[],C,I,R,W,w=false,H=false,q,U,aa=true,f=function(){var a=typeof i.getElementById!=j&&typeof i.getElementsByTagName!=j&&typeof i.createElement!=j,b=u.userAgent.toLowerCase(),c=u.platform.toLowerCase(),d=c?/win/.test(c):/win/.test(b);c=c?/mac/.test(c):
/mac/.test(b);b=/webkit/.test(b)?parseFloat(b.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false;var e=!+"\u000b1",g=[0,0,0],h=null;if(typeof u.plugins!=j&&typeof u.plugins["Shockwave Flash"]==p){if((h=u.plugins["Shockwave Flash"].description)&&!(typeof u.mimeTypes!=j&&u.mimeTypes[F]&&!u.mimeTypes[F].enabledPlugin)){V=true;e=false;h=h.replace(/^.*\s+(\S+\s+\S+$)/,"$1");g[0]=parseInt(h.replace(/^(.*)\..*$/,"$1"),10);g[1]=parseInt(h.replace(/^.*\.(.*)\s.*$/,"$1"),10);g[2]=/[a-zA-Z]/.test(h)?parseInt(h.replace(/^.*[a-zA-Z]+(.*)$/,
"$1"),10):0}}else if(typeof n.ActiveXObject!=j)try{var k=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");if(k)if(h=k.GetVariable("$version")){e=true;h=h.split(" ")[1].split(",");g=[parseInt(h[0],10),parseInt(h[1],10),parseInt(h[2],10)]}}catch(l){}return{w3:a,pv:g,wk:b,ie:e,win:d,mac:c}}();(function(){if(f.w3){if(typeof i.readyState!=j&&i.readyState=="complete"||typeof i.readyState==j&&(i.getElementsByTagName("body")[0]||i.body))m();if(!w){typeof i.addEventListener!=j&&i.addEventListener("DOMContentLoaded",
m,false);if(f.ie&&f.win){i.attachEvent("onreadystatechange",function(){if(i.readyState=="complete"){i.detachEvent("onreadystatechange",arguments.callee);m()}});n==top&&function(){if(!w){try{i.documentElement.doScroll("left")}catch(a){setTimeout(arguments.callee,0);return}m()}}()}f.wk&&function(){w||(/loaded|complete/.test(i.readyState)?m():setTimeout(arguments.callee,0))}();B(m)}}})();(function(){f.ie&&f.win&&window.attachEvent("onunload",function(){for(var a=z.length,b=0;b<a;b++)z[b][0].detachEvent(z[b][1],
z[b][2]);a=J.length;for(b=0;b<a;b++)Y(J[b]);for(var c in f)f[c]=null;f=null;for(var d in swfobject)swfobject[d]=null;swfobject=null})})();return{registerObject:function(a,b,c,d){if(f.w3&&a&&b){var e={};e.id=a;e.swfVersion=b;e.expressInstall=c;e.callbackFn=d;t[t.length]=e;x(a,false)}else d&&d({success:false,id:a})},getObjectById:function(a){if(f.w3)return O(a)},embedSWF:function(a,b,c,d,e,g,h,k,l,D){var K={success:false,id:b};if(f.w3&&!(f.wk&&f.wk<312)&&a&&b&&c&&d&&e){x(b,false);A(function(){c+="";
d+="";var v={};if(l&&typeof l===p)for(var r in l)v[r]=l[r];v.data=a;v.width=c;v.height=d;r={};if(k&&typeof k===p)for(var L in k)r[L]=k[L];if(h&&typeof h===p)for(var M in h)if(typeof r.flashvars!=j)r.flashvars+="&"+M+"="+h[M];else r.flashvars=M+"="+h[M];if(G(e)){L=T(v,r,b);v.id==b&&x(b,true);K.success=true;K.ref=L}else if(g&&P()){v.data=g;Q(v,r,b,D);return}else x(b,true);D&&D(K)})}else D&&D(K)},switchOffAutoHideShow:function(){aa=false},ua:f,getFlashPlayerVersion:function(){return{major:f.pv[0],minor:f.pv[1],
release:f.pv[2]}},hasFlashPlayerVersion:G,createSWF:function(a,b,c){if(f.w3)return T(a,b,c)},showExpressInstall:function(a,b,c,d){f.w3&&P()&&Q(a,b,c,d)},removeSWF:function(a){f.w3&&Y(a)},createCSS:function(a,b,c,d){f.w3&&Z(a,b,c,d)},addDomLoadEvent:A,addLoadEvent:B,getQueryParamValue:function(a){var b=i.location.search||i.location.hash;if(b){if(/\?/.test(b))b=b.split("?")[1];if(a==null)return ba(b);b=b.split("&");for(var c=0;c<b.length;c++)if(b[c].substring(0,b[c].indexOf("="))==a)return ba(b[c].substring(b[c].indexOf("=")+
1))}return""},expressInstallCallback:function(){if(H){var a=o(X);if(a&&C){a.parentNode.replaceChild(C,a);if(I){x(I,true);if(f.ie&&f.win)C.style.display="block"}R&&R(W)}H=false}}}}();$.namespace("trapeze.SWFObject");
trapeze.SWFObject=$.Class.extend({selector:null,swf:null,altContent:null,width:null,height:null,options:null,onSWFObjectComplete:function(m){m.success||$(this.options.selector).load(this.options.altContent);this.options.onSWFObjectComplete&&this.options.onSWFObjectComplete(m)},init:function(m,A,B,y){if(m.indexOf("#")==-1)throw new Error('trapeze.SWFObject Selector must start with "#"');this.selector=m;this.swf=A;this.altContent=B;this.options=y;this.width=$(m).width();this.height=$(m).height();if(this.width==
0)throw new Error("trapeze.SWFObject Selector has no width defined.");if(this.height==0)throw new Error("trapeze.SWFObject Selector has no height defined.");if(!this.options.expressInstall)this.options.expressInstall=trapeze.media_path?trapeze.media_path+"flash/express-install.swf":"express-install.swf";if(!this.options.version)this.options.version="9.0.115";if(!this.options.params)this.options.params={};if(!this.options.flashvars)this.options.flashvars={};if(!this.options.attributes)this.options.attributes=
{};if(!this.options.params.allowscriptaccess)this.options.params.allowscriptaccess="always";if(!this.options.params.menu)this.options.params.menu="false";if(!this.options.params.wmode)this.options.params.wmode="transparent";if(!this.options.flashvars.debug)this.options.flashvars.debug=trapeze.debug?"3":"1";y.swf=A;y.selector=m;y.altContent=B;swfobject.embedSWF(this.swf,this.selector.substring(1),this.width,this.height,this.options.version,this.options.expressInstall,this.options.flashvars,this.options.params,
this.options.attributes,this.onSWFObjectComplete)}});

