var searchbox = {			containerID: null,		init: function(containerID)	{		searchbox.containerID = containerID;			},		reload: function(el) {		attrs = new Array();		// parsing request string 		requestString = document.location.search;		if(requestString.indexOf('?')==0)		    requestString = requestString.substring(1);		requestParams = requestString.split("&",3)		for(i=0; i< requestParams.length; i++) {		    kv = requestParams[i].split('=');		    if(kv[0]!='' && kv[1]!='') {		        attrs[kv[0]] = kv[1];		    }		}		//parsing form elements		els = searchbox._getFormElements();				els.each(function() {		   el = jQuery(this);				   if(el.attr('type')=='checkbox') {			   attrs[el.attr('name')] = el.is(':checked')?el.val():"";		   }		   else {			   if(el.attr('placeholder')==el.val()) el.val('');			   attrs[el.attr('name')] = el.val();		   }		   		})		// binding the url		url = document.location.pathname+'?mode=_ajax&_imod[]=Dfe_Modules_SearchBox2_Module';		for(key in attrs) {		    url += '&'+key+'='+escape(attrs[key]);		}				//console.log(url);				searchbox._request(url);	},		_getFormElements: function() {		return jQuery("#"+searchbox.containerID+" form input,#"+searchbox.containerID+" form select");			},		_request: function(url) {		//els = searchbox._getFormElements().attr('disabled','true');		searchbox._blockForm();		jQuery.ajaxSetup({ cache: false });		jQuery.get(url, searchbox._requestComplete);	},		_blockForm: function() {		jQuery("#"+searchbox.containerID).block({css: {border: 0,background: 'none', padding: '5px', width: '45px', marginTop: '-15px'}, message: "<img src='/public/images/loading-animation.gif' />"});	},	_unblockForm: function() {		//jQuery("#"+searchbox.containerID).unblock();	},		_requestComplete: function(data) {		dom = jQuery(data);				searchbox._unblockForm();		//searchbox._getFormElements().removeAttr('disabled');				jQuery('#'+searchbox.containerID).replaceWith(dom).find('input[placeholder]').each(function() {			inputPlaceholder(this);		});				/**/				}}jQuery(function() {	searchbox.init("searchbox_container");})
