/*=:project
scalable Inman Flash Replacement (sIFR) version 3, revision 398
=:file
Copyright: 2006 Mark Wubben.
Author: Mark Wubben,
=:history
* IFR: Shaun Inman
* sIFR 1: Mike Davidson, Shaun Inman and Tomas Jogin
* sIFR 2: Mike Davidson, Shaun Inman, Tomas Jogin and Mark Wubben
=:license
This software is licensed and provided under the CC-GNU LGPL.
See
*/
var sIFR=new function(){var O=this;var E={ACTIVE:"sIFR-active",UNLOADING:"sIFR-unloading",REPLACED:"sIFR-replaced",IGNORE:"sIFR-ignore",ALTERNATE:"sIFR-alternate",CLASS:"sIFR-class",LAYOUT:"sIFR-layout",FLASH:"sIFR-flash",FIX_FOCUS:"sIFR-fixfocus",DUMMY:"sIFR-dummy"};E.IGNORE_CLASSES=[E.REPLACED,E.IGNORE,E.ALTERNATE];this.MIN_FONT_SIZE=6;this.MAX_FONT_SIZE=126;this.FLASH_PADDING_BOTTOM=5;this.VERSION="398";this.isActive=false;this.isEnabled=true;this.fixHover=true;this.autoInitialize=true;this.setPrefetchCookie=true;this.cookiePath="/";this.domains=[];this.forceWidth=true;this.fitExactly=false;this.forceTextTransform=true;this.useDomLoaded=true;this.useStyleCheck=false;this.hasFlashClassSet=false;this.repaintOnResize=true;this.replacements=[];var L=0;var R=false;function Y(){}function D(b){function c(d){return d.toLocaleUpperCase()}this.normalize=function(d){return d.replace(/\n|\r|\xA0/g,D.SINGLE_WHITESPACE).replace(/\s+/g,D.SINGLE_WHITESPACE)};this.textTransform=function(d,e){switch(d){case"uppercase":return e.toLocaleUpperCase();case"lowercase":return e.toLocaleLowerCase();case"capitalize":return e.replace(/^\w|\s\w/g,c)}return e};this.toHexString=function(d){if(d.charAt(0)!="#"||d.length!=4&&d.length!=7){return d}d=d.substring(1);return"0x"+(d.length==3?d.replace(/(.)(.)(.)/,"$1$1$2$2$3$3"):d)};this.toJson=function(f,e){var d="";switch(typeof (f)){case"string":d='"'+e(f)+'"';break;case"number":case"boolean":d=f.toString();break;case"object":d=[];for(var g in f){if(f[g]==Object.prototype[g]){continue}d.push('"'+g+'":'+this.toJson(f[g]))}d="{"+d.join(",")+"}";break}return d};this.convertCssArg=function(d){if(!d){return{}}if(typeof (d)=="object"){if(d.constructor==Array){d=d.join("")}else{return d}}var k={};var l=d.split("}");for(var g=0;g-1){f=f.substr(e+1);var d=g.lastIndexOf(f);if(d>-1&&(d+f.length)==g.length){return true}}return false};this.uriEncode=function(d){return encodeURI(decodeURIComponent(d))};this.delay=function(e,g,f){var d=Array.prototype.slice.call(arguments,3);setTimeout(function(){g.apply(f,d)},e)}}D.UNIT_REMOVAL_PROPERTIES={leading:true,"margin-left":true,"margin-right":true,"text-indent":true};D.SINGLE_WHITESPACE=" ";function T(d){var c=this;function b(f,h,g){var j=c.getStyleAsInt(f,h,d.ua.ie);if(j==0){j=f[g];for(var e=3;e=5.5@*/;this.ieWin=this.ie&&this.windows/*@cc_on&&@_jscript_version>=5.1@*/;this.windows=this.windows&&(!this.ie||this.ieWin);this.ieMac=this.ie&&this.macintosh/*@cc_on&&@_jscript_version<5.1@*/;this.macintosh=this.macintosh&&(!this.ie||this.ieMac);this.safari=/safari/.test(c);this.webkit=!this.konqueror&&/applewebkit/.test(c);this.khtml=this.webkit||this.konqueror;this.gecko=!this.webkit&&k=="gecko";this.ieVersion=this.ie&&/.*msie\s(\d\.\d)/.exec(c)?this.parseVersion(RegExp.$1):"0";this.operaVersion=this.opera&&/.*opera(\s|\/)(\d+\.\d+)/.exec(c)?this.parseVersion(RegExp.$2):"0";this.webkitVersion=this.webkit&&/.*applewebkit\/(\d+).*/.exec(c)?this.parseVersion(RegExp.$1):"0";this.geckoVersion=this.gecko&&/.*rv:\s*([^\)]+)\)\s+gecko/.exec(c)?this.parseVersion(RegExp.$1):"0";this.konquerorVersion=this.konqueror&&/.*konqueror\/([\d\.]+).*/.exec(c)?this.parseVersion(RegExp.$1):"0";this.flashVersion=0;if(this.ieWin){var g;var j=false;try{g=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(h){try{g=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");this.flashVersion=6;g.AllowScriptAccess="always"}catch(h){j=this.flashVersion==6}if(!j){try{g=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(h){}}}if(!j&&g){this.flashVersion=parseFloat(/([\d,?]+)/.exec(g.GetVariable("$version"))[1].replace(/,/g,"."))}}else{if(navigator.plugins&&navigator.plugins["Shockwave Flash"]){this.flashVersion=parseFloat(/(\d+\.?\d*)/.exec(navigator.plugins["Shockwave Flash"].description)[1]);var f=0;while(this.flashVersion>=H.MIN_FLASH_VERSION&&f-1){this.flashVersion=0;this.quicktime=true}f++}}}this.flash=this.flashVersion>=H.MIN_FLASH_VERSION;this.transparencySupport=this.macintosh||this.windows;this.computedStyleSupport=this.ie||!!document.defaultView.getComputedStyle;this.requiresPrefetch=this.ieWin||this.khtml;this.fixFocus=this.gecko&&this.windows;this.nativeDomLoaded=this.gecko||this.webkit&&this.webkitVersion>=this.parseVersion("525")||this.konqueror&&this.konquerorMajor>this.parseVersion("03")||this.opera;this.mustCheckStyle=this.khtml||this.opera;this.forcePageLoad=this.webkit&&this.webkitVersion=this.parseVersion("9.50"))&&(!this.webkit||this.webkitVersion>=this.parseVersion("412"))&&(!this.gecko||this.geckoVersion>=this.parseVersion("1.8.0.12"))&&(!this.konqueror)}H.MIN_FLASH_VERSION=8;function F(b){this.fix=b.ua.ieWin&&window.location.hash!="";var c;this.cache=function(){c=document.title};function d(){document.title=c}this.restore=function(){if(this.fix){setTimeout(d,0)}}}function S(e){var i=null;function f(){try{if(e.ua.ie||document.readyState!="loaded"&&document.readyState!="complete"){document.documentElement.doScroll("left")}}catch(j){return setTimeout(f,10)}b()}function b(){if(e.useStyleCheck){d()}else{if(!e.ua.mustCheckStyle){g(null,true)}}}function d(){i=e.dom.create("div",E.DUMMY);e.dom.getBody().appendChild(i);c()}function c(){if(e.dom.getComputedStyle(i,"marginLeft")=="42px"){h()}else{setTimeout(c,10)}}function h(){if(i&&i.parentNode){i.parentNode.removeChild(i)}i=null;g(null,true)}function g(j,k){e.initialize(k);if(j&&j.type=="load"){if(document.removeEventListener){document.removeEventListener("DOMContentLoaded",g,false)}if(window.removeEventListener){window.removeEventListener("load",g,false)}}}this.attach=function(){if(window.addEventListener){window.addEventListener("load",g,false)}else{window.attachEvent("onload",g)}if(!e.useDomLoaded||e.ua.forcePageLoad||e.ua.ie&&window.top!=window){return }if(e.ua.nativeDomLoaded){document.addEventListener("DOMContentLoaded",b,false)}else{if(e.ua.ie||e.ua.khtml){f()}}}}var Q="sifrFetch";function N(b){var d=false;this.fetchMovies=function(f){if(b.setPrefetchCookie&&new RegExp(";?"+Q+"=true;?").test(document.cookie)){return }try{d=true;c(f)}catch(g){if(b.debug){throw g}}if(b.setPrefetchCookie){document.cookie=Q+"=true;path="+b.cookiePath}};this.clear=function(){if(!d){return }try{var f=document.getElementsByTagName("script");for(var g=f.length-1;g>=0;g--){var h=f[g];if(h.type=="sifr/prefetch"){h.parentNode.removeChild(h)}}}catch(j){}};function c(e){for(var f=0;f<\/script>')}}}function K(c,f,e,b,d){this.sIFR=c;this.id=f;this.vars=e;this.movie=null;this.__forceWidth=b;this.__events=d;this.__resizing=0}K.prototype={getFlashElement:function(){return document.getElementById(this.id)},getAlternate:function(){return document.getElementById(this.id+"_alternate")},getAncestor:function(){var b=this.getFlashElement().parentNode;return !this.sIFR.dom.hasClass(E.FIX_FOCUS,b)?b:b.parentNode},available:function(){var b=this.getFlashElement();return b&&b.parentNode},call:function(b){if(!this.available()){return false}var c=this.getFlashElement();try{Function.prototype.apply.call(c[b],c,Array.prototype.slice.call(arguments,1))}catch(d){if(this.sIFR.debug){throw d}return false}return true},updateVars:function(b,d){for(var c=0;c';var l="";for(var k=0;k'}this.html=this.html.replace(/(<\/object>)/,l+"$1");h.innerHTML=this.html}c.prototype={reset:function(e,f){var d=e.parentNode;d.innerHTML=this.html;d.appendChild(f)},setSize:function(d,e){this.html=this.html.replace(d=="height"?/(height)="\d+"/:/(width)="\d+"/,'$1="'+e+'"')},injectVars:function(d,e){if(d!=this.html){return }this.html=this.html.replace(/(flashvars(=|\"\svalue=)\")[^\"]+/,"$1"+e)}}};this.errors=new Y(O);var A=this.util=new D(O);var W=this.dom=new T(O);var U=this.ua=new H(O);var G={fragmentIdentifier:new F(O),pageLoad:new S(O),prefetch:new N(O)};var J={kwargs:[],replaceAll:function(c){for(var b=0;b1&&AN){e+=Math.round((AF-1)*AN)}}else{k=r;AF=1}var c=W.create("span",E.ALTERNATE);var AV=AD.cloneNode(true);AD.parentNode.appendChild(AV);for(var AS=0,AR=AV.childNodes.length;AS0){g=parseInt(g)}else{var e=f.innerHTML;f.style.visibility="visible";f.style.overflow="visible";f.style.position="static";f.style.zoom="normal";f.style.writingMode="lr-tb";f.style.width=f.style.height="auto";f.style.maxWidth=f.style.maxHeight=f.style.styleFloat="none";var h=f;var b=f.currentStyle.hasLayout;if(b){f.innerHTML='X
X
X
';h=f.firstChild}else{f.innerHTML="X
X
X"}var d=h.getClientRects();g=d[1].bottom-d[1].top;g=Math.ceil(g*0.8);if(b){f.innerHTML=''+e+"
";h=f.firstChild}else{f.innerHTML=e}d=h.getClientRects();c=d.length;if(b){f.innerHTML=e}f.style.visibility=f.style.width=f.style.height=f.style.maxWidth=f.style.maxHeight=f.style.overflow=f.style.styleFloat=f.style.position=f.style.zoom=f.style.writingMode=""}}}return{fontSize:g,lines:c}}function P(b,f,r){r=r||A.uriEncode;var p=[],l=[];var j=null;var d=b.childNodes;var n=false,o=false;var h=0;while(h-1){m=m.match("(\\s|^)"+E.CLASS+"-([^\\s$]*)(\\s|$)")[2]}else{m=m.match(/^([^\s]+)/)[1]}}if(m!=""){g.push('class="'+m+'"')}if(q=="a"){var c=r(e.getAttribute("href")||"");var k=e.getAttribute("target")||"";g.push('href="/ford/06-05-2010/'+c+'"','target="'+k+'"');if(!j){j={href:c,target:k}}}l.push("<"+q+(g.length>0?" ":"")+g.join(" ")+">");o=true;if(e.hasChildNodes()){p.push(h);h=0;d=e.childNodes;continue}else{if(!/^(br|img)$/i.test(e.nodeName)){l.push("",e.nodeName.toLowerCase(),">")}}}if(p.length>0&&!e.nextSibling){do{h=p.pop();d=e.parentNode.parentNode.childNodes;e=d[h];if(e){l.push("",e.nodeName.toLowerCase(),">")}}while(h==d.length-1&&p.length>0)}h++}return{text:l.join("").replace(/^\s+|\s+$|\s*(
)\s*/g,"$1"),primaryLink:j||{}}}};
var parseSelector=(function(){var B=/\s*,\s*/;var A=/\s*([\s>+~(),]|^|$)\s*/g;var K=/([\s>+~,]|[^(]\+|^)([#.:@])/g;var E=/^[^\s>+~]/;var J=/[\s#.:>+~()@]|[^\s#.:>+~()@]+/g;function G(P,N){N=N||document.documentElement;var Q=P.split(B),V=[];for(var S=0;S":function(M,P){var L=[];for(var O=0,Q;O