function externalLinks()
{
	if (!document.getElementsByTagName) return;
	
	var anchors = document.getElementsByTagName("a");
	
	for (var i=0; i<anchors.length; i++)
	{
		var anchor = anchors[i];
		if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "blank") anchor.target = "_blank";
	}
}

function init()
{
	var inp=document.getElementsByTagName('input');
	var inpT=document.getElementsByTagName('textarea');
	
	for(var i=0; i<inp.length; i++)
	{
		if(inp[i].type=='text')
		{
			inp[i].setAttribute('rel',inp[i].defaultValue)
			inp[i].onfocus=function()
			{
				if(this.value==this.getAttribute('rel'))
				{
					this.value='';
					this.className = 'focusOn';
				} else {
					return false;
				}
			}
			inp[i].onblur=function()
			{
				if(this.value=='')
				{
					this.value=this.getAttribute('rel');
					this.className = 'focusOff';
				} else {
					return false;
				}
			}
		}
	}
	for(var i=0; i<inpT.length; i++)
	{
		if(inpT[i].type=='textarea')
		{
			inpT[i].setAttribute('rel',inpT[i].defaultValue)
			inpT[i].onfocus=function()
			{
				if(this.value==this.getAttribute('rel'))
				{
					this.value='';
					this.className = 'focusOn';
				} else {
					return false;
				}
			}
			inpT[i].onblur=function()
			{
				if(this.value=='')
				{
					this.value=this.getAttribute('rel');
					this.className = 'focusOff';
				} else {
					return false;
				}
			}
		}
	}
}
jQuery.noConflict();

jQuery(document).ready(function()
{ 
	// if ie6 lets patch it up
    version = parseFloat(navigator.appVersion.split("MSIE")[1]);
    if(version <= 7) {
        jQuery.ie7fixes();
    }
});


jQuery.ie7fixes = function()
{
    //unsupported ie6 css fixes
    jQuery("#whitebar a").css({top:"-10px"});
    jQuery("#main-shadow-left").css({top:"378px"});
	jQuery("#main-shadow-right").css({top:"378px"});
}


