var hockeyTas_nav = {
	jQueryScriptOutputted : false,
	init : function() {
		//if the jQuery object isn't available
		if (typeof(jQuery) == 'undefined') {
			if (!hockeyTas_nav.jQueryScriptOutputted) {
			    //only output the script once..
			    hockeyTas_nav.jQueryScriptOutputted = true;

			    //output the script (load it from google api)
			    document.write("<scr" + "ipt type=\"text/javascript\" src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js\"></scr" + "ipt>");
			}
			setTimeout( hockeyTas_nav.init, 50);
		} else {
			(function($){ // CLOSURE -> save to use $
				$(document).ready( function() {
					$('ul.nav > li').has('ul')
						.children('a').append('<span class="more"></span>')
						.end()
						.hover( function() {
							$(this).children('.subTree').toggle(); } );
					
					$('#fbLinks').mouseenter( function() {
						$(this).find('.subFacebook').show();
					}).mouseleave( function() {
						$(this).find('.subFacebook').hide();
					});
				});
			})(jQuery);
		}
	}
}
hockeyTas_nav.init();

