title is pretty clear.
My websites consists of both English-written and Spanish-written versions. You can go to the main site, which is in Spanish, by clicking http:
Rather than detecting the location of IP address (often unreliable due to NAT and proxying) you could check the default language the browser is set to. There are JQuery plugins to support this, such as http://keith-wood.name/localisation.html, or use server-side code to read the HTTP request header "HTTP_ACCEPT_LANGUAGE" to determine if you want to show the ES or EN site.