$(document).ready(function() {
  var username='';

  if($('#twitter-feed').length>0) {
    $('#twitter-feed .loading').text('Loading...');
    var classes=$('#twitter-feed').attr('class').split(' ');
    for(i=0; i<classes.length; i++) {
      if(classes[i].search('user-')!=-1)
        username=classes[i].replace('user-','');
    }
  }

  if(username.length>0) {
    $.Juitter.start({
  		searchType:'fromUser', //needed, you can use 'searchWord', 'fromUser', 'toUser'
  		searchObject:username, //needed, you can insert a username here or a word to be searched for, if you wish multiple search, separate the words by comma.
  		lang:'en', //restricts the search by the given language
  		placeHolder:'twitter-feed', //Set a place holder DIV which will receive the list of tweets example <div id='juitterContainer'></div>
  		loadMSG:'Loading messages...', //Loading message, if you want to show an image, fill it with 'image/gif' and go to the next variable to set which image you want to use on 
  		total:3, //number of tweets to be show - max 100
  		nameUser:'image', //insert 'image' to show avatar of 'text' to show the name of the user that sent the tweet 
  		openExternalLinks:'newWindow' //here you can choose how to open link to external websites, 'newWindow' or 'sameWindow'
  	});
	}
});