
var index = yantarDefault.index= function() {
    var pub = {
        initialize : function() {
            
            var myFeed      = $('#myFeed');
            var otherFeed   = $('#otherFeed');

            myFeed.click(function(){
                $.ajax({
                    url: '/user/feed/my',
                    dataType: 'json',
                    asynchronous: false,
                    success: function( data ) {
                        if ( data.html )  {
                            var feedContainer = $('.feedList').parent();
                            feedContainer.empty();
                            feedContainer.append(data.html);
                            otherFeed.removeClass('active');
                            myFeed.addClass('active');
                        }
                    }
                });
                return false;
            });

            otherFeed.click(function(){
                $.ajax({
                    url: '/user/feed/other',
                    dataType: 'json',
                    asynchronous: false,
                    success: function( data ) {
                        if ( data.html )  {
                            var feedContainer = $('.feedList').parent();
                            feedContainer.empty();
                            feedContainer.append(data.html);
                            otherFeed.addClass('active');
                            myFeed.removeClass('active');
                        }
                    }
                });
                return false;
            });
        }
    };
    $(pub.initialize);
    return pub;
}();
