
// remap jQuery to $
(function($){

 





 



})(window.jQuery);



// usage: log('inside coolFunc',this,arguments);
// paulirish.com/2009/log-a-lightweight-wrapper-for-consolelog/
window.log = function(){
  log.history = log.history || [];   // store logs to an array for reference
  log.history.push(arguments);
  if(this.console){
    console.log( Array.prototype.slice.call(arguments) );
  }
};

/*
 * jTwitter 1.1.1 - Twitter API abstraction plugin for jQuery
 *
 * Copyright (c) 2009 jQuery Howto
 *
 * Licensed under the GPL license:
 *   http://www.gnu.org/licenses/gpl.html
 *
 * URL:
 *   http://jquery-howto.blogspot.com
 *
 * Author URL:
 *   http://jquery-howto.blogspot.com
 *
 */
(function( $ ){
	$.extend( {
		jTwitter: function( username, numPosts, fnk ) {
			var info = {};

			// If no arguments are sent or only username is set
			if( username == 'undefined' || numPosts == 'undefined' ) {
				return;
			} else if( $.isFunction( numPosts ) ) {
				// If only username and callback function is set
				fnk = numPosts;
				numPosts = 5;
			}

			var url = "http://twitter.com/status/user_timeline/"
				+ username + ".json?count="+numPosts+"&callback=?";

			$.getJSON( url, function( data ){
				if( $.isFunction( fnk ) ) {
					fnk.call( this, data );
				}
			});
		}
	});
})( jQuery );

//plugins
//Input Preview Text
(function($) {
	var _options = {};
	var _inputElement = {};


	function onInputFocus(event) {
		$inputElement = $(event.currentTarget);
		if ($inputElement.val() === $inputElement.data('inputPreviewText')) {
			$inputElement.val("");
		}
	}


	function onInputBlur(event) {
		$inputElement = $(event.currentTarget);
		if ($inputElement.val() === "") {
			$inputElement.val($inputElement.data('inputPreviewText'));
		}
	}


	function init() {
		_inputElement.val(_options.inputPreviewText);
		_inputElement.data("inputPreviewText", _options.inputPreviewText);
		_inputElement.focus(onInputFocus);
		_inputElement.blur(onInputBlur);
	}
	$.fn.inputPreviewText = function(options) {
		_options = $.extend({},
		$.fn.inputPreviewText.defaults, options);
		_inputElement = $(this);
		init();
		return this;
	};
	//Public static options
	$.fn.inputPreviewText.defaults = {
		inputPreviewText: 'Search For Products'
	};
})(jQuery);



