	$(document).ready(function(){
         $("#accordion").accordion({
				header: '>ul>li>a',   //keeps first child links visible and clickable
				active:		false,		// to have all categories collapsed on initial load, set to false
				autoHeight:	 false,		// sets subcat containers to be the same height as largest to prevent movement of any panels below it  
				event:		 'hoverintent',	// change to 'mouseover' if you want the expasion to take place on hover and make top category clickable
				collapsible: true,		// allow customer to collapse all sections - click on open section collapses it - for event = click only
				navigation: true		// require to support IE8 in compatibility mode
			});
		});

$(function() {
		$("#accordion").accordion({
			event: "click hoverintent"
		});
	});
	
	var cfg = ($.hoverintent = {
		sensitivity: 7,
		interval: 100
	});

	$.event.special.hoverintent = {
		setup: function() {
			$( this ).bind( "mouseover", jQuery.event.special.hoverintent.handler );
		},
		teardown: function() {
			$( this ).unbind( "mouseover", jQuery.event.special.hoverintent.handler );
		},
		handler: function( event ) {
			event.type = "hoverintent";
			var self = this,
				args = arguments,
				target = $( event.target ),
				cX, cY, pX, pY;
			
			function track( event ) {
				cX = event.pageX;
				cY = event.pageY;
			};
			pX = event.pageX;
			pY = event.pageY;
			function clear() {
				target
					.unbind( "mousemove", track )
					.unbind( "mouseout", arguments.callee );
				clearTimeout( timeout );
			}
			function handler() {
				if ( ( Math.abs( pX - cX ) + Math.abs( pY - cY ) ) < cfg.sensitivity ) {
					clear();
					jQuery.event.handle.apply( self, args );
				} else {
					pX = cX;
					pY = cY;
					timeout = setTimeout( handler, cfg.interval );
				}
			}
			var timeout = setTimeout( handler, cfg.interval );
			target.mousemove( track ).mouseout( clear );
			return true;
		}
	};


