oye(window).on('load', function(){
	oye('.tooltip').each(function(el){
		oye(el).on('mouseover', function(){						
			oye('#'+this.rel).show();
		});
		
		oye(el).on('mouseout', function(){
			oye('#'+this.rel).hide();
		});
	});

	oye('#map select').on('change', function(){
		// clean string to get the page name
		if(this.selectedIndex !== 0){
			var page = this.value;
			var regex	= '([^A-Za-z0-9\-_]+)';
			page = page.replace(/[^a-zA-Z0-9]+/gi, '-').toLowerCase();			
			oye.get('/ajax/home-search.php', {
				method:'post',
				parameters:'page='+page,
				success:function(o){
					if(o) window.location = o;
				}
			});			
		}
		return false;
	});
	
});
