(function($) {
    $.viewer = {};
    /*
    * let the game begin
    */
    $(function(){
        var $loadGE = $('#loadGE').html();
        if($loadGE == 'true'){
            $.earth.startGE();
        }
        else{
            $.maps.startMaps();
        }
    });

$(function() {
				   // run the currently selected effect
				   function runEffect() {
						   // run the effect
						   $legend = $( "#legend" );
							if ($("#legend").is(":visible")) {
								 $( "#legend" ).hide("slide",{direction: 'left'});
							} else {
								$( "#legend" ).show("slide",{direction: 'left'});
							}
				   };

				   // set effect from select menu value
				   $( "#toggleLegend" ).click(function() {
						   runEffect();
						   return false;
				   });
		   });

})(jQuery);


