// Copyright Acro Media Inc. 1998-2009, www.acromediainc.com 

var copyrightYear = {
	init: function(){
		if(document.getElementById('insertYear')) document.getElementById('insertYear').innerHTML = new Date().getFullYear();
	}
}

var externalLinks = {
	init: function(){
		if (!document.getElementsByTagName) return;
		var anchors = document.getElementsByTagName("a");
		for (var i=0; i<anchors.length; i++) {
			if (anchors[i].getAttribute("href") && anchors[i].getAttribute("rel") == "external") anchors[i].target = "_blank";
		}
	}
}

function siteOnload(){
	copyrightYear.init();
	externalLinks.init();
}

function addLoadEvent(func){
	var oldOnLoad = window.onload;
	if(typeof window.onload != 'function'){
		window.onload = func;
	}
	else{
		window.onload = function(){
			oldOnLoad();
			func();
		}
	}
}

addLoadEvent(siteOnload);

// ADD HOVERS
var $j = jQuery.noConflict(); 

$j(function(){
  $j('#prodSearch .bSearch, #rightColNewsletter .bSubscribe').hover(function(){
    $j(this).toggleClass('hover');
  }, function(){
    $j(this).toggleClass('hover'); 
  });
});
