/* Author: Jelmer de Maat */

$('.no-textshadow blockquote p').each(
  function(i){
    $(this).attr('data-content', $(this).text() );
});

$('.tweet').tweet({
  username: 'jelmerdemaat',
  count: '1',
  retweets: false,
  loading_text: "Loading latest tweet...",
  refresh_interval: '60',
  template: '{text}'
});

/* BACK TO TOP */
/*
$('section').hover(function(){
  var section = $(this);
  section.append('<span class="backtotop"><a href="#">Back to top</a></span>')
  var el = section.find('.backtotop');
  $(el).hide().css('margin-left', $(el).width()*-.5).fadeIn(200);
}, function(){
  var el = $(this).find('.backtotop');
  el.fadeOut(100, function(){ el.remove() });  
});
*/

$('section').fitVids();

/* Polyfill for media queries */

Modernizr.load({
  test: Modernizr.mq('only screen and (max-width: 960px)'),
  yep : '',
  nope: 'js/libs/respond.min.js'
});

$("nav a:contains('Webby')").hover(
  function(){
    $(this).css('color','rgba(255,255,255,.1)').append('<span class="comingsoon">Coming soooon...</span>');
  }, function(){
    $(this).css('color','rgba(255,255,255,.9)').find('span').remove();  
});
