$(document).ready(function() { 
	
	
var formcontent = "<div class='location_tooltip'><span class='text'>Enter a new location:</span> <div class='searchbox'><input name='new_location' id='new_location' type='text' onkeypress='if(event.keyCode==13){changeLocation();}'> <a class='button' href='#' onclick='changeLocation(); return false;'> OK </a> <div class='floatclear'></div> </div>  <a href='#' onclick='clearLocation(); return false;' class='clear_location'> (clear location) </a></div>";

  $("#user-location a.location").qtip({
    content: formcontent,

    position: {
      corner: {
        target: 'bottomMiddle',
        tooltip: 'topMiddle'
      },
      adjust: {
        x: -56,
        y: 5
      }
    },

    style: { 
      name: 'dark', 
      //width: 300,
      border: {
        width: 5,
        radius: 6
      }
		  	  
    },

    show: {
      delay:0,
      when: {event: 'click'},
      effect: {length: 0}
    },

    hide: {
      delay:0,
      when: {event: 'unfocus'},
      effect: {length: 0}
    }
		 
  });
  // end qtip
		  
});

