function MyFavoritesModule(){


    this._name = MyFavoritesModule.NAME;
    this._isSelf = false;

    //this._uuid = StringUtil.getQueryParams(window.location.search)["uuid"];

    this.initialize = function(){
        
     };


    this.getInitRequests = function(){
        if (!this._uuid){
            var req= [
              { "methodName" : "profileService.getPrivateProfile" }
            ];
        }
//        else{
//           var req= [
//            { "methodName": "profileService.getFullProfile", "userUuid": this._uuid }
//        ];
//        }
        return req;
    };

    this.handleResObjects = function(resObjects){
        for (var i = 0; i < resObjects.length; i++) {
            var res = resObjects[i];
            if (res.methodName == "profileService.getPrivateProfile") {
                this._handlePrivateProfileInfoRes(res.response);
            }
//            else if (res.methodName == "profileService.getFullProfile") {
//                this._handlePrivateProfileInfoRes(res.response.profile);
//            }
        }
    };

    this._handlePrivateProfileInfoRes = function(res) {

        if (res.relationship == 'self'){ //sanity check
            this._isSelf = true;
        }
        $(".pageHeader h1").html(res.userName+"\'s Favorites");
        $(".pageHeader .backLink a").html("Back to "+ res.userName+"\'s Profile");
        $(".pageHeader .backLink a").attr("href", "/profile/" +  res.profilePath);
        $(".pageHeader .userIcon img").attr("src", ProfileUtil.getImg({userUuid:res.uuid,userPicSet:res.userPicSet,size:"small"}));


    };

}
MyFavoritesModule.NAME = "MyFavoritesModule";

MyFavoritesModule.prototype = new Module();

