Template:UCSC

$(document).ready(function(){ //Loading screen functionallity $('.loading').animate( {opacity:0}, 500, function(){ $('.loading').attr("style", "display:none"); } ); //Height responsiveness $(window).resize(function() { wheight = $(window).height(); $('.container').attr("style","height:"+(wheight)+"px;background-size:cover;"); $('.team-member-container').attr("style","height:"+wheight/2.7+"px;"); }); $(window).trigger('resize'); //Menu moveto container on item click functionallity $('.menu-item').on('click', function(){ $('.menu-item').removeClass('subselected'); $(this).addClass('subselected'); if($(this).attr("data")=="#top"){ $('html, body').animate({ scrollTop: 0 }, 1000); }else{ $('html, body').animate({ scrollTop: $($(this).attr("data")).offset().top-70 }, 1000); } }); //Hover of team members $('.team-member-container').on('mouseenter', function(){ $(this).children('.team-member-photo').attr("style", "background-image:url('"+$(this).attr("hover")+"');"); $(this).on('mouseleave', function(){ $(this).children('.team-member-photo').attr('style', "background-image:url('"+$(this).attr("data")+"');"); }); }); });