jQuery(".navigation li").hover(function(){jQuery(this).addClass('hover')},function(){jQuery(this).removeClass('hover')});jQuery(function(){jQuery(".modal").dialog({autoOpen:false,position:'top',resizable:false,draggable:false,width:563,modal:true,closeOnEscape:true});jQuery('#search-link').click(function(){jQuery('#search-modal').dialog('open');return false;});jQuery('.open-contact').click(function(){jQuery('#contact-modal').dialog('open');return false;});jQuery(".ui-widget-overlay").live("click",function(){jQuery(".modal").dialog("close");});});jQuery("#hire-link").click(function(){jQuery("#availability #dropdown").toggle();jQuery(this).toggleClass('hire-link-open');});

/* Replacement attempt kill this if it goes bad */
jQuery(document).ready(function(){
	var detect = navigator.userAgent.toLowerCase();
	if(detect.indexOf("safari") > 0) return false;
	var inputs = jQuery("input[type=text]");
	inputs.each(function(){
		if(jQuery(this).attr("placeholder") != undefined) {
			this.value = jQuery(this).attr("placeholder");
			this.onfocus = function() {
				if (this.value == this.getAttribute("placeholder")) {
					this.value = "";
				}
				return false;
			}
			this.onblur = function() {
				if (this.value.length < 1) {
					this.value = this.getAttribute("placeholder");
				}
			}
		}
	});
});

/*
function activatePlaceholders() {
	var detect = navigator.userAgent.toLowerCase(); 
	if (detect.indexOf("safari") > 0) return false;
	var inputs = document.getElementsByTagName("input");
	for (var i=0;i<inputs.length;i++) {
		if (inputs[i].getAttribute("type") == "text") {
			var placeholder = inputs[i].getAttribute("placeholder");
			if (placeholder.length > 0) {
				inputs[i].value = placeholder;
				inputs[i].onclick = function() {
					if (this.value == this.getAttribute("placeholder")) {
						this.value = "";
					}
					return false;
				}
				inputs[i].onblur = function() {
					if (this.value.length < 1) {
						this.value = this.getAttribute("placeholder");
					}
				}
			}
		}
	}
}

window.onload = function() {
	activatePlaceholders();
}
*/
