/**
 * App
 * 
 * 
 */

// global reference
var  App = {
	
	/**
	 * App.log()
	 * Logs to Firebug's console.log (if it is detected)
	 */
	log: function()
	{
		if (typeof console != 'undefined') { // only apply when Firebug's available
			console.log.apply(console,arguments);
		}
	},
	
	/**
	 * Methods that need to be run at loading or DOM load 
	 */
	init: function() 
	{
	  // this.fix_targets(); // not necessary for html5, only for xhtml strict
	  
	  jQuery(document).ready(function($) {
	    
	    // put methods that should only be run on DOM Ready here
	    
	  });
	  
	}
	
	/**
	 * Fix <a href="" target="_blank"> for xhtml-strict
	 * Now use <a href="" data-target="_blank"> instead 
	 * 
	 * This is using .live() because it handles future DOM elements as well
	 * returns false or event.preventDefault(); to stop event
   * see: http://api.jquery.com/live/
   * 
   * NOTE: This still only seems to be available after complete DOM load...
	 
	fix_targets: function() 
	{
	  $('a[data-target]').live({
	    click: function(event) {
	      $(this).attr("target",$(this).data("target"));	      
	    }
	  });	  
	}
	*/
};

App.init();

