// wmsolicitors.com JS

	Element.extend(
	{
		hideonload: function() 
		{
			this.setStyle('display', 'none');
		},
		
		hide: function() 
		{
			this.getParent().className = "";
			this.setStyle('display', 'none');
		},
		
		show: function() 
		{
			this.getParent().className = "current";
			this.setStyle('display', '');
		}
	});

	var DropdownMenu = new Class({	
		initialize: function(element)
		{
			$A($(element).childNodes).each(function(el)
			{
				if(el.nodeName.toLowerCase() == 'li')
				{
					$A($(el).childNodes).each(function(el2)
					{
						if(el2.nodeName.toLowerCase() == 'ul')
						{
							$(el2).hideonload();
							
							el.addEvent('mouseover', function()
							{
								el2.show();
								return false;
							});
	
							el.addEvent('mouseout', function()
							{
								el2.hide();
							});
							new DropdownMenu(el2);
						}
					});
				}
			});
			return this;
		}
	});
	
Window.onDomReady(function() {new DropdownMenu($('dropdownMenu'))});

window.addEvent('domready', function() {

	var scroll = new Fx.Scroll(window, {
		wait: false,
		duration: 300,
		offset: {'x': 0, 'y': 0},
		transition: Fx.Transitions.Quad.easeInOut
	});

	if ($('toplink')) {
		$('toplink').addEvent('click', function(e) {
			e = new Event(e).stop();
			scroll.toElement('pagetop');
		});
	}


// Google Analytics
var pageTracker = _gat._getTracker("UA-1919950-8");
pageTracker._initData();
pageTracker._trackPageview();

});