// usage: log('inside coolFunc', this, arguments);
// paulirish.com/2009/log-a-lightweight-wrapper-for-consolelog/
window.log = function(){
  log.history = log.history || [];   // store logs to an array for reference
  log.history.push(arguments);
  if(this.console) {
      arguments.callee = arguments.callee.caller;
      console.log( Array.prototype.slice.call(arguments) );
  }
};
// make it safe to use console.log always
(function(b){function c(){}for(var d="assert,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profileEnd,time,timeEnd,trace,warn".split(","),a;a=d.pop();)b[a]=b[a]||c})(window.console=window.console||{});


// (function ($) {
//   $.fn.twitter = function(options){
//     var output = $(this)
//     var defaults = {
//                       location: location.href,
//                       empty_message: 'No one has mentioned this article on Twitter yet. '+
//                                        '<a href="http://twitter.com?status='+ location.href +'">'
//                                        +'You should be the first</a>!',
//                       limit: 50
//                    }
//     options = $.extend({}, defaults, options)
// 
//     function format_tweetback(tweetback) {
//       formatted  = ''
//       formatted += '<div class="twitter">'
//       formatted +=   '<a href="'+tweetback.permalink_url+'">'
//       formatted +=     '<img src="'+tweetback.author.photo_url+'" />'
//       formatted +=   '</a>'
//       formatted +=   '<div class="twitter_pointer"></div>'
//       formatted +=   '<div class="twitter_tweet" style="display: none">'
//       formatted +=     '<div class="twitter_handle">@'+tweetback.author.url.split('/').pop()+'</div>'
//       formatted +=     '<div class="twitter_content">'+tweetback.content+'</div>'
//       formatted +=   '</div>'
//       formatted += '</div>'
//       return formatted
//     }
// 
//     var parse_request = function(data){
//       var author_urls = []
//       if(data.response.list.length > 0) {
//         $.each(data.response.list, function(i,tweetback){
//           if($.inArray(tweetback.author.url,author_urls) > -1) {
//             return true
//           }
//           author_urls.push(tweetback.author.url)
//           output.append(format_tweetback(tweetback))
//         })
//         $('.twitter').mouseover(function(){ $(this).children('.twitter_tweet, .twitter_pointer').show() })
//         $('.twitter').mousemove(function(kmouse){
//           $(this).children('.twitter_tweet').css({
//             left:$(this).position().left-105,
//             top:$(this).position().top+25
//           })
//           $(this).children('.twitter_pointer').css({
//             left:$(this).position().left+18,
//             top:$(this).position().top+15
//           })
//         })
//         $('.twitter').mouseout(function(){ $(this).children('.twitter_tweet, .twitter_pointer').hide() })
//       } else {
//         output.append(options.empty_message)
//       }
//     }
// 
//     $.ajax({
//       url:'http://otter.topsy.com/trackbacks.js',
//       data:
//         {
//           url: options.location,
//           perpage: options.limit
//         },
//       success:parse_request,
//       dataType:'jsonp'}
//     )
// 
//     return this
//   }
// })(jQuery)

