/*
 * $Id: jquery.init.js,v 1.3 2009/03/23 06:07:51 jgorba Exp $
 * 
 * Initialises various jquery scripts once the DOM is ready
 * 
 * Requires Jquery v.1.1.2 from jquery.com
 * 
 */

$(document).ready(function(){
	
	/*
	 * Primary navigation - jquery.superfish.js
	 */
	
	$("#primary-nav").superfish({
		hoverClass	: "sfHover",
		currentClass	: "overideThisToUse", /*new to v1.2a*/
		delay		: 500,
		animation	: {opacity:"show"},
		speed		: "normal"
	})
	.find(">li[ul]")
		.mouseover(function(){
			$("ul", this).bgIframe({opacity:true});
		})
		.find("a")
			.focus(function(){
				 $("ul", $(".nav>li[ul]")).bgIframe({opacity:true});
			});
			
	/*
	 * Vocab Tree View
	 */
	$("#vocabtreeview").Treeview({collapsed: false, control: "#treecontrol"});
	$("#treecontrol").show();
});