jQuery.noConflict(); 
jQuery(document).ready(function(){
	// Fetch dimension of the picture
	function getDimension(ob) {
		var dimensions = [];
		dimensions.imgHeight = ob.children(".articleImg").outerHeight();
		dimensions.spanHeight = ob.children(".articleImgWrapperInfo").outerHeight();
		return dimensions;
	}
	jQuery(".articleImgWrapper").find("img").load(function() {
		jQuery(this).siblings(".articleImgWrapperInfo").css({
			"opacity": 0,
			"top": "180px"
		});
	});
	jQuery(".articleImgWrapper").hover(function(event) {
		var eventObj = jQuery(this);
		eventObj.find(".articleImgWrapperInfo").animate({
			opacity: 0.75,
			top: getDimension(eventObj).imgHeight - (getDimension(eventObj).spanHeight)
		}, 200, function() {
			// Animation complete.
		});
		event.stopPropagation(); // Stop the event bubbling up, no idea if needed twice
	}, function(event) {
		var eventObj = jQuery(this);
		eventObj.find(".articleImgWrapperInfo").animate({
			opacity: 0,
			top: getDimension(eventObj).imgHeight + (getDimension(eventObj).spanHeight)
		}, 300, function() {
			// Animation complete.
		});
		event.stopPropagation();
	});
	
	// Warenkorb step hilighter
	jQuery(".basketStep > span > strong").parent().css({
			"backgroundColor" : "#aaa",
			"backgroundImage" : "url('../images/layout/basketArrowActive.png')",
			"color"           : "#fff"
	});
	
});
