// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults
$(function() {

	// $("#myanmar").hover(function() {alert("ho")})
	
	$('.country:not(#vietnam_on)').openDOMWindow({ 
	eventType:'click', 
	height: 260,
	width: 480,
	windowBGColor: '#f4eee2'
	});
	
	$('#vietnam_on').openDOMWindow({ 
	eventType:'click', 
	height: 400,
	width: 480,
	windowBGColor: '#f4eee2'
	});
	
	var countries = ['myanmar', 'laos', 'cambodia', 'vietnam']
	$(countries).each(function() {
	   var country = this;
	   $("#" + country).hoverIntent({
	   	over: function() {$("#" + country + "_wrapper").fadeIn() },
	   	out: function() {},
	   	sensitivity: 20,
	   	intervaL: 100
	   });
	
	  // $("#" + country).mouseover(function(event){
	  //  	$("#" + country + "_wrapper").fadeIn()   
	  // });
	
	   $("#" + country + "_on").mouseout(function(event){
	   	$("#" + country + "_wrapper").fadeOut()   
	   });
	})
	


});






