$j = jQuery.noConflict();
var __images_prefix = "/skin/frontend/default/hellomix/images/homepage/";
var __link_prefix = "/";
var __images = [
	/*
	 * [x,y,src,hover_src, href]
	 */
	[35,227, 'rearDT.png', 'rearDT_ro.png', 'products/rear-drivetrain.html'],
	[40,280, 'derailleur.png', 'derailleur_ro.png', 'products/derailleur-hangers.html'],
	[292,226, 'bb_frontDT.png', 'bb_frontDT_ro.png', 'products/bottom-brackets-front-drivetrain.html'],
	[280,275, 'bearings.png', 'bearings_ro.png', 'products/bearings.html'],
	[380,93, 'headset.png', 'headset_ro.png', 'products/headset-spacers-shims.html'],
	[427,224, 'axles.png', 'axles_ro.png', 'products/axles-cones-hub-parts.html'],
	[560,125, 'fastener.png', 'fastener_ro.png', 'products/fasteners-ferrules-brake-rim-parts.html']
];
$j(document).ready(function(){
	__bindImages();
	
	
	 
	
});

function __bindImages()
{
	//console.log("Inside bindImages");
	var context = "#map";
	var imgs_html = '';
	$j.each(__images, function(index,value){
		imgs_html += '<a style="z-index:6000;' + 'left:' + value[0] + 'px; top:' + value[1] + 'px; position:absolute;" href="' + value[4] + '"><img class="hoverable-image" src="' + __images_prefix + value[2] + '" hover-image="' +  __images_prefix + value[3] +'" /></a>';
	});
	$j(context).prepend(imgs_html);
	$j("img.hoverable-image").hover(function(){
		var small_size = $j(this).attr("src");
		$j(this).attr("src", $j(this).attr("hover-image")).attr("hover-image", small_size);
	}, function(){
		var big_size = $j(this).attr("src");
		$j(this).attr("src", $j(this).attr("hover-image")).attr("hover-image", big_size);
	});
}


