var DEF_VAL   = "search here..."; // Default Value
var isSafari = (navigator.userAgent.indexOf("AppleWebKit") !=-1); // Detecting not only Safari but WebKit-based browsers

run();
function run()
{
	var oldOnload = window.onload; // window.onload will be overwritten, so save the old value
	if (typeof(window.onload) != "function") {
		window.onload = init;
	} else {
		window.onload = function() {
			oldOnload();
			init();
		}
	}
}

function init() {
	if (!document.getElementById) return;
	var theSearchField = document.getElementById('searchkit'); // Enter search box's id attribute here
	if (isSafari) {
        // Changing type to 'search' from 'text'
        // and inserting 'autosave,' 'results,' 'placeholder' values for Safari and WebKit-based browsers
		theSearchField.setAttribute('type', 'search');
		theSearchField.setAttribute('autosave', 'saved.data');
		theSearchField.setAttribute('results', '5');
		theSearchField.setAttribute('placeholder', DEF_VAL);
	}
}