/** add_page_load_event.js allows us to run one or multiple functions on page load
The advantage of this funtion is it won't override any previously set onload functions,
and also that it will trigger at the point of HTML being ready, rather than waiting for every image to load */

/** Code to run on page load, including image rollovers and anything else fancy */
function page_setup()
{
	if(document.getElementById('cat_productOptions'))
	{
		var label = $("label[for='cat_productOptions']").text();
		$('.cat_product_cart').attr('href', "javascript:alert('Please Select A "+label+" From The List Below');");
	}
	
	/** remove blank paragraphs */
	//$('p').each(function(){
	//	if($(this).html() == '&nbsp;') $(this).remove();
	//});
	
	/** remove empty prod options wrappers */
	var prod_options = $('.cat_prod_options_wrapper').html().replace(/^\s+|\s+$/g, '');
	if(prod_options == '') $('.cat_prod_options_wrapper').remove();
}

$(document).ready( page_setup );

