﻿TVI.Blog = function () {

    /* Private */

    /* Properties */

    var cmp = {};





    /* Methods */

    var init = function () {

        //set add comment form
        if ($('#blogAddCommentForm').length > 0){

            cmp.blogAddCommentForm = new TVI.Form({
        
                ID: 'blogAddCommentForm',
                query: 'Blog_addComment',
                data: {
                    articleID: TVI.Blog.articleID
                },
                success: function(d){

                    this.success();
                
                    TVI.fireEvent('blogCommentAdded', d.newID);
                
                }
        
            });
        
        }

    };





    /* Public */

    TVI.apply(cmp, {

        /* Properties */

        /* Methods */



    });


    TVI.ready(init);


    return cmp;


} ();
