 
// on page load
  jQuery.noConflict();

  jQuery(document).ready(function(){
    
		var current_id ;
		var current_pos = '0';
		jQuery('.model_detail').hide();
		jQuery('#products a span').hide();
		
		jQuery('#products a').mouseover(function(e) {
				var id = jQuery(this).attr('id');
				var pos = jQuery(this).attr('rel');
				var height = 253;
				var y_pos = '-'+(height*pos)+'px';
				//alert(y_pos);
				//if(current_id!=id) jQuery('#products').css('background-image','url(img/product_'+id+'.jpg)');
				if(current_id!=id) {
					jQuery('#products').css('background-position','0 '+y_pos);
					jQuery('span',jQuery(this)).show();
				}
				
		})
		.mouseout(function(e) {
				var id = jQuery(this).attr('id');							  
				//if(current_id!=id) jQuery('#products').css('background-image','url(img/product_'+id+'.jpg)');
				//if(current_id!=id) { 
				  jQuery('#products').css('background-position','0 '+current_pos);
					jQuery('span',jQuery(this)).hide();
					jQuery('#'+current_id+' span').show();
				//}
		});			 
				 
		jQuery('#products a').click(function(e) { 
				
				var lnk = jQuery(this);
				var id  = lnk.attr('id');
				var pos  = lnk.attr('rel');
				var height = 253;
				var y_pos = '-'+(height*pos)+'px';
				var overlayer = jQuery('#detail_'+id);
			  
				current_id = id;
				current_pos = y_pos;
				
				jQuery('.model_detail').hide();
				jQuery('#products a span').hide();
				
				jQuery('#products').css('background-position','0 '+y_pos);
				jQuery('span',lnk).show();
				
				jQuery('#detail_'+id).css('opacity',0);
				jQuery('#detail_'+id).show();
				jQuery('#detail_'+id).animate({
					"opacity": "0.9"
				}, { duration: "200" });
				
				e.preventDefault();
				
		});
			 
			 
  });
