You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

75 lines
2.2 KiB
JavaScript

// JavaScript Document
$(function(){
$(".menuHover").hover(function(){
$(this).addClass("sildeActive");
$(this).find(".sildeBox").show();
},function(){
$(this).removeClass("sildeActive");
$(this).find(".sildeBox").hide();
});
});
$(function(){
$(".menuHover1").hover(function(){
$(this).addClass("sildeActive1");
$(this).find(".sildeBox").show();
},function(){
$(this).removeClass("sildeActive1");
$(this).find(".sildeBox").hide();
});
});
$(function(){
$(".menuHover3").hover(function(){
$(this).addClass("sildeActive3");
$(this).find(".sildeBox").show();
},function(){
$(this).removeClass("sildeActive3");
$(this).find(".sildeBox").hide();
});
});
$(function(){
$(".menuHover4").hover(function(){
$(this).addClass("sildeActive4");
$(this).find(".sildeBox").show();
},function(){
$(this).removeClass("sildeActive4");
$(this).find(".sildeBox").hide();
});
});
// social media bar
function scrollShareOptions(el) {
var top = el.offsetTop;
var left = el.offsetLeft;
var width = el.offsetWidth;
var height = el.offsetHeight;
while(el.offsetParent) {
el = el.offsetParent;
top += el.offsetTop;
}
if(typeof window.pageYOffset!= 'undefined'){
return (top < window.pageYOffset);
} else {
if(typeof document.documentElement.scrollTop!='undefined'){
return (top < document.documentElement.scrollTop);
}
}
}
var runonce = 0;
$(window).bind('scroll', function(e) {
var el = document.getElementById('header')
if (scrollShareOptions(el)) {
if(runonce==1){
runonce = 0
$('#ShareBar').animate({ top: 20 }, 'slow', function() {});
}
} else {
if (runonce == 0) {
runonce = 1
$('#ShareBar').animate({ top: 155 }, 'slow', function() { });
}
}
});
$(function(){
var actstr = $('ul.leftNav li.active a').html();
$('ul.leftNav li.active').html(actstr)
})