// JavaScript Document (function($) { var cache = []; // Arguments are image paths relative to the current page. $.preLoadImages = function() { var args_len = arguments.length; for (var i = args_len; i--;) { var cacheImage = document.createElement('img'); cacheImage.src = arguments[i]; cache.push(cacheImage); } } })(jQuery) jQuery.preLoadImages("/images/bg_new_donor-over.png", "/images/bg_current_donor-over.png", "/images/bg_location-over.png", "/images/bg_donate_again-over.png", "/images/bg_new_donor-over.gif", "/images/bg_current_donor-over.gif", "/images/bg_location-over.gif", "/images/bg_donate_again-over.gif"); $(function(){$('.tab#new_donor').hover(function() {$(this).css({backgroundImage: 'url("/images/bg_new_donor-over.png")'});}, function() {$(this).css({backgroundImage: 'url("/images/bg_new_donor.png")'});});}) $(function(){$('.tab#current_donor').hover(function() {$(this).css({backgroundImage: 'url("/images/bg_current_donor-over.png")'});}, function() {$(this).css({backgroundImage: 'url("/images/bg_current_donor.png")'});});}); $(function(){$('.tab#nearest_location').hover(function() {$(this).css({backgroundImage: 'url("/images/bg_location-over.png")'});}, function() {$(this).css({backgroundImage: 'url("/images/bg_location.png")'});});}); $(function(){$('.tab#donate_again').hover(function() {$(this).css({backgroundImage: 'url("/images/bg_donate_again-over.png")'});}, function() {$(this).css({backgroundImage: 'url("/images/bg_donate_again.png")'});});}); $(function(){$('.tab#nearest_location').hover(function() {$(this).stop().animate({marginTop: 0});}, function() {$(this).stop().animate({marginTop: 54});});}); $(function(){$('.tab#donate_again').hover(function() {$(this).stop().animate({marginTop: 0});}, function() {$(this).stop().animate({marginTop: 54});});}); $(document).ready(function() { $('#slideshow').cycle({ fx: 'fade', timeout: 9000, speedIn: 0, speedOut: 0, delay: 4000, cleartype: false }); });