$(document).scroll(function() {
var topBlock1 = document.getElementById('rec21532082').getBoundingClientRect().top;
var topBlock2 = document.getElementById('rec21607554').getBoundingClientRect().top;
var topBlock3 = document.getElementById('rec21593776').getBoundingClientRect().top;
var topBlock4 = document.getElementById('rec21696576').getBoundingClientRect().top;
if (topBlock1 <= 30 && 30 < topBlock2) {
$("div#nav21513976 li a").addClass("menu_dark").removeClass("menu_light");
$("div#nav21513976 li:last-child a").addClass("menu_light");
}
else if (topBlock2 <= 30 && 30 < topBlock3) {
$("div#nav21513976 li a").addClass("menu_light").removeClass("menu_dark");
}
else if (topBlock3 <= 30 && 30 < topBlock4) {
$("div#nav21513976 li a").addClass("menu_dark").removeClass("menu_light");
$("div#nav21513976 li:last-child a").addClass("menu_light");
}
else if (topBlock4 <= 30) {
$("div#nav21513976 li a").addClass("menu_light").removeClass("menu_dark");
}
else {
$("div#nav21513976 li a").addClass("menu_light").removeClass("menu_dark");
}
});
var classObject = ['place_button','phone_image'];
var objectVisible = [0,1];
var numberObject = 0;
while (numberObject < classObject.length) {
if (objectVisible[numberObject] == 1){
$("*[class^='"+classObject[numberObject]+"']").css("opacity","1");
numberObject++;
}
else {
$("*[class^='"+classObject[numberObject]+"']").css("opacity","0");
numberObject++;
}
}