function ect_search_ext(){
	var submitIcon = document.getElementsByClassName("searchbox-icon")[0];
	var inputBox = document.getElementsByClassName("searchbox-input")[0];
	var searchBox = document.getElementsByClassName("searchbox")[0];
	var isOpen = false;
	submitIcon.addEventListener('mouseup', function(){
		if(isOpen == false){
			ectaddclass(searchBox,'searchbox-open');
			inputBox.focus();
			isOpen = true;
		} else {
			if(inputBox.value!='')
				searchBox.submit();
			else{
				ectremoveclass(searchBox,'searchbox-open');
				inputBox.blur();
				isOpen = false;
			}
		}
	});
}
document.addEventListener("DOMContentLoaded",ect_search_ext);
