/*Estil per als botons de formulari*/
var ICSBotons = {
	
	start: function(){
		
		ICSBotons.Submits = $$('input[type=submit]');
		ICSBotons.Forms = $$('form');
		ICSBotons.Submits.each(function(submit, i){
			var value = submit.value;
			submit.setStyle('display', 'none');
			var link = new Element('a', {'class': 'submit', 'href': '#'});
			var span = new Element('span').setHTML(value).inject(link);
			link.injectAfter(submit).addEvent('click', function(event){
				new Event(event).stop();
				ICSBotons.Forms[i].submit();
			});
		});
	},
	
	setHash: function(hash){
		if (window.webkit419){
			ICS.FakeForm = ICS.FakeForm || new Element('form', {'method': 'get'}).injectInside(document.body);
			ICS.FakeForm.setProperty('action', '#' + hash).submit();
		} else {
			window.location.hash = hash;
		}
	}
	
};
window.addEvent('domready', ICSBotons.start);