code: function(state, country, $root){
  			// Show only if requested to show, and country is set
  			if(state == 'show' && country){
  
  				// Skip changing flag if is the same
  				if($root.data('country') == country){
  					$root.removeClass('flag-hide');
  					return;
  				}
  
  				// Save current flag
  				$root.data('country', country);
  
  				// Change flag animating it (Fade out, change, fade in)
  				var imgPath = this.buildFlagPath(country);
  				$root.addClass('flag-hide');
  				setTimeout(function(){
  					$root.find('.flag').attr('src', imgPath);
  					$root.show();
  					$root.removeClass('flag-hide');
  				}, 800);
  			}else{
  				$root.addClass('flag-hide');
  			}
  		}
docs: Animates flag