/**
 * Used to log to the console.
 */
jQuery.fn.log = function (msg)
{
	try
	{
		if (console)
			console.log("%s: %o", msg, this);
	}
	catch(e) {}

	return this;
}

/**
 * Handy way to do if exists on jQuery selectors.
 */
jQuery.fn.exists = function() { return jQuery(this).length > 0; }
