$(function() {
	$('#slideshow').cycle({
		fx:     'fade',
		speed:  'slow',
		timeout: 6000,
		pager:  '#slideshow_nav',
		pagerAnchorBuilder: function(idx, slide) {
		// return sel string for existing anchor
		return '#slideshow_nav li:eq(' + (idx) + ') a';
		}
	});
	$('#direct').click(function() {
		$('#slideshow_nav li:eq(2) a').triggerHandler('click');
		return false;
	});
});

$(document).ready(function(){ 
	$("ul.sf-menu").supersubs({ 
		minWidth:    15,   // minimum width of sub-menus in em units 
		maxWidth:    25,   // maximum width of sub-menus in em units 
		extraWidth:  1     // extra width can ensure lines don't sometimes turn over 
							 // due to slight rounding differences and font-family 
	}).superfish();  // call supersubs first, then superfish, so that subs are 
					 // not display:none when measuring. Call before initialising 
					 // containing tabs for same reason. 
});
