Finding the client IP address is actually quite problematic. The best you could really hope for is code that might get the router address, or proxy IP address. Anyway, assuming you are using jQuery, you could use something like this:
$(document).ready( function() {
$.getJSON("http://smart-ip.net/geoip-json?callback=?",
function(data) {
});
});