function Home(config) {
    this._config = config;
    this.initEvents();
}
Home.prototype = {
    initEvents: function() {
	var _context = this;
        $(document).ready(function(){
            _context.tabAction();
            $('.slider').carousel({		
                dispItems:2,
		nextBtn:'<a href="JavaScript:void(0);"></a>',
		prevBtn:'<a href="JavaScript:void(0);"></a>'
            });
	    $(document.createElement('iframe'))
		.prop({
		    src:'http://www.facebook.com/plugins/likebox.php?href=http://www.facebook.com/pages/memoMiiO/126999793995044&width=495&colorscheme=light&show_faces=false&stream=true&header=false&height=355',
		    scrolling:'no',
		    frameborder:0
		})
		.css({
		    border:'none',
		    overflow:'hidden',
		    width:'495px',
		    height:'355px'
		})
		.appendTo('#facebook div');
//	    new TWTR.Widget({
//		id:'twitter-div',
//                version:2,
//                type:'profile',
//                rpp:4,
//                interval:6000,
//                width:505,
//                height:355,
//                theme: {
//                    shell: {
//                        background:'#d0d8d8',
//                        color:'#ec008a'
//                    },
//                    tweets: {
//                        background:'#e9e9e9',
//                        color:'#6c6c6c',
//                        links:'#6c6c6c'
//                    }
//                },
//                features: {
//                    scrollbar:false,
//                    loop:false,
//                    live:false,
//                    hashtags: true,
//                    timestamp:true,
//                    avatars:false,
//                    behavior:'all'
//                }
//            }).render().setUser('memoMiiO').start();
$(document.createElement('iframe'))
  .prop({
      src:'twitter.html',
      scrolling:'no',
      frameborder:0
  })
  .css({
      border:'none',
      overflow:'hidden',
      width:'515px',
      height:'355px'
  })
  .appendTo('#twitter-div');

        });
    },
    tabAction:function(){
        $('ul.tablink, ul.sociallink, ul.tab-container').each(function(){
            var tabContainer = this;
            var tabContainers = $(this).next('div').children('div');
            tabContainers.css('visibility','hidden').filter(':first').css('visibility', 'visible');
	    tabContainers.css('overflow','hidden').filter(':first').css('overflow', 'visible');
	    tabContainers.css('height','0px').filter(':first').css('height', 'auto');
            $('a', this).click(function (e){
		e.preventDefault();
                tabContainers.css('visibility', 'hidden');
		tabContainers.css('height', '0px');
		tabContainers.css('overflow', 'hidden');
                $(tabContainers).filter(this.hash).css('visibility', 'visible');
		$(tabContainers).filter(this.hash).css('height', 'auto');
		$(tabContainers).filter(this.hash).css('overflow', 'visible');
                $('a.active', tabContainer).removeClass('active');
		var li = $(this).parentsUntil(tabContainer, 'li');
		$('a', li).addClass('active');
            });
        });
    }
}
