jQuery(document).ready(function($) {
	
	$("#rad-gallery").mousemove(function(e) {
		var xoffset = e.pageX - this.offsetLeft;
		var goffset = Math.round($("#rad-case").position().left);
		var gwidth = $("#rad-gallery").width();
		var rwidth = $("#rad-case").width() - gwidth;
		var ratio = rwidth / gwidth;
		var offset = Math.round(-(xoffset * ratio));
		var diff = (goffset > offset) ? (Math.abs(goffset - offset)) :(Math.abs(offset - goffset));
		$("#rad-case").animate({ left: offset }, { queue:false, specialEasing: { left: 'linear' }, duration: diff });
	});
	
});