if (typeof HD.community == "undefined" || !HD.community) {
	/** A container of Community media content types. */
	HD.community = {
		/** An enumeration of possible Community content types. */
		CONTENT_TYPES : {
			BLOG : "blog",
			PHOTO : "photo",
			VIDEO : "video",
			BOTH : "both"
		},
		
		/** 
		 * Returns the base type based on a KickApps content type (blogs have subtypes)
		 * @param {string} contentType The content type to check
		 * @returns {string} The base content type
		 */
		getType : function(contentType) {
			if(contentType.indexOf(" ") < 0) {
				return contentType;
			}
			
			var subTypes = contentType.split(" ");
			return subTypes[1];
		},
		
		/** 
		 * Returns whether a given content type is a photo
		 * @returns {boolean}
		 */
		isPhoto : function(contentType) {
			return this.getType(contentType) == this.CONTENT_TYPES.PHOTO;
		},
		
		/** 
		 * Returns whether a given content type is a video
		 * @returns {boolean}
		 */
		isVideo : function(contentType) {
			return this.getType(contentType) == this.CONTENT_TYPES.VIDEO;
		},
		
		/** 
		 * Returns whether a given content type is a blog
		 * @returns {boolean}
		 */
		isBlog : function(contentType) {
			return this.getType(contentType) == this.CONTENT_TYPES.BLOG;
		},
		
		/** 
		 * Returns whether a given content type is both (photo + video)
		 * @returns {boolean}
		 */
		isBoth : function(contentType) {
			return this.getType(contentType) == this.CONTENT_TYPES.BOTH;
		}
	};
}

HD.register('hd_community', 'HD.community', {version: "1.0", build: "1"});
