/*--------------------------------
 *
 * Author: Stuart Steel
 * Acorn Web Studio
 * stuart@acornweb.com.au
 *
 *--------------------------------*/
 
 
 /*--------------------------------
 * configing catalogue items
 *--------------------------------*/
 
 var configCatalogueItems=function()
 {
 	$("#leftContent .category_item a").click(function(){
 		//this = the a tag that we click on
 		var notes=$(".summary",this).text();
 		var price=$(".price",this).text();
 		var product_code=$(".product_code",this).text();
 		var imagesrc=$("img",this).attr("src");
 		imagesrc=imagesrc.replace(/_s_(\d)_70_(\d)\.jpg/,"_t_$1_413_$2.jpg");
 		var htmlstring="<div class='catalogueDisplayImage'><img src='"+imagesrc+"' alt='"+notes+"' /></div><h4>"+product_code+"<br />"+notes+" <strong>"+price+"</strong></h4>";
 		$("#rightContent").html(htmlstring);
 		return false;
 	});
 	$("#leftContent .category_item a:first").each(function(){
 	var notes=$(".summary",this).text();
 		var price=$(".price",this).text();
 		var product_code=$(".product_code",this).text();
 		var imagesrc=$("img",this).attr("src");
 		imagesrc=imagesrc.replace(/_s_(\d)_70_(\d)\.jpg/,"_t_$1_413_$2.jpg");
 		var htmlstring="<div class='catalogueDisplayImage'><img src='"+imagesrc+"' alt='"+notes+"' /></div><h4>"+product_code+"<br />"+notes+" <strong>"+price+"</strong></h4>";
 		$("#rightContent").html(htmlstring);
 		});

 };
 

$(window).ready(function(){
	configCatalogueItems();
});
