jQuery(document).ready(function(){
	mapCountry();
	pseudoselect();
	fauxselect();
});

var fauxselect = function(){
	jQuery('#langChoice .inter').click(function() {
		jQuery(this).parent('li').toggleClass("sfHover");
		jQuery(this).parent().children('.content').toggleClass("contenton");
		return false;		
	});
	
	jQuery("#langChoice li").hover(
		function(){ }, 
		function() { jQuery(this).removeClass("sfHover"); } 
	);
};

var mapCountry = function(){
    jQuery('#map-country .bullet, #map-world .bullet').click(function() {
		jQuery('.bullet').removeClass("active");
		jQuery(this).toggleClass("active");
		jQuery('.data').hide();
		jQuery(this).parent().children('.data').animate({height: "toggle"}, 100);
		return false;		
	});
	
	jQuery('#map-country .close, #map-world .close').click(function() {
		jQuery(this).parent().parent().children('.bullet').removeClass("active");
		jQuery(this).parent('.data').hide();
		return false;		
	});
};

var pseudoselect = function(){
	jQuery('.language').hide();
	jQuery('#langChoice').show();
	
	/*jQuery('#langChoice .inter').click(function() {
		return false;
	});*/
	
	/*jQuery('#langChoice .inter').click(function() {
		jQuery(this).toggleClass("interon");
		jQuery(this).parent().children('.content').toggleClass("contenton");
		jQuery(this).parent().children('.content').animate({height: "toggle"}, 200);
		return false;
	});
	
	jQuery('.contenton li a').mouseout(function() {
		jQuery(this).animate({height: "toggle"}, 200);
		jQuery(this).removeClass("contenton");								   
	});	*/								   
	
};

/*  HOVERCLASS
----------------------------------------------------------------------------- */
jQuery.fn.hoverClass = function(c) {
	return this.each(function(){
		jQuery(this).hover( 
			function() { jQuery(this).addClass(c);  },
			function() { jQuery(this).removeClass(c); }
		);
		
	});
};

/*  SUCKERFISH
----------------------------------------------------------------------------- */
var suckerfish = function() {
	jQuery("#langChoice li").hover(
		function(){ jQuery("ul", this).fadeIn(); }, 
		function() { } 
	);
	if (document.all) {
		jQuery("#langChoice li").hoverClass("sfHover");
	}
}
