
/* Merged Plone Javascript file
 * This file is dynamically assembled from separate parts.
 * Some of these parts have 3rd party licenses or copyright information attached
 * Such information is valid for that section,
 * not for the entire composite file
 * originating files are separated by - filename.js -
 */

/* - ++resource++openc.vanillatheme.javascripts/initialise.js - */
// http://rethink.sita.co.uk/portal_javascripts/++resource++openc.vanillatheme.javascripts/initialise.js?original=1
jq(function(){if(window.openc_msie_hide){document.getElementById('frame').style.display=''}
openc.IS_EDIT_PAGE=jq('body').hasClass('edit-page');openc.IS_DESKTOP=screen.width>480;openc.IS_RIA_CLIENT=jq.browser.safari||jq.browser.opera||jq.browser.msie||jq.browser.mozilla;if(openc.IS_RIA_CLIENT&&!openc.IS_EDIT_PAGE&&openc.IS_DESKTOP){jq('html').addClass('ria-public-desktop')}});if(window.openc==undefined){openc=new Object()}
openc.removeWhitespace=function(node){jQuery.each(node.childNodes, function(index,node){if(node&&node.nodeType==3&&node.nodeValue.match(/^\s*$/)){node.parentNode.removeChild(node)}})}
openc.PATH_TO_PAGE=document.location.href.replace(/^http:\/\/[^\/]+([^\?@\+]*).*$/,'$1');if(openc.PATH_TO_PAGE.match(/[^\/]\/+$/)){openc.PATH_TO_PAGE=openc.PATH_TO_PAGE.replace(/^(.+[^\/])\/+$/,'$1')}
openc.PAGE_DEPTH=openc.PATH_TO_PAGE=="/"?0:openc.PATH_TO_PAGE.match(/\//g).length;openc.logConstants=function(){return;for(var prop in openc){if(prop.match(/^[A-Z_]+$/)){openc.log(prop+' : '+openc[prop])}}}
jq(function(){setTimeout(openc.logConstants,100)});if(navigator.appVersion.indexOf('MSIE')>-1){try{document.execCommand("BackgroundImageCache",false,true)} catch(err){}}
openc.EventMediator=function(){this.registry=new Object}
openc.EventMediator.prototype.addEventListener=function(eventType,handler){if(this.registry[eventType]==undefined){this.registry[eventType]=new Array()}
var eventRegistry=this.registry[eventType];for(var i=0 ;i<eventRegistry.length ;i++){if(eventRegistry[i]==handler){return false}}
eventRegistry.push(handler)}
openc.EventMediator.prototype.dispatchEvent=function(eventType,eventObj){var eventRegistry=this.registry[eventType];if(eventRegistry!=undefined&&eventRegistry.length>0){for(var i=0 ;i<eventRegistry.length ;i++){eventRegistry[i].call(null,eventObj)}}}
openc.eventMediator=new openc.EventMediator();openc.log=function(str,clear){if(jq("div#opencLog").length==0){jq("body").prepend(jq('<div id="opencLog" style="position:absolute;top:10px;left:10px;width:600px;min-heigh400px;max-height:800px;overflow:auto;border:5px solid black;z-index:1000;background-color:black;color:green;font-family:monospace;font-size:13px;"></div>'))
jq('div#opencLog').css('opacity',0.8)}
var log=jq("div#opencLog");if(clear){log.empty()}
log.append('<p style="margin:5px;">'+str+'</p>');return str}
Function.prototype.extend=function(superclass){var c=function(){};c.prototype=superclass.prototype;this.prototype=new c()}
openc.registryObjectsByDomId=new Object();openc.registerObject=function(obj){var targetId=obj.targetId;var target=jq("#"+targetId);if(target.length==0){return}
var registry=openc.registryObjectsByDomId;if(registry[obj.parentClass]==undefined){registry[obj.parentClass]=new Array()}
var typeRegistry=registry[obj.parentClass];if(typeRegistry[targetId]==undefined){typeRegistry[targetId]=new openc[obj.parentClass](target)}
typeRegistry[targetId].append(obj)}

/* - ++resource++openc.vanillatheme.javascripts/swfobject.js - */
// http://rethink.sita.co.uk/portal_javascripts/++resource++openc.vanillatheme.javascripts/swfobject.js?original=1
var swfobject=function(){var UNDEF="undefined",OBJECT="object",SHOCKWAVE_FLASH="Shockwave Flash",SHOCKWAVE_FLASH_AX="ShockwaveFlash.ShockwaveFlash",FLASH_MIME_TYPE="application/x-shockwave-flash",EXPRESS_INSTALL_ID="SWFObjectExprInst",win=window,doc=document,nav=navigator,domLoadFnArr=[],regObjArr=[],timer=null,storedAltContent=null,storedAltContentId=null,isDomLoaded=false,isExpressInstallActive=false;var ua=function(){var w3cdom=typeof doc.getElementById!=UNDEF&&typeof doc.getElementsByTagName!=UNDEF&&typeof doc.createElement!=UNDEF&&typeof doc.appendChild!=UNDEF&&typeof doc.replaceChild!=UNDEF&&typeof doc.removeChild!=UNDEF&&typeof doc.cloneNode!=UNDEF,playerVersion=[0,0,0],d=null;if(typeof nav.plugins!=UNDEF&&typeof nav.plugins[SHOCKWAVE_FLASH]==OBJECT){d=nav.plugins[SHOCKWAVE_FLASH].description;if(d){d=d.replace(/^.*\s+(\S+\s+\S+$)/,"$1");playerVersion[0]=parseInt(d.replace(/^(.*)\..*$/,"$1"),10);playerVersion[1]=parseInt(d.replace(/^.*\.(.*)\s.*$/,"$1"),10);playerVersion[2]=/r/.test(d) ? parseInt(d.replace(/^.*r(.*)$/,"$1"),10):0}}
else if(typeof win.ActiveXObject!=UNDEF){var a=null,fp6Crash=false;try{a=new ActiveXObject(SHOCKWAVE_FLASH_AX+".7")}
catch(e){try{a=new ActiveXObject(SHOCKWAVE_FLASH_AX+".6");playerVersion=[6,0,21];a.AllowScriptAccess="always"}
catch(e){if(playerVersion[0]==6){fp6Crash=true}}
if(!fp6Crash){try{a=new ActiveXObject(SHOCKWAVE_FLASH_AX)}
catch(e){}}}
if(!fp6Crash&&a){try{d=a.GetVariable("$version");if(d){d=d.split(" ")[1].split(",");playerVersion=[parseInt(d[0],10),parseInt(d[1],10),parseInt(d[2],10)]}}
catch(e){}}}
var u=nav.userAgent.toLowerCase(),p=nav.platform.toLowerCase(),webkit=/webkit/.test(u) ? parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false, // returns either the webkit version or false if not webkit
ie=false,windows=p?/win/.test(p) : /win/.test(u),mac=p?/mac/.test(p) : /mac/.test(u);/*@cc_on
 ie=true;@if(@_win32)
windows=true;@elif(@_mac)
mac=true;@end
@*/return{w3cdom:w3cdom,pv:playerVersion,webkit:webkit,ie:ie,win:windows,mac:mac}}();var onDomLoad=function(){if(!ua.w3cdom){return}
addDomLoadEvent(main);if(ua.ie&&ua.win){try{doc.write("<scr"+"ipt id=__ie_ondomload defer=true src=//:></scr"+"ipt>");var s=getElementById("__ie_ondomload");if(s){s.onreadystatechange=function(){if(this.readyState=="complete"){this.parentNode.removeChild(this);callDomLoadFunctions()}}}}
catch(e){}}
if(ua.webkit&&typeof doc.readyState!=UNDEF){timer=setInterval(function(){if (/loaded|complete/.test(doc.readyState)){callDomLoadFunctions()}},10)}
if(typeof doc.addEventListener!=UNDEF){doc.addEventListener("DOMContentLoaded",callDomLoadFunctions,null)}
addLoadEvent(callDomLoadFunctions)}();
function callDomLoadFunctions(){if(isDomLoaded){return}
if(ua.ie&&ua.win){var s=createElement("span");try{var t=doc.getElementsByTagName("body")[0].appendChild(s);t.parentNode.removeChild(t)}
catch(e){return}}
isDomLoaded=true;if(timer){clearInterval(timer);timer=null}
var dl=domLoadFnArr.length;for(var i=0;i<dl;i++){domLoadFnArr[i]()}}
function addDomLoadEvent(fn){if(isDomLoaded){fn()}
else{domLoadFnArr[domLoadFnArr.length]=fn}}
function addLoadEvent(fn){if(typeof win.addEventListener!=UNDEF){win.addEventListener("load",fn,false)}
else if(typeof doc.addEventListener!=UNDEF){doc.addEventListener("load",fn,false)}
else if(typeof win.attachEvent!=UNDEF){win.attachEvent("onload",fn)}
else if(typeof win.onload=="function"){var fnOld=win.onload;win.onload=function(){fnOld();fn()}}
else{win.onload=fn}}
function main(){var rl=regObjArr.length;for(var i=0;i<rl;i++){var id=regObjArr[i].id;if(ua.pv[0]>0){var obj=getElementById(id);if(obj){regObjArr[i].width=obj.getAttribute("width")?obj.getAttribute("width"):"0";regObjArr[i].height=obj.getAttribute("height")?obj.getAttribute("height"):"0";if(hasPlayerVersion(regObjArr[i].swfVersion)){if(ua.webkit&&ua.webkit<312){fixParams(obj)}
setVisibility(id,true)}
else if(regObjArr[i].expressInstall&&!isExpressInstallActive&&hasPlayerVersion("6.0.65")&&(ua.win||ua.mac)){showExpressInstall(regObjArr[i])}
else{displayAltContent(obj)}}}
else{setVisibility(id,true)}}}
function fixParams(obj){var nestedObj=obj.getElementsByTagName(OBJECT)[0];if(nestedObj){var e=createElement("embed"),a=nestedObj.attributes;if(a){var al=a.length;for(var i=0;i<al;i++){if(a[i].nodeName.toLowerCase()=="data"){e.setAttribute("src",a[i].nodeValue)}
else{e.setAttribute(a[i].nodeName,a[i].nodeValue)}}}
var c=nestedObj.childNodes;if(c){var cl=c.length;for(var j=0;j<cl;j++){if(c[j].nodeType==1&&c[j].nodeName.toLowerCase()=="param"){e.setAttribute(c[j].getAttribute("name"),c[j].getAttribute("value"))}}}
obj.parentNode.replaceChild(e,obj)}}
function fixObjectLeaks(id){if(ua.ie&&ua.win&&hasPlayerVersion("8.0.0")){win.attachEvent("onunload", function(){var obj=getElementById(id);if(obj){for(var i in obj){if(typeof obj[i]=="function"){obj[i]=function(){}}}
obj.parentNode.removeChild(obj)}})}}
function showExpressInstall(regObj){isExpressInstallActive=true;var obj=getElementById(regObj.id);if(obj){if(regObj.altContentId){var ac=getElementById(regObj.altContentId);if(ac){storedAltContent=ac;storedAltContentId=regObj.altContentId}}
else{storedAltContent=abstractAltContent(obj)}
if(!(/%$/.test(regObj.width))&&parseInt(regObj.width,10)<310){regObj.width="310"}
if(!(/%$/.test(regObj.height))&&parseInt(regObj.height,10)<137){regObj.height="137"}
doc.title=doc.title.slice(0,47)+" - Flash Player Installation";var pt=ua.ie&&ua.win?"ActiveX":"PlugIn",dt=doc.title,fv="MMredirectURL="+win.location+"&MMplayerType="+pt+"&MMdoctitle="+dt,replaceId=regObj.id;if(ua.ie&&ua.win&&obj.readyState!=4){var newObj=createElement("div");replaceId+="SWFObjectNew";newObj.setAttribute("id",replaceId);obj.parentNode.insertBefore(newObj,obj);obj.style.display="none";win.attachEvent("onload", function(){obj.parentNode.removeChild(obj)})}
createSWF({data:regObj.expressInstall,id:EXPRESS_INSTALL_ID,width:regObj.width,height:regObj.height},{flashvars:fv},replaceId)}}
function displayAltContent(obj){if(ua.ie&&ua.win&&obj.readyState!=4){var el=createElement("div");obj.parentNode.insertBefore(el,obj);el.parentNode.replaceChild(abstractAltContent(obj),el);obj.style.display="none";win.attachEvent("onload", function(){obj.parentNode.removeChild(obj)})}
else{obj.parentNode.replaceChild(abstractAltContent(obj),obj)}}
function abstractAltContent(obj){var ac=createElement("div");if(ua.win&&ua.ie){ac.innerHTML=obj.innerHTML}
else{var nestedObj=obj.getElementsByTagName(OBJECT)[0];if(nestedObj){var c=nestedObj.childNodes;if(c){var cl=c.length;for(var i=0;i<cl;i++){if(!(c[i].nodeType==1&&c[i].nodeName.toLowerCase()=="param")&&!(c[i].nodeType==8)){ac.appendChild(c[i].cloneNode(true))}}}}}
return ac}
function createSWF(attObj,parObj,id){var r,el=getElementById(id);if(typeof attObj.id==UNDEF){attObj.id=id}
if(ua.ie&&ua.win){var att="";for(var i in attObj){if(attObj[i]!=Object.prototype[i]){if(i=="data"){parObj.movie=attObj[i]}
else if(i.toLowerCase()=="styleclass"){att+=' class="'+attObj[i]+'"'}
else if(i!="classid"){att+=' '+i+'="'+attObj[i]+'"'}}}
var par="";for(var j in parObj){if(parObj[j]!=Object.prototype[j]){par+='<param name="'+j+'" value="'+parObj[j]+'" />'}}
el.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+att+'>'+par+'</object>';fixObjectLeaks(attObj.id);r=getElementById(attObj.id)}
else if(ua.webkit&&ua.webkit<312){var e=createElement("embed");e.setAttribute("type",FLASH_MIME_TYPE);for(var k in attObj){if(attObj[k]!=Object.prototype[k]){if(k=="data"){e.setAttribute("src",attObj[k])}
else if(k.toLowerCase()=="styleclass"){e.setAttribute("class",attObj[k])}
else if(k!="classid"){e.setAttribute(k,attObj[k])}}}
for(var l in parObj){if(parObj[l]!=Object.prototype[l]){if(l!="movie"){e.setAttribute(l,parObj[l])}}}
el.parentNode.replaceChild(e,el);r=e}
else{var o=createElement(OBJECT);o.setAttribute("type",FLASH_MIME_TYPE);for(var m in attObj){if(attObj[m]!=Object.prototype[m]){if(m.toLowerCase()=="styleclass"){o.setAttribute("class",attObj[m])}
else if(m!="classid"){o.setAttribute(m,attObj[m])}}}
for(var n in parObj){if(parObj[n]!=Object.prototype[n]&&n!="movie"){createObjParam(o,n,parObj[n])}}
el.parentNode.replaceChild(o,el);r=o}
return r}
function createObjParam(el,pName,pValue){var p=createElement("param");p.setAttribute("name",pName);p.setAttribute("value",pValue);el.appendChild(p)}
function getElementById(id){return doc.getElementById(id)}
function createElement(el){return doc.createElement(el)}
function hasPlayerVersion(rv){var pv=ua.pv,v=rv.split(".");v[0]=parseInt(v[0],10);v[1]=parseInt(v[1],10);v[2]=parseInt(v[2],10);return(pv[0]>v[0]||(pv[0]==v[0]&&pv[1]>v[1])||(pv[0]==v[0]&&pv[1]==v[1]&&pv[2]>=v[2]))?true:false}
function createCSS(sel,decl){if(ua.ie&&ua.mac){return}
var h=doc.getElementsByTagName("head")[0],s=createElement("style");s.setAttribute("type","text/css");s.setAttribute("media","screen");if(!(ua.ie&&ua.win)&&typeof doc.createTextNode!=UNDEF){s.appendChild(doc.createTextNode(sel+" {"+decl+"}"))}
h.appendChild(s);if(ua.ie&&ua.win&&typeof doc.styleSheets!=UNDEF&&doc.styleSheets.length>0){var ls=doc.styleSheets[doc.styleSheets.length-1];if(typeof ls.addRule==OBJECT){ls.addRule(sel,decl)}}}
function setVisibility(id,isVisible){var v=isVisible?"visible":"hidden";if(isDomLoaded){getElementById(id).style.visibility=v}
else{createCSS("#"+id,"visibility:"+v)}}
return{registerObject: function(objectIdStr,swfVersionStr,xiSwfUrlStr){if(!ua.w3cdom||!objectIdStr||!swfVersionStr){return}
var regObj={};regObj.id=objectIdStr;regObj.swfVersion=swfVersionStr;regObj.expressInstall=xiSwfUrlStr?xiSwfUrlStr:false;regObjArr[regObjArr.length]=regObj;setVisibility(objectIdStr,false)},getObjectById: function(objectIdStr){var r=null;if(ua.w3cdom&&isDomLoaded){var o=getElementById(objectIdStr);if(o){var n=o.getElementsByTagName(OBJECT)[0];if(!n||(n&&typeof o.SetVariable!=UNDEF)){r=o}
else if(typeof n.SetVariable!=UNDEF){r=n}}}
return r},embedSWF: function(swfUrlStr,replaceElemIdStr,widthStr,heightStr,swfVersionStr,xiSwfUrlStr,flashvarsObj,parObj,attObj){if(!ua.w3cdom||!swfUrlStr||!replaceElemIdStr||!widthStr||!heightStr||!swfVersionStr){return}
widthStr+="";heightStr+="";if(hasPlayerVersion(swfVersionStr)){setVisibility(replaceElemIdStr,false);var att=(typeof attObj==OBJECT)?attObj:{};att.data=swfUrlStr;att.width=widthStr;att.height=heightStr;var par=(typeof parObj==OBJECT)?parObj:{};if(typeof flashvarsObj==OBJECT){for(var i in flashvarsObj){if(flashvarsObj[i]!=Object.prototype[i]){if(typeof par.flashvars!=UNDEF){par.flashvars+="&"+i+"="+flashvarsObj[i]}
else{par.flashvars=i+"="+flashvarsObj[i]}}}}
addDomLoadEvent(function(){createSWF(att,par,replaceElemIdStr);if(att.id==replaceElemIdStr){setVisibility(replaceElemIdStr,true)}})}
else if(xiSwfUrlStr&&!isExpressInstallActive&&hasPlayerVersion("6.0.65")&&(ua.win||ua.mac)){setVisibility(replaceElemIdStr,false);addDomLoadEvent(function(){var regObj={};regObj.id=regObj.altContentId=replaceElemIdStr;regObj.width=widthStr;regObj.height=heightStr;regObj.expressInstall=xiSwfUrlStr;showExpressInstall(regObj)})}},getFlashPlayerVersion: function(){return{major:ua.pv[0],minor:ua.pv[1],release:ua.pv[2]}},hasFlashPlayerVersion:hasPlayerVersion,createSWF: function(attObj,parObj,replaceElemIdStr){if(ua.w3cdom&&isDomLoaded){return createSWF(attObj,parObj,replaceElemIdStr)}
else{return undefined}},createCSS: function(sel,decl){if(ua.w3cdom){createCSS(sel,decl)}},addDomLoadEvent:addDomLoadEvent,addLoadEvent:addLoadEvent,getQueryParamValue: function(param){var q=doc.location.search||doc.location.hash;if(param==null){return q}
if(q){var pairs=q.substring(1).split("&");for(var i=0;i<pairs.length;i++){if(pairs[i].substring(0,pairs[i].indexOf("="))==param){return pairs[i].substring((pairs[i].indexOf("=")+1))}}}
return ""},expressInstallCallback: function(){if(isExpressInstallActive&&storedAltContent){var obj=getElementById(EXPRESS_INSTALL_ID);if(obj){obj.parentNode.replaceChild(storedAltContent,obj);if(storedAltContentId){setVisibility(storedAltContentId,true);if(ua.ie&&ua.win){storedAltContent.style.display="block"}}
storedAltContent=null;storedAltContentId=null;isExpressInstallActive=false}}}}}();

/* - ++resource++openc.vanillatheme.javascripts/objects-from-links.js - */
// http://rethink.sita.co.uk/portal_javascripts/++resource++openc.vanillatheme.javascripts/objects-from-links.js?original=1
openc.SWFObjectFromLink=function(link){var anchor=jq(link);var href=anchor.attr('href');this.href=href;this.file=this.href.match(/[^\/]+$/);var pathToFile=this.href.match(/\//) ? this.href.replace(/(.*)\/[^\/]+$/,'$1'):'';var pathToStartPoint=openc.PATH_TO_PAGE;while(pathToFile.indexOf('../')==0){pathToFile=pathToFile.substr(3);pathToStartPoint=pathToStartPoint.replace(/(.*)\/[^\/]+$/,'$1')}
this.base=pathToStartPoint+'/'+pathToFile;this.absolutePath=this.base+'/'+this.file;var metadataPattern=new RegExp(".*(v\\d+w\\d+h\\d+)-[^\\/]+\\."+this.objectType+"$");var metadata=this.href.replace(metadataPattern,'$1');if(metadata==this.href){return}
var majorVersion=parseInt(metadata.replace(/^v(\d).+/,'$1'));var width=parseInt(metadata.replace(/.+w(\d+).+/,'$1'));var height=parseInt(metadata.replace(/.+h(\d+)/,'$1'));if(!this.hasPlayerVersion(majorVersion)){return}
anchor.css('visibility','hidden');var randomId='ObjFromLink'+Math.round(Math.random()*999999);anchor.attr('id',randomId);swfobject.embedSWF(this.getObjectURL(),randomId,width,height+this.paddingBottom,majorVersion+'.0.0',{},this.getParams(),{wmode:'transparent',base:this.base});openc.eventMediator.dispatchEvent("afterObjectFromLink",{href:this.href})}
openc.SWFObjectFromLink.prototype.objectType="swf";openc.SWFObjectFromLink.prototype.getParams=function(){return{}}
openc.SWFObjectFromLink.prototype.hasPlayerVersion=function(majorVersion){return swfobject.hasFlashPlayerVersion(majorVersion+'.0.0')}
openc.SWFObjectFromLink.prototype.paddingBottom=0;openc.SWFObjectFromLink.prototype.getObjectURL=function(){if(this.href.match(/__resource__|\+\+resource\+\+/)){return this.absolutePath}
return this.absolutePath+'/download'}
openc.FLVObjectFromLink=function(link){openc.SWFObjectFromLink.call(this,link)}
openc.FLVObjectFromLink.extend(openc.SWFObjectFromLink);openc.FLVObjectFromLink.prototype.objectType="flv";openc.FLVObjectFromLink.prototype.getParams=function(){return{borderColour:'0x999999',autoload:false,skin:'__resource__openc.vanillatheme.swf/SteelExternalPlaySeekMute.swf',contentPath:this.absolutePath}}
openc.FLVObjectFromLink.prototype.paddingBottom=50;openc.FLVObjectFromLink.prototype.hasPlayerVersion=function(majorVersion){var proxyVersion=8;return swfobject.hasFlashPlayerVersion(Math.max(majorVersion,proxyVersion)+'.0.0')}
openc.FLVObjectFromLink.prototype.getObjectURL=function(){return '__resource__openc.vanillatheme.swf/flvp8.swf'}
openc.createObjectsFromAnchors=function(){jq('a[href$=.swf]').each(function(){new openc.SWFObjectFromLink(this)})
jq('a[href$=.flv]').each(function(){new openc.FLVObjectFromLink(this)})}
jq(function(){if(openc.IS_RIA_CLIENT&&!openc.IS_EDIT_PAGE&&openc.IS_DESKTOP){openc.createObjectsFromAnchors()}});

/* - ++resource++openc.vanillatheme.javascripts/jquery.dimensions.js - */
// http://rethink.sita.co.uk/portal_javascripts/++resource++openc.vanillatheme.javascripts/jquery.dimensions.js?original=1
(function($){$.dimensions={version:'@VERSION'};$.each(['Height','Width'], function(i,name){$.fn['inner'+name]=function(){if(!this[0]) return;var torl=name=='Height'?'Top':'Left',borr=name=='Height'?'Bottom':'Right';return this.css('display')!='none'?this[0]['client'+name]:num(this,name.toLowerCase())+num(this,'padding'+torl)+num(this,'padding'+borr)};$.fn['outer'+name]=function(options){if(!this[0]) return;var torl=name=='Height'?'Top':'Left',borr=name=='Height'?'Bottom':'Right';options=$.extend({margin:false},options||{});var val=this.css('display')!='none'?this[0]['offset'+name]:num(this,name.toLowerCase())+num(this,'border'+torl+'Width')+num(this,'border'+borr+'Width')+num(this,'padding'+torl)+num(this,'padding'+borr);return val+(options.margin?(num(this,'margin'+torl)+num(this,'margin'+borr)):0)}});$.each(['Left','Top'], function(i,name){$.fn['scroll'+name]=function(val){if(!this[0]) return;return val!=undefined?this.each(function(){this==window||this==document?window.scrollTo(name=='Left'?val:$(window)['scrollLeft'](),name=='Top'?val:$(window)['scrollTop']()):this['scroll'+name]=val}):this[0]==window||this[0]==document?self[(name=='Left'?'pageXOffset':'pageYOffset')]||$.boxModel&&document.documentElement['scroll'+name]||document.body['scroll'+name]:this[0]['scroll'+name]}});$.fn.extend({position: function(){var left=0,top=0,elem=this[0],offset,parentOffset,offsetParent,results;if(elem){offsetParent=this.offsetParent();offset=this.offset();parentOffset=offsetParent.offset();offset.top-=num(elem,'marginTop');offset.left-=num(elem,'marginLeft');parentOffset.top+=num(offsetParent,'borderTopWidth');parentOffset.left+=num(offsetParent,'borderLeftWidth');results={top:offset.top-parentOffset.top,left:offset.left-parentOffset.left}}
return results},offsetParent: function(){var offsetParent=this[0].offsetParent;while(offsetParent&&(!/^body|html$/i.test(offsetParent.tagName)&&$.css(offsetParent,'position')=='static'))
offsetParent=offsetParent.offsetParent;return $(offsetParent)}});
function num(el,prop){return parseInt($.curCSS(el.jquery?el[0]:el,prop,true))||0}})(jQuery);

/* - ++resource++openc.vanillatheme.javascripts/json-navigation.js - */
// http://rethink.sita.co.uk/portal_javascripts/++resource++openc.vanillatheme.javascripts/json-navigation.js?original=1
openc.LOCAL_NAV_DEPTH=2;openc.excludeFromJsonNavigation=new Array();openc.jsonNavigation=function(){if(jq.inArray(openc.PATH_TO_PAGE,openc.excludeFromJsonNavigation)!=-1){return}
if(screen.width<=480||openc.jsonstructure==undefined){return}
var debugUL=null;openc.parseJsonStructure(openc.jsonstructure,openc.jsonstructure,null,debugUL);openc.CURRENT_NODE=openc.getNodeByPath(openc.PATH_TO_PAGE,openc.jsonstructure);if(!openc.CURRENT_NODE){return}
openc.TOP_SECTION_NODE=openc.CURRENT_NODE;while(openc.TOP_SECTION_NODE.parent&&!openc.TOP_SECTION_NODE.parent.root){openc.TOP_SECTION_NODE=openc.TOP_SECTION_NODE.parent}
var startingNode=openc.findLocalNavRoot(openc.CURRENT_NODE,openc.CURRENT_NODE.children?openc.LOCAL_NAV_DEPTH-2:openc.LOCAL_NAV_DEPTH-1);if(startingNode){openc.eventMediator.dispatchEvent("beforeJsonNavigation");var localNavDiv=openc.getLocalNavContainer();localNavDiv.html('<h2><a href="'+startingNode.path+'"><span>'+startingNode.title+'</span></a></h2><ul></ul>');
function build(ul,node,lastChild,firstChild){ul.append('<li><a href="'+node.path+'"><span>'+node.title+'</span></a></li>');var li=ul.find('li:last');if(lastChild){li.addClass('lst')}
if(firstChild){li.addClass('fst')}
if(node.children){li.addClass('opn')}
if(node==openc.CURRENT_NODE){li.addClass('cur').find('span').addClass('cur')} else{li.find('span').mouseover(openc.onLocalNavLiSpanOver);li.find('span').mouseout(openc.onLocalNavLiSpanOut)}
if(node.onPath&&node.children){li.addClass('opn');li.append('<ul></ul>');var ul=li.find('ul:last');for(var i=0 ;i<node.children.length ;i++){build(ul,node.children[i],i==node.children.length-1,i==0)}}}
var ul=localNavDiv.find('ul');var length=startingNode.children.length;for(var i=0 ;i<length ;i++){build(ul,startingNode.children[i],i==length-1,i==0)}}}
openc.onLocalNavLiSpanOver=function(){jq(this).addClass('cur').parents('li:first').addClass('cur')}
openc.onLocalNavLiSpanOut=function(){jq(this).removeClass('cur').parents('li:first').removeClass('cur')}
openc.pageLocalNavContainer={};openc.getLocalNavContainer=function(){jq('div#local-navigation-flat').remove();var path=openc.PATH_TO_PAGE;for(var i in openc.pageLocalNavContainer){if(i==path){var mapping=openc.pageLocalNavContainer[i];var container=jq(mapping.container);var insertHTML='<div id="local-navigation-flat"></div>';if(mapping.append){container.append(insertHTML)} else{container.prepend(insertHTML)}
if(jq('div#portal-column-two *').length==0){jq('div#portal-column-two').remove();jq('body, div#columns').removeClass('cols-mr').addClass('cols-m')}
return container.find('div#local-navigation-flat')}}
var portalColumnTwo=jq('div#portal-column-two');if(portalColumnTwo.length==0){jq('body, div#columns').removeClass('cols-m').addClass('cols-mr');jq('div#portal-column-content').after('<div id="portal-column-two"></div>')}
jq('div#portal-column-two').prepend('<div id="local-navigation-flat"></div>').find('div#local-navigation-flat');return jq('div#local-navigation-flat')}
openc.parseJsonStructure=function(structure,node,parent,debugUL){node.name=node.nme;node.title=node.ttl;node.type=node.typ;node.children=node.cdn;node.parent=parent;node.path=node.path!=undefined?node.path:(node.parent==undefined)?'/':(node.parent.path=="/")?('/'+node.name):(node.parent.path+'/'+node.name);if(openc.PATH_TO_PAGE.indexOf(node.path)==0){node.onPath=true}
structure[node.path.replace(/\//g,'__')]=node;if(node.children.length==0){node.children=node.cdn=null}
if(debugUL){debugUL.append('<li style="color:#ccc"><a style="color:#ccc" href="'+node.path+'">'+node.title+'('+(node.children!=undefined)+')'+'</a></li>')}
if(node.children!=undefined){if(debugUL){debugUL=debugUL.append('<ul>').find('ul:last')}
jQuery.each(node.children, function(index,value){openc.parseJsonStructure(structure,value,node,debugUL)})}}
openc.getNodeByPath=function(path,structure){return structure[path.replace(/\//g,'__')]}
openc.findLocalNavRoot=function(start,reach){if(start.root==true||(start.parent.root==true&&start.children==undefined)){return null} else{if(reach>0&&start.parent&&start.parent.root==false){return openc.findLocalNavRoot(start.parent,reach-1)} else{return start}}}
jq(function(){if(openc.IS_RIA_CLIENT&&!openc.IS_EDIT_PAGE&&openc.IS_DESKTOP){openc.jsonNavigation()}});

/* - ++resource++openc.vanillatheme.javascripts/news-portlet-ticker.js - */
// http://rethink.sita.co.uk/portal_javascripts/++resource++openc.vanillatheme.javascripts/news-portlet-ticker.js?original=1
openc.ticker={};openc.ticker.DELTA_X=3;openc.TICKER_ELEMENT_PADDING_RIGHT=20;openc.TICKER_PAUSE=4000;openc.TICKER_FRAMERATE=40;openc.TICKER_START_FADE=1000;openc.ticker.init=function(){var div=jq("div.openc_portletNews:first");if(div.width()>1000){setTimeout(openc.ticker.init,1);return}
var h2=div.find("h2");var ul=div.find("ul.news-list");var lis=ul.find("li");if(div.length+ul.length+lis.length==0){return}
var rss=jq("li#siteaction-news-rss a");if(rss.length==1){div.prepend('<a class="rss" href="'+rss.attr('href')+'">RSS</a>')}
div.addClass("openc_ticker");lis.css("opacity",0);ul.removeClass("Boxout");ul.css({overflow:"hidden",padding:"0",margin:"0",listStyle:"none",position:"relative",zIndex:10,height:"1.4em"});if(jQuery.browser.msie){ul.width(div.width())}
lis.each(function(i){var li=jq(this);li.css({position:"absolute",display:"block",padding:0});li.width(9999)});var state={over:false,leftMostIndex:-1,div:div,h2:h2,ul:ul,lis:lis,counter:0};ul.mouseover(
function(){state.over=true})
state.ul.mouseout(
function(){state.over=false})
openc.ticker.nextItteration(state);lis.animate({opacity:0},openc.TICKER_PAUSE-openc.TICKER_START_FADE).animate({opacity:0.99},openc.TICKER_START_FADE,"swing")}
openc.ticker.nextItteration=function(state){var tickerIterator=openc.ticker.closeItteration(state);state.counter+=1;setTimeout(tickerIterator,state.counter==2?openc.TICKER_PAUSE:openc.TICKER_FRAMERATE)}
openc.ticker.closeItteration=function(state){return function(){if(!state.over){state.lis.each(function(i){var li=jq(state.lis[i]);li.width(li.find('a').width()+openc.TICKER_ELEMENT_PADDING_RIGHT);if(state.leftMostIndex==-1){li.css("left",10);state.leftMostIndex=0} if(i==state.leftMostIndex&&(this.offsetLeft+this.offsetWidth)>0){li.css("left",this.offsetLeft-openc.ticker.DELTA_X)} else{var lastIndex=state.lis.length-1;var previousInRoll=(i==0)?jq(state.lis[lastIndex]):jq(state.lis[i-1]);var newLeft=parseInt(previousInRoll.css("left"))+previousInRoll.width();this.style.left=newLeft+"px";if(i==state.leftMostIndex){state.leftMostIndex=(i==lastIndex)?0:i+1}}})}
openc.ticker.nextItteration(state)}}
jq(function(){if(openc.IS_RIA_CLIENT&&openc.IS_DESKTOP){openc.ticker.init()}});

/* - ++resource++openc.vanillatheme.javascripts/forms.js - */
// http://rethink.sita.co.uk/portal_javascripts/++resource++openc.vanillatheme.javascripts/forms.js?original=1
if(window.openc==undefined){openc=new Object()}
if(jq.browser.safari){document.write('<style type="text/css">input:focus{outline: 5px auto #b8cc7d}</style>')}
openc.forms=function(){jq("div#portal-searchbox input:submit, "+"input[@value='Log in'], "+"form[@name=sendto_form] input:submit, "+"span.actionButtons input:submit, "+"div.pfg-form input:submit").each(function(){var button=jq(this);if(!button.parent().hasClass("openc-button")){button.wrapAll('<div class="openc-button"></div>')}});jq("input[type=text]").each(function(){jq(this).addClass("text")});jq("input[type=password]").each(function(){jq(this).addClass("password")});jq("input[type=submit]").each(function(){jq(this).addClass("submit")});jq("input[type=reset]").each(function(){jq(this).addClass("reset")})}
jq(function(){if(openc.IS_EDIT_PAGE){return}
openc.forms()});

/* - ++resource++openc.vanillatheme.javascripts/banners.js - */
// http://rethink.sita.co.uk/portal_javascripts/++resource++openc.vanillatheme.javascripts/banners.js?original=1
openc.BANNER_IMAGE_INTERVAL=5000;openc.BannerFlash=function(target){this.items=new Array();this.target=target}
openc.BannerFlash.prototype.renderRandomItem=function(){var obj=this.items[Math.round((this.items.length-1) * Math.random())];if(!swfobject.hasFlashPlayerVersion(obj.version)){return}
swfobject.embedSWF(obj.src+'/download',this.target.attr('id'),obj.width,obj.height,obj.version,{},{},{wmode:'transparent'})}
openc.BannerFlash.prototype.append=function(obj){this.items.push(obj);if(obj.isLast){this.renderRandomItem()}}
openc.BannerImage=function(target){this.target=target;this.items=new Array();this.visibleItemIndex=0;this.imageCache=new Array();this.linkTo='';this.existingHasLoaded=false;var existing=target.find("div.mask, img");var closeBannerImage=this;existing.load(function(){closeBannerImage.existingHasLoaded=true})
target.prepend(existing);target.find("div.mask").css("z-index",101);target.find("img").css("z-index",100);var href=target.find("a").attr("href");if(href!=undefined){this.setLinkTo(href);target.find("img").attr("alt",href).attr("title",href)}
var bannerImage=this;this.target.click(
function(){bannerImage.onClick()});this.items.push(new openc.BannerImageItem(this,target.find("img"),href));this.timer=setInterval(this.getNextTickerItteration(this),openc.BANNER_IMAGE_INTERVAL)}
openc.BannerImage.prototype.setLinkTo=function(url){this.linkTo=url;this.target.css("cursor","pointer")}
openc.BannerImage.prototype.removeLinkTo=function(){this.linkTo='';this.target.css("cursor","default");this.target.removeAttr("title")}
openc.BannerImage.prototype.onClick=function(){if(this.linkTo.length>0){window.location.href=this.linkTo}}
openc.BannerImage.prototype.getNextTickerItteration=function(bannerImage){return function(){if(!bannerImage.existingHasLoaded){return}
var nextItemIndex=bannerImage.visibleItemIndex+1;while(!(bannerImage.items[nextItemIndex]&&bannerImage.items[nextItemIndex].imgLoaded)){nextItemIndex=nextItemIndex==bannerImage.items.length?0:bannerImage.visibleItemIndex+1}
bannerImage.items[nextItemIndex].onBeforeReveal();bannerImage.items[bannerImage.visibleItemIndex].fadeOutOver(bannerImage.items[nextItemIndex]);bannerImage.visibleItemIndex=nextItemIndex}}
openc.BannerImage.prototype.append=function(obj){var img=jq('<img style="z-index:1" src="'+obj.src+'" width="'+obj.width+'" height="'+obj.height+'" alt="'+(obj.link!=''?obj.link:obj.alt)+'" title="'+(obj.link!=''?obj.link:obj.alt)+'"/>');this.target.append(img);var href=(obj.link.length>0)?obj.link:undefined;this.items.push(new openc.BannerImageItem(this,img,href))}
openc.BannerImageItem=function(parent,img,link){this.parent=parent;this.img=img;this.link=link||'';this.imgLoaded=false;var src=img.attr("src");var cache=new Image();parent.imageCache.push(cache);var bannerImageItem=this;cache.onload=function(){bannerImageItem.imgLoaded=true};cache.src=img.attr("src")}
openc.BannerImageItem.prototype.onBeforeReveal=function(){this.img.css("z-index",99)}
openc.BannerImageItem.prototype.fadeOutOver=function(itemUnderneath){var bannerImageItem=this;var closure=function(){bannerImageItem.onAfterFadeOutOver();itemUnderneath.onAfterReveal()}
this.img.animate({opacity:0},2000,closure)}
openc.BannerImageItem.prototype.onAfterFadeOutOver=function(){this.img.css("z-index",1)
this.img.css('opacity',0.99)}
openc.BannerImageItem.prototype.onAfterReveal=function(){this.img.css("z-index",100)
if(this.link!=''){this.parent.setLinkTo(this.link)} else{this.parent.removeLinkTo()}}


/* - ++resource++openc.vanillatheme.javascripts/misc.js - */
// http://rethink.sita.co.uk/portal_javascripts/++resource++openc.vanillatheme.javascripts/misc.js?original=1
openc.addLinkClasses=function(){var linkSelector='a[@href$=.pdf], a[@href$=.doc], a[@href$=.xls]';jq(linkSelector).not(jq('div.FeaturedLink a')).each(function(){jq(this).contents().wrapAll('<span class="'+jq(this).attr('href').replace(/.+\.([a-zA-Z]{3}$)/,'$1').toLowerCase()+'"></span>')});jq('div#portal-column-content ul, div.links-portlet ul').each(function(){var containsOnlyLinks=true;jq(this).find('li').each(function(){openc.removeWhitespace(this);if(this.childNodes.length!=jq(this).find(linkSelector).length){containsOnlyLinks=false}});if(containsOnlyLinks){jq(this).addClass('links-list')}})}
jq(function(){if(openc.IS_RIA_CLIENT&&!openc.IS_EDIT_PAGE&&openc.IS_DESKTOP){openc.addLinkClasses()}});openc.equalHeightColumns=function(){var columns=new Array();var c1=jq('div#portal-column-one');var c2=jq('div#portal-column-two');var c3=jq('div#portal-column-content');if(c1[0]){columns.push(c1)}
if(c2[0]){columns.push(c2)}
if(c3[0]){columns.push(c3)}
var greatestOffsetBottom=0;var offsetOptions={padding:true};for(var i=0 ;i<columns.length ;i++){var offsetBottom=columns[i].offset(offsetOptions).top+columns[i].height();greatestOffsetBottom=Math.max(greatestOffsetBottom,offsetBottom)}
openc.log("*"+greatestOffsetBottom);for(var i=0 ;i<columns.length ;i++){openc.log(greatestOffsetBottom+"-"+columns[i].height()+" - "+columns[i].offset(offsetOptions).top);openc.log(greatestOffsetBottom-columns[i].height()-columns[i].offset(offsetOptions).top);columns[i].css("background","red")}}
jq(function(){if(openc.IS_RIA_CLIENT&&!openc.IS_EDIT_PAGE&&openc.IS_DESKTOP){return}});

/* - ++resource++sitaedu.theme.javascripts/sifr.js - */
// http://rethink.sita.co.uk/portal_javascripts/++resource++sitaedu.theme.javascripts/sifr.js?original=1
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="408";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(c){function d(e){return e.toLocaleUpperCase()}this.normalize=function(e){return e.replace(/\n|\r|\xA0/g,D.SINGLE_WHITESPACE).replace(/\s+/g,D.SINGLE_WHITESPACE)};this.textTransform=function(e,f){switch(e){case"uppercase":return f.toLocaleUpperCase();case"lowercase":return f.toLocaleLowerCase();case"capitalize":return f.replace(/^\w|\s\w/g,d)}return f};this.toHexString=function(e){if(e.charAt(0)!="#"||e.length!=4&&e.length!=7){return e}e=e.substring(1);return"0x"+(e.length==3?e.replace(/(.)(.)(.)/,"$1$1$2$2$3$3"):e)};this.toJson=function(g,f){var e="";switch(typeof (g)){case"string":e='"'+f(g)+'"';break;case"number":case"boolean":e=g.toString();break;case"object":e=[];for(var h in g){if(g[h]==Object.prototype[h]){continue}e.push('"'+h+'":'+this.toJson(g[h]))}e="{"+e.join(",")+"}";break}return e};this.convertCssArg=function(e){if(!e){return{}}if(typeof (e)=="object"){if(e.constructor==Array){e=e.join("")}else{return e}}var l={};var m=e.split("}");for(var h=0;h<m.length;h++){var k=m[h].match(/([^\s{]+)\s*\{(.+)\s*;?\s*/);if(!k||k.length!=3){continue}if(!l[k[1]]){l[k[1]]={}}var g=k[2].split(";");for(var f=0;f<g.length;f++){var n=g[f].match(/\s*([^:\s]+)\s*\:\s*([^;]+)/);if(!n||n.length!=3){continue}l[k[1]][n[1]]=n[2].replace(/\s+$/,"")}}return l};this.extractFromCss=function(g,f,i,e){var h=null;if(g&&g[f]&&g[f][i]){h=g[f][i];if(e){delete g[f][i]}}return h};this.cssToString=function(f){var g=[];for(var e in f){var j=f[e];if(j==Object.prototype[e]){continue}g.push(e,"{");for(var i in j){if(j[i]==Object.prototype[i]){continue}var h=j[i];if(D.UNIT_REMOVAL_PROPERTIES[i]){h=parseInt(h,10)}g.push(i,":",h,";")}g.push("}")}return g.join("")};this.escape=function(e){return escape(e).replace(/\+/g,"%2B")};this.encodeVars=function(e){return e.join("&").replace(/%/g,"%25")};this.copyProperties=function(g,f){for(var e in g){if(f[e]===undefined){f[e]=g[e]}}return f};this.domain=function(){var f="";try{f=document.domain}catch(g){}return f};this.domainMatches=function(h,g){if(g=="*"||g==h){return true}var f=g.lastIndexOf("*");if(f>-1){g=g.substr(f+1);var e=h.lastIndexOf(g);if(e>-1&&(e+g.length)==h.length){return true}}return false};this.uriEncode=function(e){return encodeURI(decodeURIComponent(e))};this.delay=function(f,h,g){var e=Array.prototype.slice.call(arguments,3);setTimeout(function(){h.apply(g,e)},f)}}D.UNIT_REMOVAL_PROPERTIES={leading:true,"margin-left":true,"margin-right":true,"text-indent":true};D.SINGLE_WHITESPACE=" ";function U(e){var d=this;function c(g,j,h){var k=d.getStyleAsInt(g,j,e.ua.ie);if(k==0){k=g[h];for(var f=3;f<arguments.length;f++){k-=d.getStyleAsInt(g,arguments[f],true)}}return k}this.getBody=function(){return document.getElementsByTagName("body")[0]||null};this.querySelectorAll=function(f){return window.parseSelector(f)};this.addClass=function(f,g){if(g){g.className=((g.className||"")==""?"":g.className+" ")+f}};this.removeClass=function(f,g){if(g){g.className=g.className.replace(new RegExp("(^|\\s)"+f+"(\\s|$)"),"").replace(/^\s+|(\s)\s+/g,"$1")}};this.hasClass=function(f,g){return new RegExp("(^|\\s)"+f+"(\\s|$)").test(g.className)};this.hasOneOfClassses=function(h,g){for(var f=0;f<h.length;f++){if(this.hasClass(h[f],g)){return true}}return false};this.ancestorHasClass=function(g,f){g=g.parentNode;while(g&&g.nodeType==1){if(this.hasClass(f,g)){return true}g=g.parentNode}return false};this.create=function(f,g){var h=document.createElementNS?document.createElementNS(U.XHTML_NS,f):document.createElement(f);if(g){h.className=g}return h};this.getComputedStyle=function(h,i){var f;if(document.defaultView&&document.defaultView.getComputedStyle){var g=document.defaultView.getComputedStyle(h,null);f=g?g[i]:null}else{if(h.currentStyle){f=h.currentStyle[i]}}return f||""};this.getStyleAsInt=function(g,i,f){var h=this.getComputedStyle(g,i);if(f&&!/px$/.test(h)){return 0}return parseInt(h)||0};this.getWidthFromStyle=function(f){return c(f,"width","offsetWidth","paddingRight","paddingLeft","borderRightWidth","borderLeftWidth")};this.getHeightFromStyle=function(f){return c(f,"height","offsetHeight","paddingTop","paddingBottom","borderTopWidth","borderBottomWidth")};this.getDimensions=function(j){var h=j.offsetWidth;var f=j.offsetHeight;if(h==0||f==0){for(var g=0;g<j.childNodes.length;g++){var k=j.childNodes[g];if(k.nodeType!=1){continue}h=Math.max(h,k.offsetWidth);f=Math.max(f,k.offsetHeight)}}return{width:h,height:f}};this.getViewport=function(){return{width:window.innerWidth||document.documentElement.clientWidth||this.getBody().clientWidth,height:window.innerHeight||document.documentElement.clientHeight||this.getBody().clientHeight}};this.blurElement=function(g){try{g.blur();return }catch(h){}var f=this.create("input");f.style.width="0px";f.style.height="0px";g.parentNode.appendChild(f);f.focus();f.blur();f.parentNode.removeChild(f)}}U.XHTML_NS="http://www.w3.org/1999/xhtml";function H(m){var d=navigator.userAgent.toLowerCase();var l=(navigator.product||"").toLowerCase();var f=navigator.platform.toLowerCase();this.parseVersion=H.parseVersion;this.macintosh=/^mac/.test(f);this.windows=/^win/.test(f);this.quicktime=false;this.opera=/opera/.test(d);this.konqueror=/konqueror/.test(l);this.ie=false/*@cc_on||true@*/;this.ieSupported=this.ie&&!/ppc|smartphone|iemobile|msie\s5\.5/.test(d)/*@cc_on&&@_jscript_version>=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(d);this.webkit=!this.konqueror&&/applewebkit/.test(d);this.khtml=this.webkit||this.konqueror;this.gecko=!this.webkit&&l=="gecko";this.ieVersion=this.ie&&/.*msie\s(\d\.\d)/.exec(d)?this.parseVersion(RegExp.$1):"0";this.operaVersion=this.opera&&/.*opera(\s|\/)(\d+\.\d+)/.exec(d)?this.parseVersion(RegExp.$2):"0";this.webkitVersion=this.webkit&&/.*applewebkit\/(\d+).*/.exec(d)?this.parseVersion(RegExp.$1):"0";this.geckoVersion=this.gecko&&/.*rv:\s*([^\)]+)\)\s+gecko/.exec(d)?this.parseVersion(RegExp.$1):"0";this.konquerorVersion=this.konqueror&&/.*konqueror\/([\d\.]+).*/.exec(d)?this.parseVersion(RegExp.$1):"0";this.flashVersion=0;if(this.ieWin){var h;var k=false;try{h=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(j){try{h=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");this.flashVersion=this.parseVersion("6");h.AllowScriptAccess="always"}catch(j){k=this.flashVersion==this.parseVersion("6")}if(!k){try{h=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(j){}}}if(!k&&h){this.flashVersion=this.parseVersion(/([\d,?]+)/.exec(h.GetVariable("$version"))[1].replace(/,/g,"."))}}else{if(navigator.plugins&&navigator.plugins["Shockwave Flash"]){this.flashVersion=this.parseVersion(navigator.plugins["Shockwave Flash"].description.replace(/\D*(\d+\.?\d*)\s*r(\d+)/,"$1$2"));var g=0;while(this.flashVersion>=H.MIN_FLASH_VERSION&&g<navigator.mimeTypes.length){var c=navigator.mimeTypes[g];if(c.type=="application/x-shockwave-flash"&&c.enabledPlugin.description.toLowerCase().indexOf("quicktime")>-1){this.flashVersion=this.parseVersion("0");this.quicktime=true}g++}}}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("523");this.properDocument=typeof (document.location)=="object";this.supported=this.flash&&this.properDocument&&(!this.ie||this.ieSupported)&&this.computedStyleSupport&&(!this.opera||this.operaVersion>=this.parseVersion("9.50"))&&(!this.webkit||this.webkitVersion>=this.parseVersion("412"))&&(!this.gecko||this.geckoVersion>=this.parseVersion("1.8.0.12"))&&(!this.konqueror)}H.parseVersion=function(c){return c.replace(/(^|\D)(\d)(?=\D|$)/g,"$10000$2")};H.MIN_FLASH_VERSION=H.parseVersion("8");function F(c){this.fix=c.ua.ieWin&&window.location.hash!="";var d;this.cache=function(){d=document.title};function e(){document.title=d}this.restore=function(){if(this.fix){setTimeout(e,0)}}}function S(f){var j=null;function g(){try{if(f.ua.ie||document.readyState!="loaded"&&document.readyState!="complete"){document.documentElement.doScroll("left")}}catch(k){return setTimeout(g,10)}c()}function c(){if(f.useStyleCheck){e()}else{if(!f.ua.mustCheckStyle){h(null,true)}}}function e(){j=f.dom.create("div",E.DUMMY);f.dom.getBody().appendChild(j);d()}function d(){if(f.dom.getComputedStyle(j,"marginLeft")=="42px"){i()}else{setTimeout(d,10)}}function i(){if(j&&j.parentNode){j.parentNode.removeChild(j)}j=null;h(null,true)}function h(k,l){f.initialize(l);if(k&&k.type=="load"){if(document.removeEventListener){document.removeEventListener("DOMContentLoaded",h,false)}if(window.removeEventListener){window.removeEventListener("load",h,false)}}}this.attach=function(){if(window.addEventListener){window.addEventListener("load",h,false)}else{window.attachEvent("onload",h)}if(!f.useDomLoaded||f.ua.forcePageLoad||f.ua.ie&&window.top!=window){return }if(f.ua.nativeDomLoaded){document.addEventListener("DOMContentLoaded",c,false)}else{if(f.ua.ie||f.ua.khtml){g()}}}}var Q="sifrFetch";function N(c){var e=false;this.fetchMovies=function(f){if(c.setPrefetchCookie&&new RegExp(";?"+Q+"=true;?").test(document.cookie)){return }try{e=true;d(f)}catch(g){if(c.debug){throw g}}if(c.setPrefetchCookie){document.cookie=Q+"=true;path="+c.cookiePath}};this.clear=function(){if(!e){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 d(f){for(var g=0;g<f.length;g++){document.write('<script defer type="sifr/prefetch" src="'+f[g].src+'"><\/script>')}}}function b(e){var g=e.ua.ie;var f=g&&e.ua.flashVersion<e.ua.parseVersion("9.0.115");var d={};var c={};this.register=function(h){if(!g){return }var i=h.id;c[i]=h;delete d[i];if(f){window[i]=h}};this.reset=function(){if(!g){return false}for(var j=0;j<e.replacements.length;j++){var h=e.replacements[j];var k=c[h.id];if(!d[h.id]&&(!k.parentNode||k.parentNode.nodeType==11)){h.resetMovie();d[h.id]=true}}return true}}function K(d,g,f,c,e){this.sIFR=d;this.id=g;this.vars=f;this.movie=null;this.__forceWidth=c;this.__events=e;this.__resizing=0}K.prototype={getFlashElement:function(){return document.getElementById(this.id)},getAlternate:function(){return document.getElementById(this.id+"_alternate")},getAncestor:function(){var c=this.getFlashElement().parentNode;return !this.sIFR.dom.hasClass(E.FIX_FOCUS,c)?c:c.parentNode},available:function(){var c=this.getFlashElement();return c&&c.parentNode},call:function(c){var d=this.getFlashElement();return Function.prototype.apply.call(d[c],d,Array.prototype.slice.call(arguments,1))},attempt:function(){if(!this.available()){return false}try{this.call.apply(this,arguments)}catch(c){if(this.sIFR.debug){throw c}return false}return true},updateVars:function(c,e){for(var d=0;d<this.vars.length;d++){if(this.vars[d].split("=")[0]==c){this.vars[d]=c+"="+e;break}}var f=this.sIFR.util.encodeVars(this.vars);this.movie.injectVars(this.getFlashElement(),f);this.movie.injectVars(this.movie.html,f)},storeSize:function(c,d){this.movie.setSize(c,d);this.updateVars(c,d)},fireEvent:function(c){if(this.available()&&this.__events[c]){this.sIFR.util.delay(0,this.__events[c],this,this)}},resizeFlashElement:function(c,d,e){if(!this.available()){return }this.__resizing++;var f=this.getFlashElement();f.setAttribute("height",c);this.updateVars("renderheight",c);this.storeSize("height",c);if(d!==null){f.setAttribute("width",d);this.movie.setSize("width",d)}if(this.__events.onReplacement){this.sIFR.util.delay(0,this.__events.onReplacement,this,this);delete this.__events.onReplacement}if(e){this.sIFR.util.delay(0,function(){this.attempt("scaleMovie");this.__resizing--},this)}else{this.__resizing--}},blurFlashElement:function(){if(this.available()){this.sIFR.dom.blurElement(this.getFlashElement())}},resetMovie:function(){this.sIFR.util.delay(0,this.movie.reset,this.movie,this.getFlashElement(),this.getAlternate())},resizeAfterScale:function(){if(this.available()&&this.__resizing==0){this.sIFR.util.delay(0,this.resize,this)}},resize:function(){if(!this.available()){return }this.__resizing++;var g=this.getFlashElement();var f=g.offsetWidth;if(f==0){return }var e=g.getAttribute("width");var l=g.getAttribute("height");var m=this.getAncestor();var o=this.sIFR.dom.getHeightFromStyle(m);g.style.width="1px";g.style.height="1px";m.style.minHeight=o+"px";var c=this.getAlternate().childNodes;var n=[];for(var k=0;k<c.length;k++){var h=c[k].cloneNode(true);n.push(h);m.appendChild(h)}var d=this.sIFR.dom.getWidthFromStyle(m);for(var k=0;k<n.length;k++){m.removeChild(n[k])}g.style.width=g.style.height=m.style.minHeight="";g.setAttribute("width",this.__forceWidth?d:e);g.setAttribute("height",l);if(sIFR.ua.ie){g.style.display="none";var j=g.offsetHeight;g.style.display=""}if(d!=f){if(this.__forceWidth){this.storeSize("width",d)}this.attempt("resize",d)}this.__resizing--},replaceText:function(g,j){var d=this.sIFR.util.escape(g);if(!this.attempt("replaceText",d)){return false}this.updateVars("content",d);var f=this.getAlternate();if(j){while(f.firstChild){f.removeChild(f.firstChild)}for(var c=0;c<j.length;c++){f.appendChild(j[c])}}else{try{f.innerHTML=g}catch(h){}}return true},changeCSS:function(c){c=this.sIFR.util.escape(this.sIFR.util.cssToString(this.sIFR.util.convertCssArg(c)));this.updateVars("css",c);return this.attempt("changeCSS",c)}};var X=new function(){this.create=function(p,n,j,i,f,e,g,o,l,h,m){var k=p.ua.ie?d:c;return new k(p,n,j,i,f,e,g,o,["flashvars",l,"wmode",h,"bgcolor",m,"allowScriptAccess","always","quality","best"])};function c(s,q,l,h,f,e,g,r,n){var m=s.dom.create("object",E.FLASH);var p=["type","application/x-shockwave-flash","id",f,"name",f,"data",e,"width",g,"height",r];for(var o=0;o<p.length;o+=2){m.setAttribute(p[o],p[o+1])}var j=m;if(h){j=W.create("div",E.FIX_FOCUS);j.appendChild(m)}for(var o=0;o<n.length;o+=2){if(n[o]=="name"){continue}var k=W.create("param");k.setAttribute("name",n[o]);k.setAttribute("value",n[o+1]);m.appendChild(k)}while(l.firstChild){l.removeChild(l.firstChild)}l.appendChild(j);this.html=j.cloneNode(true)}c.prototype={reset:function(e,f){e.parentNode.replaceChild(this.html.cloneNode(true),e)},setSize:function(e,f){this.html.setAttribute(e,f)},injectVars:function(e,g){var h=e.getElementsByTagName("param");for(var f=0;f<h.length;f++){if(h[f].getAttribute("name")=="flashvars"){h[f].setAttribute("value",g);break}}}};function d(p,n,j,h,f,e,g,o,k){this.dom=p.dom;this.broken=n;this.html='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="'+f+'" width="'+g+'" height="'+o+'" class="'+E.FLASH+'"><param name="movie" value="'+e+'"></param></object>';var m="";for(var l=0;l<k.length;l+=2){m+='<param name="'+k[l]+'" value="'+k[l+1]+'"></param>'}this.html=this.html.replace(/(<\/object>)/,m+"$1");j.innerHTML=this.html;this.broken.register(j.firstChild)}d.prototype={reset:function(f,g){g=g.cloneNode(true);var e=f.parentNode;e.innerHTML=this.html;this.broken.register(e.firstChild);e.appendChild(g)},setSize:function(e,f){this.html=this.html.replace(e=="height"?/(height)="\d+"/:/(width)="\d+"/,'$1="'+f+'"')},injectVars:function(e,f){if(e!=this.html){return }this.html=this.html.replace(/(flashvars(=|\"\svalue=)\")[^\"]+/,"$1"+f)}}};this.errors=new Y(O);var A=this.util=new D(O);var W=this.dom=new U(O);var T=this.ua=new H(O);var G={fragmentIdentifier:new F(O),pageLoad:new S(O),prefetch:new N(O),brokenFlashIE:new b(O)};this.__resetBrokenMovies=G.brokenFlashIE.reset;var J={kwargs:[],replaceAll:function(d){for(var c=0;c<this.kwargs.length;c++){O.replace(this.kwargs[c])}if(!d){this.kwargs=[]}}};this.activate=function(){if(!T.supported||!this.isEnabled||this.isActive||!C()||a()){return }if(T.requiresPrefetch){G.prefetch.fetchMovies(arguments)}this.isActive=true;this.setFlashClass();G.fragmentIdentifier.cache();if(!this.autoInitialize){return }G.pageLoad.attach();if(T.ie){window.attachEvent("onunload",function(){W.addClass(E.UNLOADING,document.documentElement)})}};this.setFlashClass=function(){if(this.hasFlashClassSet){return }W.addClass(E.ACTIVE,W.getBody()||document.documentElement);this.hasFlashClassSet=true};this.removeFlashClass=function(){if(!this.hasFlashClassSet){return }W.removeClass(E.ACTIVE,W.getBody());W.removeClass(E.ACTIVE,document.documentElement);this.hasFlashClassSet=false};this.initialize=function(c){if(!this.isActive||!this.isEnabled){return }if(R){if(!c){J.replaceAll(false)}return }R=true;J.replaceAll(c);if(O.repaintOnResize){if(window.addEventListener){window.addEventListener("resize",Z,false)}else{window.attachEvent("onresize",Z)}}G.prefetch.clear()};this.replace=function(w,t){if(!T.supported){return }if(t){w=A.copyProperties(w,t)}if(!R){return J.kwargs.push(w)}if(this.onReplacementStart){this.onReplacementStart(w)}var AL=w.elements||W.querySelectorAll(w.selector);if(AL.length==0){return }var v=M(w.src);var AQ=A.convertCssArg(w.css);var u=B(w.filters);var AM=w.forceSingleLine===true;var AR=w.preventWrap===true&&!AM;var p=AM||(w.fitExactly==null?this.fitExactly:w.fitExactly)===true;var AC=p||(w.forceWidth==null?this.forceWidth:w.forceWidth)===true;var r=w.ratios||[];var AD=w.pixelFont===true;var q=parseInt(w.tuneHeight)||0;var y=!!w.onRelease||!!w.onRollOver||!!w.onRollOut;if(p){A.extractFromCss(AQ,".sIFR-root","text-align",true)}var s=A.extractFromCss(AQ,".sIFR-root","font-size",true)||"0";var e=A.extractFromCss(AQ,".sIFR-root","background-color",true)||"#FFFFFF";var n=A.extractFromCss(AQ,".sIFR-root","kerning",true)||"";var AV=A.extractFromCss(AQ,".sIFR-root","opacity",true)||"100";var k=A.extractFromCss(AQ,".sIFR-root","cursor",true)||"default";var AO=parseInt(A.extractFromCss(AQ,".sIFR-root","leading"))||0;var AI=w.gridFitType||(A.extractFromCss(AQ,".sIFR-root","text-align")=="right")?"subpixel":"pixel";var h=this.forceTextTransform===false?"none":A.extractFromCss(AQ,".sIFR-root","text-transform",true)||"none";s=/^\d+(px)?$/.test(s)?parseInt(s):0;AV=parseFloat(AV)<1?100*parseFloat(AV):AV;var AB=w.modifyCss?"":A.cssToString(AQ);var AF=w.wmode||"";if(!AF){if(w.transparent){AF="transparent"}else{if(w.opaque){AF="opaque"}}}if(AF=="transparent"){if(!T.transparencySupport){AF="opaque"}else{e="transparent"}}for(var AU=0;AU<AL.length;AU++){var AE=AL[AU];if(W.hasOneOfClassses(E.IGNORE_CLASSES,AE)||W.ancestorHasClass(AE,E.ALTERNATE)){continue}var AN=W.getDimensions(AE);var f=AN.height;var c=AN.width;var z=W.getComputedStyle(AE,"display");if(!f||!c||!z||z=="none"){continue}c=W.getWidthFromStyle(AE);var m,AG;if(!s){var AK=I(AE);m=Math.min(this.MAX_FONT_SIZE,Math.max(this.MIN_FONT_SIZE,AK.fontSize));if(AD){m=Math.max(8,8*Math.round(m/8))}AG=AK.lines;if(isNaN(AG)||!isFinite(AG)||AG==0){AG=1}if(AG>1&&AO){f+=Math.round((AG-1)*AO)}}else{m=s;AG=1}var d=W.create("span",E.ALTERNATE);var AW=AE.cloneNode(true);AE.parentNode.appendChild(AW);for(var AT=0,AS=AW.childNodes.length;AT<AS;AT++){d.appendChild(AW.childNodes[AT].cloneNode(true))}if(w.modifyContent){w.modifyContent(AW,w.selector)}if(w.modifyCss){AB=w.modifyCss(AQ,AW,w.selector)}var o=P(AW,h,w.uriEncode);AW.parentNode.removeChild(AW);if(w.modifyContentString){o.text=w.modifyContentString(o.text,w.selector)}if(o.text==""){continue}f=Math.round(AG*m);var AJ=Math.round(AG*V(m,r)*m)+this.FLASH_PADDING_BOTTOM+q;var AA=AC?c:"100%";var AH="sIFR_replacement_"+L++;var AP=["id="+AH,"content="+A.escape(o.text),"width="+c,"height="+f,"renderheight="+AJ,"link="+A.escape(o.primaryLink.href||""),"target="+A.escape(o.primaryLink.target||""),"size="+m,"css="+A.escape(AB),"cursor="+k,"tunewidth="+(w.tuneWidth||0),"tuneheight="+q,"offsetleft="+(w.offsetLeft||""),"offsettop="+(w.offsetTop||""),"fitexactly="+p,"preventwrap="+AR,"forcesingleline="+AM,"antialiastype="+(w.antiAliasType||""),"thickness="+(w.thickness||""),"sharpness="+(w.sharpness||""),"kerning="+n,"gridfittype="+AI,"flashfilters="+u,"opacity="+AV,"blendmode="+(w.blendMode||""),"selectable="+(w.selectable==null?"true":w.selectable===true),"fixhover="+(this.fixHover===true),"events="+y,"version="+this.VERSION];var x=A.encodeVars(AP);var g=new K(O,AH,AP,AC,{onReplacement:w.onReplacement,onRollOver:w.onRollOver,onRollOut:w.onRollOut,onRelease:w.onRelease});g.movie=X.create(sIFR,G.brokenFlashIE,AE,T.fixFocus&&w.fixFocus,AH,v,AA,AJ,x,AF,e);this.replacements.push(g);this.replacements[AH]=g;if(w.selector){if(!this.replacements[w.selector]){this.replacements[w.selector]=[g]}else{this.replacements[w.selector].push(g)}}d.setAttribute("id",AH+"_alternate");AE.appendChild(d);W.addClass(E.REPLACED,AE)}G.fragmentIdentifier.restore()};this.getReplacementByFlashElement=function(d){for(var c=0;c<O.replacements.length;c++){if(O.replacements[c].id==d.getAttribute("id")){return O.replacements[c]}}};this.redraw=function(){for(var c=0;c<O.replacements.length;c++){O.replacements[c].resetMovie()}};function C(){if(O.domains.length==0){return true}var d=A.domain();for(var c=0;c<O.domains.length;c++){if(A.domainMatches(d,O.domains[c])){return true}}return false}function a(){if(document.location.protocol=="file:"){if(O.debug){O.errors.fire("isFile")}return true}return false}function M(c){if(T.ie&&c.charAt(0)=="/"){c=window.location.toString().replace(/([^:]+)(:\/?\/?)([^\/]+).*/,"$1$2$3")+c}return c}function V(d,e){for(var c=0;c<e.length;c+=2){if(d<=e[c]){return e[c+1]}}return e[e.length-1]||1}function B(g){var e=[];for(var d in g){if(g[d]==Object.prototype[d]){continue}var c=g[d];d=[d.replace(/filter/i,"")+"Filter"];for(var f in c){if(c[f]==Object.prototype[f]){continue}d.push(f+":"+A.escape(A.toJson(c[f],A.toHexString)))}e.push(d.join(","))}return A.escape(e.join(";"))}function Z(d){var e=Z.viewport;var c=W.getViewport();if(e&&c.width==e.width&&c.height==e.height){return }Z.viewport=c;if(O.replacements.length==0){return }if(Z.timer){clearTimeout(Z.timer)}Z.timer=setTimeout(function(){delete Z.timer;for(var f=0;f<O.replacements.length;f++){O.replacements[f].resize()}},200)}function I(g){var h,d;if(!T.ie){h=W.getStyleAsInt(g,"lineHeight");d=Math.floor(W.getStyleAsInt(g,"height")/h)}else{if(T.ie){var h=W.getComputedStyle(g,"fontSize");if(h.indexOf("px")>0){h=parseInt(h)}else{var f=g.innerHTML;g.style.visibility="visible";g.style.overflow="visible";g.style.position="static";g.style.zoom="normal";g.style.writingMode="lr-tb";g.style.width=g.style.height="auto";g.style.maxWidth=g.style.maxHeight=g.style.styleFloat="none";var i=g;var c=g.currentStyle.hasLayout;if(c){g.innerHTML='<div class="'+E.LAYOUT+'">X<br>X<br>X</div>';i=g.firstChild}else{g.innerHTML="X<br>X<br>X"}var e=i.getClientRects();h=e[1].bottom-e[1].top;h=Math.ceil(h*0.8);if(c){g.innerHTML='<div class="'+E.LAYOUT+'">'+f+"</div>";i=g.firstChild}else{g.innerHTML=f}e=i.getClientRects();d=e.length;if(c){g.innerHTML=f}g.style.visibility=g.style.width=g.style.height=g.style.maxWidth=g.style.maxHeight=g.style.overflow=g.style.styleFloat=g.style.position=g.style.zoom=g.style.writingMode=""}}}return{fontSize:h,lines:d}}function P(c,g,s){s=s||A.uriEncode;var q=[],m=[];var k=null;var e=c.childNodes;var o=false,p=false;var j=0;while(j<e.length){var f=e[j];if(f.nodeType==3){var t=A.textTransform(g,A.normalize(f.nodeValue)).replace(/</g,"&lt;");if(o&&p){t=t.replace(/^\s+/,"")}m.push(t);o=/\s$/.test(t);p=false}if(f.nodeType==1&&!/^(style|script)$/i.test(f.nodeName)){var h=[];var r=f.nodeName.toLowerCase();var n=f.className||"";if(/\s+/.test(n)){if(n.indexOf(E.CLASS)>-1){n=n.match("(\\s|^)"+E.CLASS+"-([^\\s$]*)(\\s|$)")[2]}else{n=n.match(/^([^\s]+)/)[1]}}if(n!=""){h.push('class="'+n+'"')}if(r=="a"){var d=s(f.getAttribute("href")||"");var l=f.getAttribute("target")||"";h.push('href="'+d+'"','target="'+l+'"');if(!k){k={href:d,target:l}}}m.push("<"+r+(h.length>0?" ":"")+h.join(" ")+">");p=true;if(f.hasChildNodes()){q.push(j);j=0;e=f.childNodes;continue}else{if(!/^(br|img)$/i.test(f.nodeName)){m.push("</",f.nodeName.toLowerCase(),">")}}}if(q.length>0&&!f.nextSibling){do{j=q.pop();e=f.parentNode.parentNode.childNodes;f=e[j];if(f){m.push("</",f.nodeName.toLowerCase(),">")}}while(j==e.length-1&&q.length>0)}j++}return{text:m.join("").replace(/^\s+|\s+$|\s*(<br>)\s*/g,"$1"),primaryLink:k||{}}}};var parseSelector=(function(){var B=/\s*,\s*/;var A=/\s*([\s>+~(),]|^|$)\s*/g;var L=/([\s>+~,]|[^(]\+|^)([#.:@])/g;var F=/(^|\))[^\s>+~]/g;var M=/(\)|^)/;var K=/[\s#.:>+~()@]|[^\s#.:>+~()@]+/g;function H(R,P){P=P||document.documentElement;var S=R.split(B),X=[];for(var U=0;U<S.length;U++){var N=[P],W=G(S[U]);for(var T=0;T<W.length;){var Q=W[T++],O=W[T++],V="";if(W[T]=="("){while(W[T++]!=")"&&T<W.length){V+=W[T]}V=V.slice(0,-1)}N=I(N,Q,O,V)}X=X.concat(N)}return X}function G(N){var O=N.replace(A,"$1").replace(L,"$1*$2").replace(F,D);return O.match(K)||[]}function D(N){return N.replace(M,"$1 ")}function I(N,P,Q,O){return(H.selectors[P])?H.selectors[P](N,Q,O):[]}var E={toArray:function(O){var N=[];for(var P=0;P<O.length;P++){N.push(O[P])}return N}};var C={isTag:function(O,N){return(N=="*")||(N.toLowerCase()==O.nodeName.toLowerCase())},previousSiblingElement:function(N){do{N=N.previousSibling}while(N&&N.nodeType!=1);return N},nextSiblingElement:function(N){do{N=N.nextSibling}while(N&&N.nodeType!=1);return N},hasClass:function(N,O){return(O.className||"").match("(^|\\s)"+N+"(\\s|$)")},getByTag:function(N,O){return O.getElementsByTagName(N)}};var J={"#":function(N,P){for(var O=0;O<N.length;O++){if(N[O].getAttribute("id")==P){return[N[O]]}}return[]}," ":function(O,Q){var N=[];for(var P=0;P<O.length;P++){N=N.concat(E.toArray(C.getByTag(Q,O[P])))}return N},">":function(O,R){var N=[];for(var Q=0,S;Q<O.length;Q++){S=O[Q];for(var P=0,T;P<S.childNodes.length;P++){T=S.childNodes[P];if(T.nodeType==1&&C.isTag(T,R)){N.push(T)}}}return N},".":function(O,Q){var N=[];for(var P=0,R;P<O.length;P++){R=O[P];if(C.hasClass([Q],R)){N.push(R)}}return N},":":function(N,P,O){return(H.pseudoClasses[P])?H.pseudoClasses[P](N,O):[]}};H.selectors=J;H.pseudoClasses={};H.util=E;H.dom=C;return H})();var lubalinGraphDemi={src:'/++resource++sitaedu.theme.swf/lubalin-graph-demi.swf',ratios:[8,1.42,9,1.33,12,1.35,15,1.3,19,1.28,27,1.27,28,1.25,32,1.26,33,1.24,34,1.25,48,1.24,52,1.23,53,1.24,73,1.23,76,1.22,77,1.23,81,1.22,82,1.23,1.22]};sIFR.activate(lubalinGraphDemi);openc.swifr=function(){if(!(jQuery.browser.safari||jQuery.browser.msie||jQuery.browser.mozilla)){return}
var cssTest=jq('div#global-nav ul li span a:first').css('padding-top');if(parseInt(cssTest)==0){setTimeout(openc.swifr,1);return}
var globalNavAnchors=jq('div#global-nav ul li span').each(function(){var span=jq(this);var a=span.find('a');var anchorPadding=[(parseInt(a.css('padding-top'))-2)+"px",a.css('padding-right'),(parseInt(a.css('padding-bottom'))-2)+"px",a.css('padding-left')];span.css({display:'block',padding:anchorPadding.join(' ')})
span.find('a').css('padding',0).wrap('<div></div>')})
sIFR.replace(lubalinGraphDemi,{selector:'div#global-nav ul li span div',offsetTop:3,wmode:'transparent',css:['.sIFR-root {text-align:center}','a { text-decoration: none; display:block}','a:link { color: #FFFFFF; }','a:hover { color: #FFFFFF; }']});globalNavAnchors=jq('div#global-nav ul li').mouseover(function(){jq(this).addClass('hover')}).mouseout(function(){jq(this).removeClass('hover')})
openc.log(!jq('body').hasClass('edit-page'));if(jq('body').hasClass('public')&&!jq('body').hasClass('edit-page')){sIFR.replace(lubalinGraphDemi,{selector:'h1',css:['.sIFR-root {background-color:#51ac24;color:#FFED00}']})}}


/* - ++resource++sitaedu.theme.javascripts/sitaedu-initialise.js - */
// http://rethink.sita.co.uk/portal_javascripts/++resource++sitaedu.theme.javascripts/sitaedu-initialise.js?original=1
if(window.sitaedu==undefined){sitaedu=new Object()}
openc.pageLocalNavContainer={"/where-it-goes":{append:true,container:"div#content div.inner"},"/where-it-goes/aluminium":{append:true,container:"div#content div.inner"},"/where-it-goes/glass":{append:true,container:"div#content div.inner"},"/where-it-goes/paper":{append:true,container:"div#content div.inner"},"/where-it-goes/plastic":{append:true,container:"div#content div.inner"},"/where-it-goes/composting":{append:true,container:"div#content div.inner"},"/where-it-goes/composting-at-home":{append:true,container:"div#content div.inner"},"/where-it-goes/energy-from-waste":{append:true,container:"div#content div.inner"},"/where-it-goes/landfill":{append:true,container:"div#content div.inner"}}
openc.excludeFromJsonNavigation=["/the-fun-stuff/the-green-team","/the-fun-stuff/quiz"]
sitaedu.onBeforeJsonNavigation=function(){if(/^.+the-green-team$/.test(openc.PATH_TO_PAGE)){jq('body').addClass('the-green-team')}}
openc.eventMediator.addEventListener("beforeJsonNavigation",sitaedu.onBeforeJsonNavigation);sitaedu.onDomLoaded=function(){if(openc.IS_EDIT_PAGE){return}
if(openc.PATH_TO_PAGE=='/where-it-goes'){jq('body').addClass('where-it-goes');jq('h1, div#content div#parent-fieldname-text').wrapAll('<div id="text-content"></div>');jq('div#content img[@alt="where it goes"]').addClass('png').wrap('<div id="image-content"></div>').parent().insertBefore('div#content div#text-content')}}
sitaedu.onAfterObjectFromLink=function(eventObj){if(eventObj.href.match(/green-team\/v\d+w\d+h\d+-main.swf/)){jq("h1").css({position:'absolute',left:'-9999px'})}}
openc.eventMediator.addEventListener("afterObjectFromLink",sitaedu.onAfterObjectFromLink);jq(sitaedu.onDomLoaded);

/* - ++resource++sitaedu.theme.javascripts/journey.js - */
// http://rethink.sita.co.uk/portal_javascripts/++resource++sitaedu.theme.javascripts/journey.js?original=1
function thisMovie(movieName){var isIE=navigator.appName.indexOf("Microsoft")!=-1;return(isIE)?window[movieName]:document[movieName]}
sitaedu.journey=function(){if(!swfobject.hasFlashPlayerVersion('9.0.0')){return}
jq('HTML').addClass('journey-pe');var isJourney=/^\/where-it-goes\/[^\/]+$/.test(openc.PATH_TO_PAGE);if(!isJourney){return}
var journey=openc.PATH_TO_PAGE.replace(/.*\/([^\/]+)/,'$1');jq('div#parent-fieldname-text, div.step').wrapAll('<div id="text-content"></div>');var textContent=jq('div#content div#text-content');sitaedu.journeyStepsList=jq('div#text-content div#parent-fieldname-text').append('<ul id="journey-steps"></ul>').find('ul:last');jq('div#content div.step').each(function(index){var jqThis=jq(this);sitaedu.journeyStepsList.append('<li class="pos'+(index+1)+'">'+jqThis.find('h2').text()+'</li>')});sitaedu.journeyStepsList.find('li').mouseover(sitaedu.onJourneyStepsLiOver).mouseout(sitaedu.onJourneyStepsLiOut).click(sitaedu.onJourneyStepsLiClick);var closure=function(){sitaedu.matchHeightToTallestChild(textContent)}
closure();setInterval(closure,5000);textContent.before('<div id="journeys-swf-container"><div id="journeySwf">,/div></div>');var movie=swfobject.embedSWF('/++resource++sitaedu.theme.swf/journeys/main.swf','journeySwf',462,390,'9.0.0',null,{journey:journey,site:'sitaedu'},{wmode:'transparent',base:'/++resource++sitaedu.theme.swf/journeys'},{})}
sitaedu.onZoomOver=function(stepNumber){sitaedu.journeyStepsList.find('li.pos'+stepNumber).addClass('over')}
sitaedu.onZoomOut=function(stepNumber){sitaedu.journeyStepsList.find('li.pos'+stepNumber).removeClass('over')}
sitaedu.onJourneyStepsLiOver=function(){jq(this).addClass('over')}
sitaedu.onJourneyStepsLiOut=function(){jq(this).removeClass('over')}
sitaedu.onJourneyStepsLiClick=function(){var stepNumber=this.className.replace(/.*pos(\d).*/,'$1');thisMovie('journeySwf').onSelectStep(stepNumber);sitaedu.selectStep(stepNumber)}
sitaedu.onZoomRelease=function(stepNumber){sitaedu.selectStep(stepNumber)}
sitaedu.selectStep=function(stepNumber){jq('div#text-content div#parent-fieldname-text').css('visibility','hidden');var selectedStepDiv=jq('div#text-content div.step:eq('+(stepNumber-1)+')');selectedStepDiv.css('visibility','visible')}
sitaedu.onBackButtonRelease=function(){jq('div#text-content div.step').css('visibility','hidden');jq('div#text-content div#parent-fieldname-text').css('visibility','visible')}
sitaedu.matchHeightToTallestChild=function(element){if(element.height()>2000){var closure=function(){sitaedu.matchHeightToTallestChild(element)}
setTimeout(closure,1);return}
var maxHeight=0;element.children().each(function(){if(jq(this).height()>maxHeight){maxHeight=jq(this).height()}});element.height(maxHeight)}
jq(function(){if(openc.IS_RIA_CLIENT&&!openc.IS_EDIT_PAGE&&openc.IS_DESKTOP){sitaedu.journey()}})


/* - ++resource++sitaedu.theme.javascripts/quiz.js - */
// http://rethink.sita.co.uk/portal_javascripts/++resource++sitaedu.theme.javascripts/quiz.js?original=1
sitaedu.Quiz=function(applicationDiv,startFrame,questionFieldsets,finishFrame,prevButton,nextButton){this._applicationDiv=applicationDiv;this._prevButton=prevButton;this._nextButton=nextButton;this._frames=[];this._questions=[];this._currentFrame=0;var quiz=this;this._frames.push(new sitaedu.QuizFrame(this,startFrame,0));questionFieldsets.each(function(){var newQuestion=new sitaedu.QuizQuestion(quiz,jq(this),quiz.getNumberOfFrames())
quiz._frames.push(newQuestion);quiz._questions.push(newQuestion)})
this._frames.push(new sitaedu.FinishFrame(this,finishFrame,this._frames.length));var pattern=/^.+quiz_f=(\d+).*$/
var documentLocation=document.location.toString();if(pattern.test(documentLocation)){var quiz_f=parseInt(documentLocation.replace(pattern,'$1'));if(quiz_f>=0&&quiz_f<this._frames.length){this._currentFrame=quiz_f}}
this._nextButton.click(function(){return quiz.next()});this._prevButton.click(function(){return quiz.previous()});this._gotoFrame(this._currentFrame);var setHeight=function(){quiz._setApplicationHeight()}
setHeight();setInterval(setHeight,2000)}
sitaedu.Quiz.prototype._setApplicationHeight=function(){var height=0;jq.each(this._frames, function(index,element){height=Math.max(height,element.getHeight())});this._applicationDiv.height(height)}
sitaedu.Quiz.prototype._gotoFrame=function(frame){if(frame>=0&&frame<this._frames.length){this._frames[this._currentFrame].hide();this._currentFrame=frame;this._frames[this._currentFrame].show();if(this._currentFrame==0){this._prevButton.hide()} else{this._prevButton.show()}
if(this._currentFrame==this._frames.length-1){this._nextButton.hide()} else{this._nextButton.show()}}}
sitaedu.Quiz.prototype.next=function(){this._gotoFrame(Math.min(this._currentFrame+1,this._frames.length));return false}
sitaedu.Quiz.prototype.previous=function(){this._gotoFrame(Math.max(this._currentFrame-1,0));return false}
sitaedu.Quiz.prototype.getNumberOfFrames=function(){return this._frames.length}
sitaedu.Quiz.prototype.getUnansweredQuestions=function(){var unansweredQuestions=[];jq.each(this._questions, function(index,question){if(question.getAnswered()===false){unansweredQuestions.push(question)}});return unansweredQuestions}
sitaedu.QuizFrame=function(quiz,element,index){this.quiz=quiz;this.element=element;this.index=index;this.href=openc.PATH_TO_PAGE+'?quiz_f='+index}
sitaedu.QuizFrame.prototype.getHeight=function(){return this.element.height()}
sitaedu.QuizFrame.prototype.show=function(){this.element.css('visibility','visible')}
sitaedu.QuizFrame.prototype.hide=function(){this.element.css('visibility','hidden')}
sitaedu.FinishFrame=function(quiz,element,index){sitaedu.QuizFrame.call(this,quiz,element,index)}
sitaedu.FinishFrame.extend(sitaedu.QuizFrame);sitaedu.FinishFrame.prototype.show=function(){var unansweredQuestions=this.quiz.getUnansweredQuestions();if(unansweredQuestions.length>0){var unansweredQuestionsList='<ul>';jq.each(unansweredQuestions, function(index,question){unansweredQuestionsList+='<li><a href="'+question.href+'">Question '+question.index+'</a></li>'});unansweredQuestionsList+='</ul>';this.element.html('<h2 class="finish">You haven&apos;t finished yet!</h2>'+'<p>Before you can see how you&apos;ve done, please answer these questions:</p>'+unansweredQuestionsList);this.quiz._setApplicationHeight()}
this.element.css('visibility','visible')}
sitaedu.QuizQuestion=function(quiz,element,index){sitaedu.QuizFrame.call(this,quiz,element,index);this._answered=false;this._questionNumber=element.attr('id').toString().replace(/quiz-question-(\d)/,'$1');this._answers=[];var quizQuestion=this;this._type=element.hasClass('quiz-image-question')?'image':'text';if(this._type=='image'){element.find('label img').before('<div class="quiz-image-mask"></div>')}
this.element.find('div.quiz-answer, div.selected-quiz-answer').each(function(){quizQuestion._answers.push(new sitaedu.QuizQuestionAnswer(quizQuestion,jq(this)))})}
sitaedu.QuizQuestion.extend(sitaedu.QuizFrame);sitaedu.QuizQuestion.prototype.getQuestionNumber=function(){return this._questionNumber}
sitaedu.QuizQuestion.prototype.setAnswered=function(answered){this._answered=answered}
sitaedu.QuizQuestion.prototype.getAnswered=function(){return this._answered}
sitaedu.QuizQuestionAnswer=function(quizQuestion,element){this._quizQuestion=quizQuestion;this.element=element;if(this.element.hasClass('selected-quiz-answer')){this._quizQuestion.setAnswered(true)}
this._value=element.find('input:submit').attr('value');this.element.addClass('quiz-answer-'+this._value.toLowerCase());var quizQuestionAnswer=this;this._form=element.find('input:submit')[0].form;element.click(function(){var questionNumber=quizQuestionAnswer.getQuizQuestion().getQuestionNumber();var value=quizQuestionAnswer.getValue();var location=quizQuestionAnswer.getQuizQuestion().href+'&quiz_'+questionNumber+'='+quizQuestionAnswer.getValue();window.location.replace(location);return false})}
sitaedu.QuizQuestionAnswer.prototype.getQuizQuestion=function(){return this._quizQuestion}
sitaedu.QuizQuestionAnswer.prototype.getValue=function(){return this._value}
sitaedu.QuizQuestionAnswer.prototype.getForm=function(){return this._form}
jq(function(){if(openc.IS_RIA_CLIENT&&!openc.IS_EDIT_PAGE&&openc.IS_DESKTOP){if(jq('form#quiz-form').length==1){new sitaedu.Quiz(jq('div#content div.inner>*').wrapAll('<div id="ria-quiz"></div>').parent(),jq('div#ria-quiz>*').not(jq('form#quiz-form')).wrapAll('<div id="quiz-start-frame"></div>').parent(),jq('form#quiz-form fieldset[@id^=quiz-question]'),jq('form#quiz-form fieldset:last'),jq('div#ria-quiz').append('<a href="#" class="quiz-button" id="quiz-prev-button">Previous</a>').find('a#quiz-prev-button'),jq('div#ria-quiz').append('<a href="#" class="quiz-button" id="quiz-next-button">Next</a>').find('a#quiz-next-button'))}}});
