$(document).ready(function() {
    $('#cartshow').live('click', function(event) { 
      $('#details').show( 400, function(){
          $('#details').css("min-height","96px");
          $('#cartshow').hide(0, function(event) {
            $('#carthide').show( 0 );  
          });     
       });
    });
    $('#carthide').live('click', function(event) { 
       $('#details').css("min-height","0px").hide( 400, function(){         
          $('#carthide').hide( 0, function(event) {
            $('#cartshow').show( 0 );  
          });     
       });
    });
});

$(document).ready(function() {
  $('#search-ctrl a').click(function(){
    $('#search-input').toggle('slide', {direction:'up'},300);
  });
});

$(document).ready(function() {
  $('#content_categories a').hover(function(){
    $(this).css({"background-color":"#f0f0f0"});
  },function(){
    $(this).css({"background-color":"white"})
  });
  $('#content_categories .controller').hover(function(){
    $(this).first().siblings('a').css({"background-color":"#f0f0f0"});
  },function(){
    $(this).first().siblings('a').css({"background-color":"white"})
  });
});
$(document).ready(function() {
  $('#content_categories li.has_subcategories .controller').click(function(){
    $(this).siblings('ul').toggle(800);
    $(this).toggleClass('cl_unfolded');
  });
});

$(document).ready(function() {
  $('#content_categories a.cl_1').last().css('border-bottom','none');
 
});
$(document).ready(function() {
 $('#right_column .product_list_slot .price').each(function(index){
    if ( $(this).width() > 112 ) {
      $(this).addClass('too-long');
    } else {
      $(this).addClass('short-enough');
    }
  });
});
