function img_view(obj, ssrc, iwidth, iheight, stitle)
{
	$(".goods-image-active").each(function() {
		$(this).removeClass("goods-image-active");
		$(this).addClass("goods-image");
	});

	$(obj).addClass("goods-image-active");

	$("#goods-image-main").parent().attr({
		href: obj.href,
		title: stitle
	});

	$("#goods-image-main").attr({
		src: ssrc,
		width: iwidth,
		height: iheight
	});

	return false;
}


function change_color(obj)
{
	oel = $("option:selected", obj).val();
	el = $("#c" + oel);
	
	if (!el.length)
		return false;
		
	el.click();
		
	return false;
}

var base_price;

function change_size(obj)
{
	if (!base_price)
		base_price = $("#to_order_price .price").html()
	
	el = $("#to_order_price .price");
	new_price = $("option:selected", obj).attr('price');

	if (!new_price)
		new_price = base_price;
	else
		new_price = new_price + " <span>руб.</span>";
	
	el.html(new_price);
	
	oel = $("option:selected", obj).val();
	el = $("#s" + oel);
	
	if (!el.length)
		return false;
		
	el.click();
		
	return false;
}
