var content = new function() {
	this.params = {
		num:'', // The number of posts to return
		page:'', // Page to start on.  Number equals page number multiplied by number of posts
		id:false, // Specific post to call.   Negates number, page, type, and sub type
		type: '', //Post type, can be multiple.  Must be only tumblr, twitter, foursquare, or lastfm
		subtype: '', //Must be used with types.  Must match any of the types' contained data
		chrono:0, // Put 1 to display in reverse chronological order
		search:'' // Search posts for key words.
	}
	this.posts = [];
	this.parse = function ( data ) {
		//console.log(data);
		content.posts = data;
		$(content).trigger('contentLoaded');
	}
	this.load = function () {
		var data = {};
		 if( typeof(this.params.id) == 'number' )
            data.id = this.params.id;
        else{
            for( var i in this.params ){
                if( i != 'id' )
                    data[i] = this.params[i];
            }
        }
		$.ajax({
			url:'http://curtishiller.com/site2_service_v3.php',
			data:data,
			dataType:'json',
			success:this.parse
		});
	}			
}
