/* Author: WKJackson

*/

$(document).ready(function() {
  // lettering and fittext to logo
  $("#vn_logo").fitText(0.7).lettering().css("background-image", "url(/images/vn-logo-slash.png)");
  $("#vn_logo_sq").lettering().css("background-image", "url(/images/vn-logo-slash-sq-sm.png)");
  
  // home hover
  
  
  
  // shooter hover  
  $(".shooter a").append("<ul class='hover'></ul>");
  $(".shooter a").hover(function() {
    var hoverText = $(this).attr("title").replace( /(?:^|,)(\"(?:[^\"]+|\"\")*\"|[^,]*)/g, '<li>$1</li>');
    // hoverText = hoverText.replace(/(\w+),?/g, '<li>$1</li>');

    $(this).find("ul").html(hoverText);
    $(this).find("ul").animate({opacity: "show"}, "fast");
    $(this).find("ul").css("background-color", "rgba(0,0,0,0.75)");
  }, function() {
    $(this).find("ul").animate({opacity: "hide"}, "slow");
  });
  
  
  // get tumblr last
  
  $.getScript("//tumblr.verbnoun.com/api/read/json?num=5&type=photo", function(){
    $('#tumblr_box img').attr("src", "/images/blank.png");
    $('#tumblr_box').css("background-image", "url(" + tumblr_api_read["posts"]["0"]["photo-url-250"] + ")");
    
  });
  
});

