$(document).ready(function(){
	// optinal info toggle	
	$("#optional").hide();
	$(".optional_intro").toggle(
		function() {
			$("#optional").show("fast");
			$(".optional_img").addClass("current");
		},
		function() {
			$("#optional").hide("fast");
			$(".optional_img").removeClass("current");
		}
	);

// TOOL TIPS
	$("span.tool_tip_inside").each(function() {
		$(this).html('<span class="btn"><i></i><span><span></span><i></i>'+ $(this).html() +'</span></span>');
	});
	
	$("span.tool_tip").hover(
		function(e) {
			// get position of cursor
		   var x = e.pageX - this.offsetLeft;
		   var y = e.pageY - this.offsetTop;
		   // show tool tip at positin users mouse entered its parent
		   $(this).children("span.tool_tip_inside").css({visibility: "visible", left: x+"px", top: y+"px"});
		},
		function() {
			$(this).children("span.tool_tip_inside").css({visibility: "hidden"});
		}
	);
	
	// Registration field toggle (gamertags)
	$("div.gamertag").hide();	
	$("input[@type='checkbox']").click(
	  function() {
	   $(this).siblings("div.gamertag").toggle();
	  }
	);
	
	$('#login_pass_text').focus(function(){
		$(this).hide();
		$('#login_pass_fld').show();
		document.getElementById('login_pass_fld').focus();
	});
			
});


function forgot_password() {
	GB_show('', '/forgot_password/', 208, 459, 'forgot_password');
}