function buy(el) {
	$.get(
		el.href,
		{'action': 'ajax'},
		function (data) {
		//	$('#bSumm').text(data[0]);
			$('#bCount').text(data[1]);
			if (data)
			{
				$(el).replaceWith('<span style="font-size: 14px;">Куплено</span>');
			}
		},
		'json'
	);
	return false;
}

function goodOpen(el)
{
	var href = el.href;
	if (page)
	{
		href += '&cp[page]=' + page;
	}

	if (let)
	{
		href += '&cp[let]=' + let;
	}

	
	$('#controlForm select').each(
			function (i, subEl)
			{
				if (subEl.value > 0 || (subEl.value == 0 && subEl.name == 'goo_sex'))
				{
					href += '&cp[' + subEl.name + ']=' + subEl.value;
				}
			}
	);
	var search = document.getElementById('gooNameS');
	if (search.value)
	{
		href += '&cp[search]=' + search.value;
	}
	
	window.location.href = href;
	
	return false;
}
