(function($){
	var settings = {
		placeholder_id: "s_map",
		selected_country: false
	};
	
	$.fn.EurActivMap = function(options) {
		if(options) {
			$.extend(settings, options);
		}
		this.each(function(){
			$(this).find("area").hover(function(){
				var this_id = $(this).attr("id");
				settings.selected_country = this_id;
				setTimeout(function() {
					if(settings.selected_country == this_id) {
						$("#"+ settings.placeholder_id).attr("src", $("#s_img_" + this_id).attr("src"));
						$("#s_map_info").html($("#s_html_" + this_id).html());
					}
				}, 300);
			}, function(){
				settings.selected_country = false;
				$("#"+ settings.placeholder_id).attr("src", "http://blogactiv.eu/wp-content/themes/Blogactiv_2008/img/map/spc.gif");
			})
		});
		//select random country 
		//var countries_list = ['bulgaria', 'turkey', 'germany', 'spain', 'france', 'uk', 'poland', 'czeck_republic', 'slovakia', 'romania', 'serbia'];
		//$("area#" + (countries_list[Math.floor(Math.random()*12)])).triggerHandler("mouseover");
		$("area#france").triggerHandler("mouseover");
	}
})(jQuery);

