jQuery.getCategoryFeed=function(a){a=jQuery.extend({url:null,data:null,success:null},a);if(a.url){$.ajax({type:"GET",url:a.url,data:a.data,dataType:"xml",success:function(b){var c=new JCategory(b);if(jQuery.isFunction(a.success)){a.success(c)}},error:function(b){if(jQuery.isFunction(a.failure)){a.failure(b)}}})}};function JCategory(a){if(a){this.parse(a)}}JCategory.prototype={type:"",version:"",title:"",items:"",id:"",totalItems:"",categoryurl:"",parse:function(b){if(jQuery("categories",b).length==1){this.type="rss";var a=new JCat(b)}if(a){jQuery.extend(this,a)}}};function JCategoryItem(){}JCategoryItem.prototype={title:"",items:"",id:"",totalItems:"",categoryurl:""};function JCat(a){this._parse(a)}JCat.prototype={_parse:function(b){var a=jQuery("categories",b).eq(0);this.categoryurl=jQuery(a).find("categoryurl:first").text();this.title=jQuery(a).find("title:first").text();this.playlistid=jQuery(a).find("playlistid:first").text();this.totalItems=jQuery(a).find("category:first").attr("totalItems");this.items=new Array();var c=this;jQuery("category",b).each(function(){var d=new JCategoryItem();d.title=jQuery(this).find("title").eq(0).text();d.id=jQuery(this).find("playlistid").eq(0).text();d.totalItems=jQuery(this).attr("totalItems");c.items.push(d)})}};
