/*
	File:	Master behavior file
	Author:	Eric Shepherd
	Date:	April 2006
	Site:	Spark Art Creativity System
	Requires:	
			/pages/v4/script/dhtml_lib.js
			/pages/v4/script/ProductHelper.js
*/

// constructor
EventHelper.AddEvent(window, 'load', init, false);

function init() {
	var p = new ProductHelper();
	p.init();
	p.extendInit();
}

ProductHelper.prototype.extendInit = function() {
	
	var adv = document.getElementById('area-adv');
	if (adv) {
		var thisReference = this;
		EventHelper.AddEvent(adv, 'click', pointer = function(e) { thisReference.advPopup(this, thisReference, e);}, false); 
		if (SupportTest.isSafari) adv.onclick = EventHelper.CancelClickSafari; //safari still doesn't support cancelDefault()
	}
	
}

ProductHelper.prototype.advPopup = function(el, thisReference, e) {
	this.popup(el.href, 'advertisement', 200, 100, e);
}
