
$(document).ready(function(){

		imagePreview();
		
		function imagePreview(){
			//Define Vars
			preview_link = ('a.preview_link'); 	

			
			$(preview_link).each(function(){
				var $this = $(this);
				var tip = $(this).children('.product_image_preview')

	
				var offset = $(this).offset();
				var tLeft = offset.left;
				var tTop = offset.top;
				var tWidth = $this.width();
				var tHeight = $this.height();
			
				$this.hover(function() {
					/*
var xTip = (50)+"px";
					var yTip = (-40)+"px";
					tip.css({'top' : yTip, 'left' : xTip});
*/
					tip.css({'display' : 'block'});
					tip.position({
						"my": "left top",      //  Horizontal then vertical, missing values default to center
						"at": "center center",  //  Horizontal then vertical, missing values default to center
						
						"of": $(this).parent(), //  Element to position against
					    "collision": "fit"
					});
					
				},
					function() {
						tip.hide();
				});	
				
				

/*
				$(preview_link).mousemove(function(e){
					$(this).children('.product_image_preview')
						.css("top",(e.pageY - xOffset) + "px")
						.css("left",(e.pageX + yOffset) + "px");
				});
		
			
				setTip = function(top, left){
					var topOffset = tip.height();

				}
*/
			}
		)};
				
		

		
		
		//Suckerfish for dropdowns for IE6 
	     if ($.browser.msie && parseInt($.browser.version)< 7) {  
	         $("#nav-global li").hover(  
	             function() {  
	                 $(this).addClass("sf");  
	             },  
	             function() {  
			         $(this).removeClass("sf");  
	             });  
	          
	         $("#shopping-cart-selection li").hover(  
	             function() {  
	                 $(this).addClass("sf");  
	             },  
	             function() {  
			         $(this).removeClass("sf");  
	             }); 
	     }   //End Suckerfish
	
});//End jQuery