$(function(){
if (typeof(global_Current_ProductCode) !="undefined" && $(".Multi-Child_Background").length)
	{
	$('table[cellspacing="1"][cellpadding="3"][border="0"][bgcolor="#cccccc"] tr td:eq(0)').before('<td>Options</td>');
	$('tr .Multi-Child_Background:not(.smalltext)').each(function(){
	var swab_image_code=$(this).find('.smalltext:eq(0).colors_text:eq(0)').text() + '-0.jpg';	
	$(this).prepend('<td><img class="thick" style="display:block; margin-left: auto; margin-right:auto; cursor: pointer;" border="0" alt="" src="/v/vspfiles/photos/' +swab_image_code+ '"></td>');
	$('.thick').error(function() {$(this).remove();});
	$('td .Multi-Child_Background:last').attr('colspan','7');
	});
	$(".thick").click(function(){   
	var t = this.title || null;
	var s = this.src;
	var g = this.rel || false;
	var img_fix = (s.replace("-0.jpg","-2.jpg"));
	tb_show(t,img_fix,g);
	return false;
	});
	}
});

$(function(){
$("a[id^='product_photo_zoom_url']").click(function(){   
var img_fix;
var t = this.title || null;
var s = $("img#product_photo").attr("src");
var g = this.rel || false;
if (s.lastIndexOf('-T.jpg') !=-1) {
img_fix = (s.replace("-T.jpg",".jpg"));
}
else
{
img_fix = (s.replace("T.jpg",".jpg"));
}
tb_show(t,img_fix,g);
return false;
});
});
