-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathjquery.swfobject.1-0-7.js
1 lines (1 loc) · 2.24 KB
/
jquery.swfobject.1-0-7.js
1
(function(E,B){var C=function(G){var F,H=[];for(F in G){H.push(F+'="'+G[F]+'"')}return H.join("")},D=function(H){var F,J,I=[],G;for(F in H){if(typeof H[F]=="object"){G=[];for(J in H[F]){G.push([J,"=",encodeURIComponent(H[F][J])].join(""))}H[F]=G.join("&")}I.push(['<param name="',F,'" value="',H[F],'" />'].join(""))}return I.join("")},A=false;E[B]=(function(){var F="0,0,0",G=navigator.plugins["Shockwave Flash"]||ActiveXObject;F=G.description||(function(){try{return(new G("ShockwaveFlash.ShockwaveFlash")).GetVariable("$version")}catch(H){}}());F=F.match(/^[A-Za-z\s]*?(\d+)[\.|,](\d+)(?:\s+r|,)(\d+)/);return{available:F[1]>0,activeX:!G.name,version:{major:F[1]*1,minor:F[2]*1,release:F[3]*1},hasVersion:function(I){var L=this.version,J="major",K="minor",H="release";I=(/string|number/.test(typeof I))?I.toString().split("."):I||[0,0,0];I=[I[J]||I[0]||L[J],I[K]||I[1]||L[K],I[H]||I[2]||L[H]];return(I[0]<L[J])||(I[0]==L[J]&&I[1]<L[K])||(I[0]==L[J]&&I[1]==L[K]&&I[2]<=L[H])},expressInstall:"expressInstall.swf",create:function(H){if(!E[B].available||A||!typeof H=="object"||!H.swf){return false}if(H.hasVersion&&!E[B].hasVersion(H.hasVersion)){H={swf:H.expressInstall||E[B].expressInstall,attrs:{id:"SWFObjectExprInst",height:Math.max(H.height||137),width:Math.max(H.width||214)},params:{flashvars:{MMredirectURL:location.href,MMplayerType:(E[B].activeX)?"ActiveX":"PlugIn",MMdoctitle:document.title.slice(0,47)+" - Flash Player Installation"}}};A=true}else{H=E.extend(true,{attrs:{height:H.height||180,width:H.width||320},params:{wmode:H.wmode||"opaque",flashvars:H.flashvars}},H)}return"<object "+(C(H.attrs))+(E[B].activeX?' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"><param name="movie" value="'+H.swf+'" />':' type="application/x-shockwave-flash" data="'+H.swf+'">')+(D(H.params))+"</object>"}}}());E.fn[B]=function(F){if(typeof F=="object"){this.each(function(){var G=document.createElement(B);G.innerHTML=E[B].create(F);if(G.childNodes[0]){this.appendChild(G.childNodes[0])}})}else{if(typeof F=="function"){this.find("object").andSelf().filter("object").each(function(){var H=this,G="jsInteractionTimeoutMs";H[G]=H[G]||0;if(H[G]<660){if(H.clientWidth||H.clientHeight){F.call(this)}else{setTimeout(function(){E(H)[B](F)},H[G]+66)}}})}}return this}}(jQuery,"flash"));