
jQuery(document).ready(function() {

	//wire up issue pages - issuelink_[] to issueimage_[id]
	jQuery('.issue ul#reviews li a').mouseenter(function () {
		focusCover('#' + this.id.replace('link', 'image'), this);
	}).mouseleave(function() {
		blurCover('#' + this.id.replace('link', 'image'), this);	
	});

	jQuery('.issue ul#interviews li a').mouseenter(function () {
		focusCover('#' + this.id.replace('link', 'image'), this);
	}).mouseleave(function() {
		blurCover('#' + this.id.replace('link', 'image'), this);	
	});

	//covers
	jQuery('.issue .issuecovers a').mouseenter(function () {
		focusCover(this, '#' + this.id.replace('image', 'link'));
	}).mouseleave(function() {
		blurCover(this, '#' + this.id.replace('image', 'link'));
	});


});

function focusCover(theImage, theLink) {
	jQuery(theImage).addClass("on");
	jQuery(theLink).addClass("on");
}

function blurCover(theImage, theLink) {
	jQuery(theImage).removeClass("on");
	jQuery(theLink).removeClass("on");
}
