function moveToLeft() {
  J('#slideshow ul').animate({scrollLeft: '-=129'});
  return false;
}
function moveToRight() {
  J('#slideshow ul').animate({scrollLeft: '+=129'});
  return false;
}
$(document).ready(function(){
  J('#slider a.left').click( moveToLeft );
  J('#slider a.right').click( moveToRight );
  J('a.expand').click( function() {
/*    $( 'a.expand' ).show();
    $( 'div.outer' ).hide();
    $( this ).hide();*/
    var as   = "ul."+J( this ).parents( 'ul' ).attr('class')+" a.expand";
    var divs = "ul."+J( this ).parents( 'ul' ).attr('class')+" div.outer";
    J( as ).css("display", "block");
    J( 'a.buy-small' ).show();
    J( divs ).hide();
    J( this ).siblings( 'a' ).hide();
    J( this ).siblings( 'div.outer' ).show();
    J( this ).hide();
    return false;
  });
  J('a.collapse').click( function() {
    var as   = "ul."+J( this ).parents( 'ul' ).attr('class')+" a.expand";
    var divs = "ul."+J( this ).parents( 'ul' ).attr('class')+" div.outer";
    J( as ).css("display", "block");
    J( 'a.buy-small' ).show();
    J( divs ).hide();
    return false;
  });
  J('.ec-button').click( function() {
    J(this).parent().toggleClass('expanded').toggleClass('collapsed');
  });
});
