// setup 'onload/onready' functions
$(document).ready(function() {
  $("#headernav li").prepend("<img class='tab-side' src='/media/tab-side.png' />");
  setAnim();//reset location of anim

});

function setAnim() { //once a browser resize happens set the vert position of the animation to ensure it does not cover menu
    var vph = window.innerHeight ? window.innerHeight : $(window).height();
    //alert("I'm done resizing for the moment  " + vph+'px');
    if (vph<640) {
      $('div#fhead').css('top', '365px');
    } else {
      //$('div#fhead').css('top', (vph-195)+'px');
      $('div#fhead').css({'bottom':'0px', 'top':'auto'});
    }
};

var resizeTimer = null; //lets setup an event response to a 
$(window).bind('resize', function() {
    if (resizeTimer) clearTimeout(resizeTimer);
    resizeTimer = setTimeout(setAnim, 300);
});
