// JavaScript Document

		String.prototype.pad = function(l, s, t){
			return s || (s = " "), (l -= this.length) > 0 ? (s = new Array(Math.ceil(l / s.length)
				+ 1).join(s)).substr(0, t = !t ? l : t == 1 ? 0 : Math.ceil(l / 2))
				+ this + s.substr(0, l - t) : this;
		};

		$(document).ready(function() {
				initForm('#header form');
				initSugestionFields();
				if ($.browser.msie) {
					$('#header form button').hover(
						function() {
							$(this).addClass('hover')
							},
						function() {
							$(this).removeClass('hover')
							}
					);
				}
				$('#header form').show();				   
			}
		);
		function initForm(f) {
			$(f).submit(
				function() {
					$('.inputSugestion').each(
						function() {
							if (this.value==this.defaultValue) {
								this.value='';
							}
						}
					);
					return true;
				}
			);
		}
		
		function initSugestionFields() {
			$('.inputSugestion').each(function() {
					$(this).blur(function() {
							if (this.value=='') {
								this.value=this.defaultValue;
							}
							$(this).removeClass('active');
						}
					);
					$(this).focus(function() {
							if (this.value==this.defaultValue) {
								this.value='';
							}
							$(this).addClass('active');
						}
					);
				}
			);
		}
