


(function() {

	var jobSearchWidgetJsElement;
	var jobSearchWidgetJsLink = "https://companalyst.salary.com/CompAnalyst/Cloud/UtilityScripts/Salary/Cpau_Camd_JobSearchWidget.js?v=";
	var isRegistJs = true;
    var scripts = document.getElementsByTagName('script');

    for (var i = 0; i < scripts.length; i++) {
        if (scripts[i].src.toLowerCase() === jobSearchWidgetJsLink.toLowerCase()) {
            isRegistJs = false;
            break;
        }
    }

	if (isRegistJs) {
		jobSearchWidgetJsElement = document.createElement("script");
		jobSearchWidgetJsElement.src = jobSearchWidgetJsLink;

		document.body.insertBefore(jobSearchWidgetJsElement, null);
		
	}

	function initWidget() {
		// Waiting load Cpau_Camd_JobSearchWidget.js
		if (typeof caJobSearchWidget === "undefined") {
			setTimeout(initWidget, 200);
			return;
		}

		caJobSearchWidget.serviceURL = 'https://companalyst.salary.com';
		
		var widgetHtml = '#ca_jobsearchwidget_keyword::-webkit-search-cancel-button,  	#ca_jobsearchwidget_keyword::-webkit-search-decoration { 		-webkit-appearance: none; 	} 	#ca_jobsearchwidget_keyword::-ms-clear {display:none;} 	#ca_jobsearchwidget_keyword::placeholder {color: rgba(255, 255, 255, .7);} 	#ca_jobsearchwidget_btngo:hover {color: #58595b;background: #caeefa;border-color: #caeefa;} 	 	 	||| 	<div style="font-family:proxima-nova,Helvetica Neue,Helvetica,Arial,sans-serif"> 		 		 		 		 		 		<div style="position:relative;margin-top:15px;">  			<div style="position: relative;background: #007dbc;border-radius: 1.5em;width: auto;height: 36px;line-height: 34px;"> 				<input id="ca_jobsearchwidget_keyword" type="search"  					   placeholder="Search..."  					   value="" autocomplete="off" 					   style="display: inline-block;width: 100%;height: 34px;background: #007dbc;color: #fff;border-radius: 1.5em;border: none;border-collapse: separate;-webkit-appearance: none;box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(0, 125, 188, .6);box-sizing: border-box;border-collapse: separate;margin: 0;padding-right: 75px;padding-left: 33px;outline: 0;font-size: 15px;font-family: Source Sans Pro,sans-serif;" />  				<span style="left: 10px;color: #77d5f3;font-weight: 700;font-family: icomoon;width: 16px;height: 36px;line-height: 34px;border-radius: 1.5em;position: absolute;top: 0;color: #fff;background: url(https://companalyst.salary.com/companalyst/cloud/images/ic_Search_18px.svg) no-repeat 1px center;"></span> 			</div> 			<div style="position: absolute;top: 0;right: 0;white-space: nowrap;font-size: 1em;line-height: 1.2;color: #212221;"> 				<button id="ca_jobsearchwidget_btngo" 						onclick="caJobSearchWidget.showSearchResult(document.getElementById(\'ca_jobsearchwidget_keyword\').value, \'\')" 						type="button" style="display: inline-block;font-size: 14px;font-weight: 400;position: relative;white-space: nowrap;vertical-align: middle;overflow: visible;box-sizing: border-box;width: 50px;height: 28px;margin: 4px 4px 0 0;padding: 0;line-height: 28px;color: #fff;background-color: #29abe2;border: 0;border-color: #007dbc;border-radius: 1.5em;text-align: center;cursor: pointer;"> 					Go 				</button> 			</div> 		</div> 		<div> 			<div id="ca_jobsearchwidget_keyworderror" style="display:none;font-weight: 400;background: #f8d7da;border: 1px solid #f5c6cb;color: #621c24;width: 100%;margin-top: 10px;padding: 8px;font-size: 80%;line-height: 1.5;opacity: 0.8;box-sizing: border-box;"> 			Please enter keywords to return search results.</div> 		</div> 		 		<div id="ca_jobsearchwidget_loading" style="text-align:center;display:none;margin-top:30px;"><img src="https://companalyst.salary.com/CompAnalyst/Cloud/Images/Loading.gif" /></div> 		<div id="ca_jobsearchwidget_widgetresult" style="margin-top:30px;"></div> 		 	</div>';
		var arrHtml = widgetHtml.split("|||");
		var headers = document.getElementsByTagName("head");
		var style;

		if (headers.length > 0) {
			style = document.createElement("style");
			if (style.styleSheet) {
				style.styleSheet.cssText = arrHtml[0];
			} else {
				style.appendChild(document.createTextNode(arrHtml[0]));
			}
			document.getElementsByTagName("head")[0].appendChild(style);
		}

		document.getElementById('').innerHTML =
			(headers.length === 0 ? arrHtml[0] : "") + arrHtml[1];

		caJobSearchWidget.bindEvents();
	}

	initWidget();
}());

	
