/*
________________________________________________________________________________________
*	works.js
*   
*	Javascript functions for Michael Berkeley works page
*   
*	(c) 2009
________________________________________________________________________________________
*/


	// jQuery accordion settings

	$(function() {
		$("#accordion").accordion({ collapsible: true,
									active: 0,
									autoHeight: false 
								  });

	});
		//hover states on the static widgets
		/*
		$('#dialog_link, ul#icons li').hover(
			function() { $(this).addClass('ui-state-hover'); }, 
			function() { $(this).removeClass('ui-state-hover'); }
		);
		
		
	});
	*/
	
// When document has finished loading, initialise the category rollover effect
	add_onload(init_work_headings);


	function init_work_headings()
	{
		var tags=document.getElementsByTagName("div");
		for (var count=0; count<tags.length; count++)
		{
			// Check to see if this 'div' tag has the 'unselected_category' class name
			if (tags[count].className == "unselected_category")
			{
				// Yes, insert event handlers to call 'mouse in' and 'mouse out' functions
				// and set unselected background colour as default
				// tags[count].style.backgroundColor = "#f9f9f9";
			 	//tags[count].style.backgroundPosition = "bottom left";
				tags[count].onmouseover = work_heading_rollover;			
				tags[count].onmouseout = work_heading_rollout;			
			}
		}
	}
	
	function work_heading_rollover()
	{
		this.style.backgroundColor = "#DFD2D7";
	}
	
	function work_heading_rollout()
	{
		this.style.backgroundColor = "#F7F4F5";
	}
