$(function(){
  function scroll_background (position) {
    position = position + ' center';
    $('#artwork')
      .animate({backgroundPosition: position}, "slow");
   }
  $('.scrollpan')
    .live('click', function(){
      if ($(this).hasClass('panel-1-1')){
        scroll_background('255px')
      } else if ($(this).hasClass('panel-1-2')){
        scroll_background('-345px')
      } else if ($(this).hasClass('panel-1-3')){
        scroll_background('-945px')
      } else if ($(this).hasClass('panel-1-4')){
        scroll_background('-2270px')
      } else if ($(this).hasClass('panel-2-1')){
        scroll_background('255px')
      } else if ($(this).hasClass('panel-2-2')){
        scroll_background('-345px')
      } else if ($(this).hasClass('panel-2-3')){
        scroll_background('-945px')
      } else if ($(this).hasClass('panel-2-4')){
        scroll_background('-1545px')
      } else if ($(this).hasClass('panel-2-5')){
        scroll_background('-2145px')
      } else if ($(this).hasClass('panel-2-6')){
        scroll_background('-2745px')
      } else if ($(this).hasClass('panel-2-7')){
        scroll_background('-3345px')
      } else if ($(this).hasClass('panel-2-8')){
        scroll_background('-3945px')
      } else if ($(this).hasClass('panel-2-9')){
        scroll_background('-4545px')
      } else if ($(this).hasClass('panel-2-10')){
        scroll_background('-5145px')
      } else if ($(this).hasClass('panel-2-11')){
        scroll_background('-5745px')
      }else if ($(this).hasClass('panel-3-1')){
        scroll_background('255px')
      } else if ($(this).hasClass('panel-3-2')){
        scroll_background('-345px')
      } else if ($(this).hasClass('panel-3-3')){
        scroll_background('-945px')
      } else if ($(this).hasClass('panel-3-4')){
        scroll_background('-1545px')
      } else if ($(this).hasClass('panel-3-5')){
        scroll_background('-2145px')
      } else if ($(this).hasClass('panel-3-6')){
        scroll_background('-2745px')
      } else if ($(this).hasClass('panel-3-7')){
        scroll_background('-3345px')
      } else if ($(this).hasClass('panel-3-8')){
        scroll_background('-3945px')
      } else if ($(this).hasClass('panel-3-9')){
        scroll_background('-4545px')
      }
  });
});
