var myrules = {
	//this is for the micronav at the top of the site
	'#micronav li ul' : function(el){
		el.style.display = 'none';
	},

	'#micronav li' : function(el){
		
		var uls = el.getElementsByTagName('ul');
		
		el.onmouseover = function(){
			if(uls.length != 0){
			uls[0].style.display = "block";
			}
		};

		el.onmouseout = function(){
			if(uls.length != 0){
			uls[0].style.display = "none";
			}
		};

	},
	
	
//this is for the jobs filter
	'#radiotermscontract' : function(el){
	
		el.onclick = function(){
			divs = document.getElementsByClassName('Permanent');
			for(i=0;1<divs.length; i++){
				addClassName(divs[i],'hide');
			}		
		};
	},
	
	
	//
	'#radiotypeall' : function(el){
		el.click();
	},
	'#radiotermsall' : function(el){
		
		
		el.onclick = function(){
			divs = document.getElementsByClassName('jobholder');
			for(i=0;1<divs.length; i++){
				removeClassName(divs[i],'hide');
			}
		} 
		
		el.click();
	}
	
	
};

Behaviour.register(myrules);

