/* * AlienScience JS */ jQuery(document).ready(function() { /* Homepage slider */ jQuery('#slider').bxSlider({ pager: true, captions: true }); /* Slider icon animation */ jQuery(".slide-image").hover(function(){ jQuery(this).find(".fa").animate({ width: "148px", height: "148px", fontSize: "148px", padding: "-=10px" }, 300); }, function() { jQuery(this).find(".fa").animate({ width: "128px", height: "128px", fontSize: "128px", padding: "+=10px" }, 120); }); /* Header icon animation */ jQuery(".header-button").hover(function(){ jQuery(this).find(".button-icon").animate({ width: "64px", height: "64px", marginTop: "-=40px" }, 300); jQuery(this).find(".button-fa").animate({ width: "64px", height: "64px", fontSize: "64px", marginTop: "-=40px" }, 300); jQuery(this).find(".button-text").animate({ opacity: "0", marginTop: "+=16px" }, 300); }, function() { jQuery(this).find(".button-icon").animate({ width: "32px", height: "32px", marginTop: "+=40px" }, 120); jQuery(this).find(".button-fa").animate({ width: "32px", height: "32px", fontSize: "32px", marginTop: "+=40px" }, 120); jQuery(this).find(".button-text").animate({ opacity: "1", marginTop: "-=16px" }, 120); }); /* Bullet point animation (requires background animation plugin) */ jQuery(".widget ul li a").hover(function(){ jQuery(this).animate({ backgroundPosition: "(7px 7px)" }, 80); }, function() { jQuery(this).animate({ backgroundPosition: "(-5px 7px)" }, 240); }); /* Responsive menu */ jQuery('#access').prepend('
'); jQuery('#access #menu-button').on('click', function(){ var menu = jQuery('#access').find('div'); if(menu.hasClass('open')) { menu.removeClass('open'); jQuery(this).removeClass('opened'); } else { menu.addClass('open'); jQuery(this).addClass('opened'); } }); /* Flash hacks */ var src; jQuery("iframe").each(function(){ src = jQuery(this).attr("src"); jQuery(this).attr("src", src+"?wmode=opaque"); }); /* Plugin hacks */ jQuery(".remove_button").attr("value", "Remove"); });