function sendToCart(){
    $.ajax({
     url: this.href,
     success:function(html,status,response){
       $('#cartContainer').html(html);
       $('.remove_to_cart').click(sendToCart);
     }
    })
    return false;
};
$(document).ready(
  function(){
    $('.add_to_cart').click(sendToCart);
    $('.remove_to_cart').click(sendToCart);
  }
)
function checkSearch(form)
{
 if($(form.q).val()){
    return true;
 }
 return false;
}

$(function(){
	$('div.history-block h3').each(function(){
		var button = $(this);
		var content = button.parent().find('.hb-cont').eq(0);
		var parentBody = content.parent();
		var startHeight = content.height();
		var startWidth = parentBody.width();
		button.mouseenter(function(){
			content.stop();
			parentBody.stop();
			content.animate({height:307},300);
			parentBody.animate({width:800},300);
		}).
		mouseleave(function(){
			content.stop();
			parentBody.stop();
			content.animate({height:startHeight},300);
			parentBody.animate({width:startWidth},300);
		});
	});
});

$(function(){
  $.Lightbox.construct({
 "text": {
             // For translating
             "image":        "Изображение",
             "of":           "из",
             "close":        "Х",
             "closeInfo":    "",
             "download":     "Открыть в новом окне",
             "help": {
                 "close":    "Закрыть",
                 "interact": "Наведите для действия"
             },
             "about": {
                 "text":     "",
                 "title":    "",
                 "link":     ""
             }
         }
  });
});
