var base_url='http://'+location.host+'/';

$(document).ready(function(){

     $("#cart_block").load(base_url+"cart/show_ajax/"+Math.random( )*1000);

	$('.cat_litop').eqcols( {cols:4} );
    $('#brend_view').hide();
    $('#brends, #catmenu_t').corner();
    $('#search_f').focus(function(){
        if( 'Поиск' == $(this).val())
            $(this).val('');
    });
	
	$('#carslist').columnizeList({cols:4,constrainWidth:1});
    
    $('#brend_view li ul li').live('mouseover mouseout', function(event) {
      if (event.type == 'mouseover') {
        $(this).css('backgroundColor','#fffcd9');
      } else {
        $(this).css('background','none');
      }
    });
    $('#brends').live('mouseover mouseout', function(event) {
      if (event.type == 'mouseover') {
        $('#brend_view').show();
        $('#brends').css('backgroundColor','#fff191');
        $('#brend_list').columnizeList({cols:4,constrainWidth:1});
        $('#brend_view').corner();
      } else {
        $('#brend_view').hide();
		$('#brends').css('backgroundColor','#f6f6f6');
      }
    });
	
	$('.toexpand .selected').parent().parent().css({'display' : 'block'});
	
	
    $('.expand a').click(function(){
      $(this).parent().next('.toexpand').slideToggle("slow");
      return false;
    });
	
	 

});

 function AddToBasket(prod_id,prod_quantity){
                $("#cart_block").load(base_url+"cart/add/"+prod_id+"/"+prod_quantity,'',function(){
                        $.notifyBar({ delay:700, cls: "success", html: "Товар добавлен в корзину!" });
                 });
            };
             

