	$(function () {
		$(".defaulthei").each(function(i) { 
			var $hei = $("img:eq("+i+")", this).innerHeight();
			if($hei > 90 ) {
				$("img", this).attr({ height: '90' });
				$("img", this).removeAttr("width");
			}
			
		});

		

				
		$('.prodacte').each(function(i) {
			i++;
			var p = i / 4;
			var d = "" + p;
			var distance = 10;
			var time = 50;
			var leftt
			var hideDelay = 50;
			var hideDelayTimer = null;					
			var beingShown = false;
			var shown = false;
			var trigger = $('.showproduct', this);
			var offset = $(this, '.tball').offset();
			var topp = offset.top + 26;
			var info = $('.tball', this).css('opacity', 0);
			if(d.indexOf(".", 1) == 1) { 
				var leftt = offset.left + 153;
				$('.tball .fle', this).addClass("flet90");
			} else {
				var leftt = offset.left - 260;
				$(".tball .flet", this).addClass("flet-90");
			}
			$([trigger.get(0), info.get(0)]).mouseover(function () {
				if (hideDelayTimer) clearTimeout(hideDelayTimer);
				if (beingShown || shown) {
					// don't trigger the animation again
					return;
				} else {
					// reset position of info box
					beingShown = true;
					trigger.css("border", "1px dotted #A5A5A5");
					info.css({left: leftt, top: topp, display: 'block'}).animate({ opacity: 1 }, time, 'swing', function() { beingShown = false; shown = true; });
				}
				return false;
			}).mouseout(function () {
				if (hideDelayTimer) clearTimeout(hideDelayTimer);
				hideDelayTimer = setTimeout(function () {
				hideDelayTimer = null;
				trigger.css("border", "1px solid #FFF");
				info.animate({ opacity: 0 }, time, 'swing', function () { shown = false; info.css('display', 'none'); }); }, hideDelay);
				return false;
			});
		});
		if(window.ActiveXObject){ 
			$(function() { $.getScript("http://www.mdparts.com/javascript/supersleight-jq.js", function() { $(".teamfour").supersleight(); }); });
		}
    });