$(function() {
	if ($.browser.mozilla && parseFloat($.browser.version) < 1.9 && navigator.appVersion.indexOf('Mac') !== -1) $('body').css('-moz-opacity',.999);
	
	// alter default so arrow mark-up is not generated for this demo.
	// so many menu items (total of all examples) could slow initialisation performance
	// so arrow mark-up will be generated manually. Could go without arrows altogether
	// but that would risk people not finding the examples that show arrow support.
	$.fn.superfish.defaults.autoArrows = false;
 
	// initialise supersubs before it gets hidden by tabs or superfish. Need to measure widths while visible.
	$('#sample-menu-5').supersubs({
		minWidth:    12,
		maxWidth:    27,
		extraWidth:  1
	}).superfish();	
	
    // initialise the tabs
    var main = $('#main').tabs(1);
    $('#samples').tabs( { selectedClass: 'sample-tab-selected', bookmarkable: true });
 
	// initialise examples
	$('#sample-menu-1').superfish({
		autoArrows : true // emulate default behaviour for this example
	});
 
	$('#sample-menu-2')
	.superfish().find("ul").bgIframe({opacity:false}); // add this bit for bgIframe support only
 
	$('#sample-menu-3').superfish({
		animation: {height:'show'},
		delay: 1200
	});
	
	$('#sample-menu-4').superfish({
		pathClass: 'current'
	});	
 
	/*$('.sf-menu a').addClass('sf-with-ul');*/
});
 
