/**
 * jquery.sv.core.js extends the jquery framework to create a unified, namespaced
 * set of plugins for simpleview sites
 */
;(function($){
	$.sv = $.sv || {version: '0.0.0'};

	// use the following syntax to add plugins to the sv namespace
	$.extend($.sv, {
		init: function( options ) {
			var defaults = {
				// nothing here yet, but this can be used to store global data instead of
				// using the global namespace
			};

			var options = $.extend(defaults, options);

			$.data(document,'sv',options); // we can use this to grab global data
		}
	});

	$.fn.sv = function( plugin ) {
		
		if ( $.isFunction($.sv[plugin]) ) {
			return $.sv[plugin].apply( this, Array.prototype.slice.call( arguments, 1 ));
		} else if ( typeof plugin === 'object' || ! plugin ) {
			return $.sv.init.apply( this, arguments );
		} else {
			$.error( 'Plugin ' + plugin + ' does not exist on jQuery.sv' );
		}

	};
})(jQuery);

