Advertisement
swarley

main.js

Jan 11th, 2012
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function hook() {
  2.     $('logo').addEvent('mouseover', mouseover);
  3.     $('logo').addEvent('mouseout', mouseoff);
  4. }
  5.  
  6. function mouseover() {
  7.  
  8.     $('logo').tween('height', height_to_p(80));
  9.     $('logo_text').setStyle('display', 'block');
  10.     $('logo_text').fade('in');
  11.     $('fabface').setStyle('display', 'block');
  12.     $('fabface').fade('in');
  13.  
  14. }
  15.  
  16. function mouseoff() {
  17.  
  18.     $('logo_text').fade('out');
  19.     $('fabface').fade('out');
  20.     $('logo').tween('height', '60px');
  21. }
  22.  
  23. function height_to_p(prec) { return (height/100)*prec; }
  24.  
  25. function width_to_p(prec) { return (width/100)*prec; }
  26.  
  27. function resize() { width = window.innerWidth; height = window.innerHeight; }
  28.  
  29. var width = window.innerWidth;
  30. var height = window.innerHeight;
  31. window.onResize(resize);
  32. document.addEvent('domready', hook);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement