function cuf() { Cufon.replace('.typeface-js', {hover: true,	hoverables: { span: true, a: true, h2: true }}); };//cuf
function ae(f) { var oldonload = window.onload; if (typeof window.onload != "function") { window.onload = f;} else { window.onload = function() { oldonload(); f();}
}
}
function lf(qf) { for (var i=0; i<qf.elements.length; i++) { var element = qf.elements[i]; if (element.type == "submit")continue; if (element.type == "button") continue; if (!element.defaultValue) continue; element.onfocus = function() { if (this.value == this.defaultValue) { this.value = "";}; this.style["borderColor"]='#FF9900';
}
element.onblur = function() { if (this.value == "") { this.value = this.defaultValue;}; this.style["borderColor"]='#D7D8D9';
}
}
}
function ifo() { for (var i=0; i<document.forms.length; i++) { var tf = document.forms[i]; lf(tf);}
}
function eli() { if (!document.getElementsByTagName) return false; var links = document.getElementsByTagName("a"); for (var i=0; i<links.length; i++) { if (links[i].getAttribute("href") && links[i].getAttribute("rel") == "external")
links[i].target = "_blank";}
}//inputs and external

function findimg()
{
var imgs,i;
// Loop through all images, check if they contain the class roll
imgs=document.getElementsByTagName('img');
for(i=0;i<imgs.length;i++)
{
if(/roll/.test(imgs[i].className))
{
// add the function roll to the parent Element of the image
imgs[i].parentNode.onmouseover=function(){roll(this);};
imgs[i].parentNode.onmouseout=function(){roll(this);};
imgs[i].parentNode.onfocus=function(){roll(this);};
imgs[i].parentNode.onblur=function(){roll(this);};
}
}
}
function roll(o)
{
var i,isnode,src,ftype,newsrc,nownode;
// loop through all childNodes
for (i=0;i<o.childNodes.length;i++)
{
nownode=o.childNodes[i];
// if the node is an element and an IMG set the variable and exit the loop
if(nownode.nodeType==1 && /img/i.test(nownode.nodeName))
{
isnode=i;
break;
}
}
// check src and do the rollover
src = o.childNodes[isnode].src;
ftype = src.substring(src.lastIndexOf('.'), src.length);
if(/_on/.test(src))
{
newsrc = src.replace('_on','');
}else{
newsrc = src.replace(ftype, '_on'+ftype);
}
o.childNodes[isnode].src=newsrc;
}//rollover

$(document).ready(function(){
cuf();
ae(eli);
ae(ifo);
findimg();
});
