//Roll Over
(function(onLoad) {
	try {
		window.addEventListener('load', onLoad, false);
	} catch (e) {
		window.attachEvent('onload', onLoad);
	}
})(function() {
	var over = function() { this.src = this.src.replace('_off.', '_on.'); };
	var out  = function() { this.src = this.src.replace('_on.', '_off.'); };
	var img = document.getElementsByTagName('img');
	var input = document.getElementsByTagName('input');
	for (var i=0, l=img.length; i<l; i++) {
		if (!img[i].src.match(/_off\./)) continue;
		img[i].onmouseover = over;
		img[i].onmouseout  = out;
	}
	for (var i = 0, l = input.length; i < l; i++) {
		if (!input[i].src.match(/_off\./)) continue;
		input[i].onmouseover = over;
		input[i].onmouseout  = out;
	}
});



//rollover opacity
$(document).ready(function(){
	$(".magItem a img, ul#magSideBanner li a img").hover(function(){$(this).stop().fadeTo(100, 0.8);},function(){$(this).stop().fadeTo(100, 1);});
	$("#dp01").hover(function(){
		$(this).stop().fadeTo(1500, 0);
	},function(){
		$(this).stop().fadeTo(1000, 1.0);
	});
});


// TwitterWindowOpen
function TwitterWindowOpen(hrefURL) {
	var l = Number((window.screen.width  - 400)/2);
	var t = Number((window.screen.height - 310)/2);
	window.open(hrefURL, 'winTwitter', 'width=400, height=310,top='+t+',left='+l+', menubar=no, toolbar=no, scrollbars=yes');
}

