/**
 * @section		: Global JavaScript functions
 * @project		: Dragon Plastics
 * @author		: Brian Dijkstra <brian@e-sites.nl>
 * @since		: 04-11-2011
 */

/**
 * Cache both window and document object for use later on
 */
var win = window,
	doc = win.document;

/**
 * Global wrapper around `console.log` (when available)
 *
 * @method log
 * @param {Any} Values to log
 */
win.log = function () {
	if ( this.console ) {
		console.log.apply(console, arguments);
	}
};

/**
 * Handles external links based on rel="external"
 * @author Boye Oomens <boye@e-sites.nl>
 * @param none
 * @return {Boolean}
 */
function setExtLinks() {
	this.target = '_blank';
}

/**
 * Helper function as alias for getElementById, mainly used to see if a certain DOM element exists
 * @author Boye Oomens <boye@e-sites.nl>
 * @param {String} id - id selector without the hash character
 * @return {Boolean}
 */
function isset(id) {
	return !!doc.getElementById(id);
}

