$(function(){
  // image mouseover
  $('img.mo').hover(function(){
    var $this = $(this)
    ,src = $this.attr('src')
    ,mo = $this.attr('mo');
    $this.attr('moo', src);
    $this.attr('src', mo)
  },function(){
    var $this = $(this)
    ,src = $this.attr('src')
    ,moo = $this.attr('moo');
    $this.attr('src', moo);
  });
  
  // remove vertical scrollbar issue
  if($(window).height() > $('html').height()) $('html').css('overflow', 'hidden');
  $(window).resize(function(){
    if($(window).height() > $('html').height()) $('html').css('overflow', 'hidden');
    else $('html').css('overflow', 'auto');
  });
  
  // preload images
  $('.mo').each(function(n,a){
    var img = $(a).attr('mo');
    $('<img/>')[0].src = img;
  });
});
