Team:Alberta/application.js

From 2011.igem.org

Revision as of 03:41, 12 July 2011 by HelenZ (Talk | contribs)

// This file for javascript that we want to include on all pages

$(document).ready(function(){

 // show the drop down list on hover
 $('li.headlink').hover(
   /*function() { $('ul', this).show(); },
   function() { $('ul', this).hide(); }*/
   function() { $('ul', this).css('display', 'table') },
   function() { $('ul', this).css('display', 'none') }
 );

});


   if (document.images)
   {
     preload_image_object = new Image();
     // set image url
     image_url = new Array();
     image_url[0] = "TeamAlbertaButton1.JPG";
     image_url[1] = "TeamAlbertaButton1-Hover-v1.JPG";
     image_url[2] = "TeamAlberta-Button2.JPG";
     image_url[3] = "TeamAlberta-Button2-Hover-v1.JPG";
     image_url[4] = "Notebook.JPG";
     image_url[5] = "TeamAlberta-Button3-Hover-v1.JPG";
      var i = 0;
      for(i=0; i<=5; i++) 
        preload_image_object.src = image_url[i];
   }