// JavaScript Document
$(document).ready(function(){
	$('#applyButton').click(function(){
	$('#applyBox').fadeIn("slow");
	$('#applyButton').hide();
	});
	
	$('#closeBox').click(function(){
	$('#applyBox').hide();
	$('#applyButton').fadeIn("slow");
	});
});

function jStripBad(string){
	//create COOKIE for original string
	
	//OFLINE CODE
	//document.cookie='q='+string+';expires=;path=/new.virtualoutsource/search/;';
	//document.cookie='q='+string+';expires=;path=/new.virtualoutsource/q/jobs/;';
	//document.cookie='q='+string+';expires=;path=/new.virtualoutsource/q/jobseekers/;';
	//document.cookie='q='+string+';expires=;path=/new.virtualoutsource/q/employers/;';
	
	//ONLINE CODE
	document.cookie='q='+string+';expires=;path=/search/;';
	document.cookie='q='+string+';expires=;path=/q/jobs/;';
	document.cookie='q='+string+';expires=;path=/q/jobseekers/;';
	document.cookie='q='+string+';expires=;path=/q/employers/;';
	
	// regex=/[^a-zA-Z0-9]+/g * alpha numberic only no spaces
	var str = string;
	var newstr = str.replace(/[^a-zA-Z0-9]+/g,'-');
	return newstr;
}
