

/* encapsulates Twitter widget view and creation */

function createTwitterWidget( userName, domNode ) {


var o = new TWTR.Widget({
  id : domNode,

  version: 2,
  type: 'profile',
  rpp: 4,
  interval: 6000,
  loop: true,

  width: "100%",
  height: 180,

  theme: {

    shell: {
      background: 'transparent',
      color: '#aa3344'
    },

    tweets: {

      xbackground: 'transparent',
	  background: 'rgba( 44,8,0, 0.4);',
      color: '#fefaf0',
      links: '#45dcff'
    }
  },

  features: {
    scrollbar: true,
    loop: false,
		// rate limited to 150 / per hour / client on Twitter
    live: false,

    hashtags: true,
    timestamp: true,
    avatars: false,
	fullscreen: false,
    behavior: 'all'
  }
}).render().setUser( userName ).start();

//return o;
}


// twitter events
function  _twitterWidget_onProfileAnchorClick ( userId, ctx ) {
	console.log( userId );
	var url = "http:///www.twitter.com/" + userId;

	// show user's profile page
}

function  _twitterWidget_onProfileAnchorMouseover ( userId, ctx ) {
	console.log( userId );
}




