
// Замена шрифтов
// Cufon.replace('#menu ul li a', { hover: true, fontSize: '12px' });


$(document).ready(function(){

$('.shopItemSpec').semanticTabs({
    	tabSelector: '> h3',
    	bodySelector: '> div'
    });


$('.shopGroupsList a').hover(
						  function(){
							  $(this).parent().addClass('hover');
							  },
						  function(){
							  $(this).parent().removeClass('hover');
							  }
						  );



$('.jsfaq .act').click(function(){
			$(this).next().toggle();
			return false;
		}).next().hide();


$("a[rel=gapict-group]").fancybox({
			'padding': 2,
			'transitionIn': 'none',
			'transitionOut': 'none',
			'titlePosition': 'over',
			'overlayOpacity': 0.8,
			'overlayColor': '#fff',
			'titleFormat': function(title){
				return '<span id="fancybox-title-over">' + (title.length ? ' &nbsp; ' + title : '&nbsp;') + '</span>';
			}
		});


	$("ul.lst3 a.ztz").click(function(){
			$(this).next().toggle();
			return false;
		});


$(".lgn").fancybox({
			'titlePosition': 'inside',
			'transitionIn': 'none',
			'transitionOut': 'none',
			'padding':0,

			'overlayShow': true,
			'overlayOpacity': 0.5,
			'overlayColor': '#000',

			'showCloseButton': false
		});

		$(".fclose").click( function(){
			$.fancybox.close();
			return false;
		});


$("a#inline").fancybox({
		'hideOnContentClick': true,
     'padding': 30
	});


$(".shopItemSpec-nav li").corner("top 7px");


});



function AddIntoCart(shop_path, item_id, item_count)
{
	location.href = shop_path + 'cart/?action=add&item_id=' + item_id + '&count=' + item_count;

	return false;
}


var prev_comment = 0;

// Ответ на комментарий
function cr(comment_id)
{
	if (prev_comment && prev_comment != comment_id)
	{
		document.getElementById(prev_comment).style.display = 'none';
	}

	var div = document.getElementById(comment_id);

	if (div.style.display != 'block')
	{
		div.style.display = 'block';
	}
	else
	{
		div.style.display = 'none';
	}

	prev_comment = comment_id;
}

