(function(f,h,i){function k(a,c){var b=(a[0]||0)-(c[0]||0);return b>0||!b&&a.length>0&&k(a.slice(1),c.slice(1))}function l(a){if(typeof a!=g)return a;var c=[],b="";for(var d in a){b=typeof a[d]==g?l(a[d]):[d,m?encodeURI(a[d]):a[d]].join("=");c.push(b)}return c.join("&")}function n(a){var c=[];for(var b in a)a[b]&&c.push([b,'="',a[b],'"'].join(""));return c.join(" ")}function o(a){var c=[];for(var b in a)c.push(['<param name="',b,'" value="',l(a[b]),'" />'].join(""));return c.join("")}var g="object",m=true;try{var j=i.description||function(){return(new i("ShockwaveFlash.ShockwaveFlash")).GetVariable("$version")}()}catch(p){j="Unavailable"}var e=j.match(/\d+/g)||[0];f[h]={available:e[0]>0,activeX:i&&!i.name,version:{original:j,array:e,string:e.join("."),major:parseInt(e[0],10)||0,minor:parseInt(e[1],10)||0,release:parseInt(e[2],10)||0},hasVersion:function(a){a=/string|number/.test(typeof a)?a.toString().split("."):/object/.test(typeof a)?[a.major,a.minor]:a||[0,0];return k(e,a)},encodeParams:true,expressInstall:"expressInstall.swf",expressInstallIsActive:false,create:function(a){if(!a.swf||this.expressInstallIsActive||!this.available&&!a.hasVersionFail)return false;if(!this.hasVersion(a.hasVersion||1)){this.expressInstallIsActive=true;if(typeof a.hasVersionFail=="function")if(!a.hasVersionFail.apply(a))return false;a={swf:a.expressInstall||this.expressInstall,height:137,width:214,flashvars:{MMredirectURL:location.href,MMplayerType:this.activeX?"ActiveX":"PlugIn",MMdoctitle:document.title.slice(0,47)+" - Flash Player Installation"}}}attrs={data:a.swf,type:"application/x-shockwave-flash",id:a.id||"flash_"+Math.floor(Math.random()*999999999),width:a.width||320,height:a.height||180,style:a.style||""};m=typeof a.useEncode!=="undefined"?a.useEncode:this.encodeParams;a.movie=a.swf;a.wmode=a.wmode||"opaque";delete a.fallback;delete a.hasVersion;delete a.hasVersionFail;delete a.height;delete a.id;delete a.swf;delete a.useEncode;delete a.width;var c=document.createElement("div");c.innerHTML=["<object ",n(attrs),">",o(a),"</object>"].join("");return c.firstChild}};f.fn[h]=function(a){var c=this.find(g).andSelf().filter(g);/string|object/.test(typeof a)&&this.each(function(){var b=f(this),d;a=typeof a==g?a:{swf:a};a.fallback=this;if(d=f[h].create(a)){b.children().remove();b.html(d)}});typeof a=="function"&&c.each(function(){var b=this;b.jsInteractionTimeoutMs=b.jsInteractionTimeoutMs||0;if(b.jsInteractionTimeoutMs<660)b.clientWidth||b.clientHeight?a.call(b):setTimeout(function(){f(b)[h](a)},b.jsInteractionTimeoutMs+66)});return c}})(jQuery,"flash",navigator.plugins["Shockwave Flash"]||window.ActiveXObject);(function(a){a.extend(a.fn,{livequery:function(e,d,c){var b=this,f;if(a.isFunction(e)){c=d,d=e,e=undefined}a.each(a.livequery.queries,function(g,h){if(b.selector==h.selector&&b.context==h.context&&e==h.type&&(!d||d.$lqguid==h.fn.$lqguid)&&(!c||c.$lqguid==h.fn2.$lqguid)){return(f=h)&&false}});f=f||new a.livequery(this.selector,this.context,e,d,c);f.stopped=false;f.run();return this},expire:function(e,d,c){var b=this;if(a.isFunction(e)){c=d,d=e,e=undefined}a.each(a.livequery.queries,function(f,g){if(b.selector==g.selector&&b.context==g.context&&(!e||e==g.type)&&(!d||d.$lqguid==g.fn.$lqguid)&&(!c||c.$lqguid==g.fn2.$lqguid)&&!this.stopped){a.livequery.stop(g.id)}});return this}});a.livequery=function(b,d,f,e,c){this.selector=b;this.context=d;this.type=f;this.fn=e;this.fn2=c;this.elements=[];this.stopped=false;this.id=a.livequery.queries.push(this)-1;e.$lqguid=e.$lqguid||a.livequery.guid++;if(c){c.$lqguid=c.$lqguid||a.livequery.guid++}return this};a.livequery.prototype={stop:function(){var b=this;if(this.type){this.elements.unbind(this.type,this.fn)}else{if(this.fn2){this.elements.each(function(c,d){b.fn2.apply(d)})}}this.elements=[];this.stopped=true},run:function(){if(this.stopped){return}var d=this;var e=this.elements,c=a(this.selector,this.context),b=c.not(e);this.elements=c;if(this.type){b.bind(this.type,this.fn);if(e.length>0){a.each(e,function(f,g){if(a.inArray(g,c)<0){a.event.remove(g,d.type,d.fn)}})}}else{b.each(function(){d.fn.apply(this)});if(this.fn2&&e.length>0){a.each(e,function(f,g){if(a.inArray(g,c)<0){d.fn2.apply(g)}})}}}};a.extend(a.livequery,{guid:0,queries:[],queue:[],running:false,timeout:null,checkQueue:function(){if(a.livequery.running&&a.livequery.queue.length){var b=a.livequery.queue.length;while(b--){a.livequery.queries[a.livequery.queue.shift()].run()}}},pause:function(){a.livequery.running=false},play:function(){a.livequery.running=true;a.livequery.run()},registerPlugin:function(){a.each(arguments,function(c,d){if(!a.fn[d]){return}var b=a.fn[d];a.fn[d]=function(){var e=b.apply(this,arguments);a.livequery.run();return e}})},run:function(b){if(b!=undefined){if(a.inArray(b,a.livequery.queue)<0){a.livequery.queue.push(b)}}else{a.each(a.livequery.queries,function(c){if(a.inArray(c,a.livequery.queue)<0){a.livequery.queue.push(c)}})}if(a.livequery.timeout){clearTimeout(a.livequery.timeout)}a.livequery.timeout=setTimeout(a.livequery.checkQueue,20)},stop:function(b){if(b!=undefined){a.livequery.queries[b].stop()}else{a.each(a.livequery.queries,function(c){a.livequery.queries[c].stop()})}}});a.livequery.registerPlugin("append","prepend","after","before","wrap","attr","removeAttr","addClass","removeClass","toggleClass","empty","remove","html");a(function(){a.livequery.play()})})(jQuery);checkFlash=$.flash.hasVersion(8);function setCSS(css){try{document.getElementsByTagName("head")[0].appendChild(css);}catch(e){setTimeout(function(){setCSS(css)},100);}}
var css=document.createElement("link");css.setAttribute("href","/static/css/wwifr.css");css.setAttribute("rel","stylesheet");css.setAttribute("type","text/css");if(checkFlash){setCSS(css);css=null;}
function setDimensions(height,width,id){$('#'+id).height(height).attr('height',height).width(width).attr('width',width);}
function toHex(N){if(N===null){return"00";}
N=parseInt(N);if(N===0||isNaN(N)){return"00";}
N=Math.max(0,N);N=Math.min(N,255);N=Math.round(N);return"0123456789ABCDEF".charAt((N-N%16)/16)+"0123456789ABCDEF".charAt(N%16);}
function RGBtoHex(R,G,B){return'#'+toHex(R)+toHex(G)+toHex(B);}
function RGB(c){var color="";if(c.indexOf('#')<=-1){for(i=0;i<c.length;i++){if(parseInt(c.charAt(i))%1===0||c.charAt(i)==','){color+=c.charAt(i);}}
nc=color.split(",");c=RGBtoHex(nc[0],nc[1],nc[2]);}
return c;}
function rgbHTML(theHTML){theHTML=theHTML.replace(/rgb\((.*?)\)/g,function(match,c){return RGB(c);});return theHTML;}
function reformHTML(s){s=s.replace(/(\r\n|\n|\r)/gm,' ').replace(/< *\/?(\w+)/g,function(c){return c.toLowerCase();});var Rx=/<\w+[^>]+>/g;var pat,tem='',temp='',str='',x=0;while((pat=Rx.exec(s))!==null){tem+=s.substring(x,pat.index);temp=pat[0];if(/; *charset *=/i.test(temp)===false){temp=temp.replace(/\= *([^"\s]+(?=[ >]))/g,'=\"$1\"');}
temp=temp.replace(/[\w-]+ *\= */g,function(c){return c.toLowerCase();});temp=temp.replace(/style *\= *"[^"]+/g,function(c){if(c.charAt(c.length-1)!=';'){c+=';';}
c=c.replace(/: /gi,':').replace(/:(.*?);/gi,'="$1"').replace(/font-size/gi,'size');return c.toLowerCase();});tem+=temp;x=Rx.lastIndex;}
tem+=s.substring(x);tem=tem.replace(/<span style="(.*?)">/g,"<font $1>").replace(/<\/span>/g,"</font>").replace(/&nbsp;/g,' ').replace(/<em>(.*?)<\/em>/g,"<i>$1</i>").replace(/<strong>(.*?)<\/strong>/g,"<b>$1</b>").replace(/\+/g,'&#43;').replace(/%/g,'&#37;');tem=jQuery.trim(tem);return tem;}
var wwifrCount=0;function replaceText(Class,Not,Font,Path,Weight,LinkColour,LinkHoverColour,LinkDecoration,LinkHoverDecoration,LineHeight,Spacing,Zoom,OffsetX,OffsetY,Wrap){$(Class+':visible').livequery(function(e){if(checkFlash){$(this).find('object').remove();$(this).find('.wwifr').before($(this).find('.wwifr').html()).remove();$(this).not(Not).each(function(e){wwifrCount+=1;Class=Class.replace(/[^a-zA-Z 0-9]+/g,'');var ID='wwifr'+wwifrCount;var Text=$(this).html();var Original=Text;var Width=$(this).width();var Height=$(this).height();var Link=$(this).attr('href');var Align=$(this).css('text-align');var Size=$(this).css('font-size').replace(/[a-z]/g,'');var Colour=rgbHTML($(this).css('color'));if(Weight==''||Weight===null){Weight=$(this).css('font-weight');}
if(document.location.href.indexOf('file:///')>-1){var Live=false;}
else{var Live=true;}
Text=escape(rgbHTML(reformHTML(Text)));Flash=$.flash.create({swf:Path+Font+'.swf',width:Width,height:Height,wmode:'transparent',expressInstaller:Path+'expressInstall.swf',flashvars:{ID:ID,Text:Text,Link:Link,Width:Width,Height:Height,Size:Size,Colour:Colour,LinkColour:LinkColour,LinkHoverColour:LinkHoverColour,LinkDecoration:LinkDecoration,LinkHoverDecoration:LinkHoverDecoration,Weight:Weight,LineHeight:LineHeight,Spacing:Spacing,Align:Align,Zoom:Zoom,OffsetX:OffsetX,OffsetY:OffsetY,Wrap:Wrap,Live:Live}});$(this).html(Flash);if(Live===true){$(this).find('object').attr('id',ID).attr('name',ID);$(this).mouseover(function(){$(this).find('object').focus();});$(this).mouseout(function(){$(this).find('object').flash(function(){this.SetVariable('resetvar',0);});$(this).find('object').blur();});}
$(this).append('<span class="wwifr">'+Original+'</span>');$(this).css('visibility','visible');});}});}
replaceText('h1', '.home-callout-green-middle-254 h1', 'rockwell', '/static/flash/', 'normal', '', '', 'none', 'underline', '0', '0', '1', '-2', '-2', 'true');
replaceText('.home-callout-green-middle-254 h1', '', 'rockwell', '/static/flash/', 'normal', '#FFFFFF', '', 'none', 'underline', '0', '0', '1', '-2', '-2', 'true');
replaceText('h2','','rockwell','/static/flash/','normal','','','underline','none','0','0','1','-2','-2','true');
replaceText('h3','','rockwell','/static/flash/','normal','','','underline','underline','0','0','1','-2','-2','true');
replaceText('.main-nav li a','','rockwell','/static/flash/','normal','','','','','0','0','1','-2','-2','false');
replaceText('.secondary-navigation a','','gothic','/static/flash/','normal','','','','','0','0','1','-2','-2','true');
replaceText('.homepage-callout-two p','','rockwell','/static/flash/','normal','','','','','0','0','1','-2','-2','true');
replaceText('.homepage-callout-two a','','rockwell','/static/flash/','bold','','','','underline','0','0','1','-2','-2','true');
replaceText('.yellow-callout p','','rockwell','/static/flash/','normal','','','','','0','0','1','-2','0','true');
replaceText('.courses-top-quote p','','rockwell','/static/flash/','normal','','','','','0','0','1','-2','-2','true');replaceText('.courses-banner-header p','','rockwell','/static/flash/','normal','','','','','0','0','1','-2','-2','true');replaceText('.courses-banner-more p','','rockwell','/static/flash/','normal','','','','','0','0','1','-2','-2','true');replaceText('.courses-sublanding-container a','','gothic','/static/flash/','normal','','','underline','none','0','0','1','-2','-2','true');replaceText('.courses-sublanding-container-two a','','gothic','/static/flash/','normal','','','underline','none','0','0','1','-2','-2','true');replaceText('.home-callout-middle h2, .courses-landing-container h2','','rockwell','/static/flash/','regular','','','none','underline','0','0','1','0','0','true');
