While trying to get the x and y coordinates of the location where a user clicked on a particular image, i just stumbled upon a "not-a-definite-solution" with posts written on different blogs and a lot of different techniques people have used.
So here is my version with bits and pieces put together.
First lets get the x,y coordinates of any given element on the page.
File: jquery.elementlocation.js
jQuery.fn.elementlocation = function() {
var curleft = 0;
var curtop = 0;
var obj = this;
do {
curleft += obj.attr('offsetLeft');