jQuery.noConflict(); 

// Onload Observations
jQuery(function() {
  jQuery('img.t_menu_item').hover(function(e) { image_over(this) }, function(e) { image_out(this) });
    
  if (jQuery('#showcase')) {
    showcase_arrows();
    showcase_item_width = jQuery('.showcase_item').width();
    jQuery('#showcase_right > img').click(function(e) { move_showcase(showcase_item_width+6) });
    jQuery('#showcase_left > img').click(function(e) { move_showcase(-showcase_item_width-6) });
  }

});

function image_over(img) {
  var src = jQuery(img).attr('src');
  jQuery(img).attr('src', src.replace('.png','_over.png'));
}

function image_out(img) {
  var src = jQuery(img).attr('src');
  jQuery(img).attr('src', src.replace('_over.png','.png'));
}

function showcase_arrows() {
  var showcase = jQuery('#showcase_items_body');
  if ((showcase.width()-6+showcase.position().left) > jQuery('#showcase_items').width()) {
    jQuery('#showcase_right > img').css('visibility', 'visible');
  } else {
    jQuery('#showcase_right > img').css('visibility', 'hidden');
  }
  if (showcase.position().left != 0) {
    jQuery('#showcase_left > img').css('visibility', 'visible');
  } else {
    jQuery('#showcase_left > img').css('visibility', 'hidden');
  }   
}

function move_showcase(val) {
  var showcase = jQuery('#showcase_items_body');
  var left = showcase.position().left - val;
  showcase.animate(
   { left: left }, 
   300, showcase_arrows 
  )
  
  
  //showcase.css('left', left);  
  showcase_arrows();  
}


