document.observe("dom:loaded", function() {
	$$(".provider").each(function(p) {
		if (p.getAttribute("rel") != undefined)
		{
			p.observe("mouseenter", function(e)
			{
				this.addClassName("provider-active");
			});	
			
			p.observe("mouseleave", function(e)
			{
				this.removeClassName("provider-active");
			});
			
			p.observe("click", function(e)
			{
				document.location = this.getAttribute("rel");
			});
		}
	});	
});

var StyledButton = Class.create({
	initialize: function(id, formID)
	{
		this.formID = formID;
		
		if ($(id + "_alternative"))
		{
			$(id + "_alternative").hide();
		}
		
		if ($(id))
		{
			$(id).show();
			$(id).observe("click", this.submit.bindAsEventListener(this));
		}
	},
	
	submit: function(e)
	{
		$(this.formID).submit();
	}
});
 
