(function(jq) {
	jq(document).ready(function() {
								
		function init() {
			// update products listing to reflect visuals;
			if (jq('#productListing').length > 0) {
				
				jq('.productListing-odd')
					.add('.productListing-even').each(function() {
						// add buy now button;									   
						var td1 = jq('td', this).eq(1);
						var td2 = jq('td', this).eq(2);
						var href = td1.find('h3 a').attr('href');
						td1.append('<p class="buyNow"><a href="'+href+'">Buy Now</a></p>');	
						
						// remove default 'more info...' link;
						td2.find('a').remove();
					});	
					
			}
			else if (jq('.productsList').length > 0) {
				
				jq('.productListing-odd')
					.add('.productListing-even').each(function() {
						var link = jq('p a', this).text('Buy Now');
						link.appendTo(jq('td', this)).wrap('<p class="buyNow" />');
				});
					
			}
		};
		
		init();
	});
})(jQuery);