File: D:/HostingSpaces/SBogers10/bvi.komma-mediadesign.nl/wwwroot/css-js/bvi.js
// JavaScript Document
$(document).ready(function(){
$('#hoofdmenu li').click(function(){
window.location.href = $('a',this).attr('href');
});
$('#footermenu li').click(function(){
window.location.href = $('a',this).attr('href');
});
$('#citaat').click(function(){
window.location.href = $('a',this).attr('href');
});
/* $('.button').hover(function(){
$("> .left .up", this).stop().animate({"opacity": "0"}, "medium");
$("> .left .hover", this).stop().animate({"opacity": "1"}, "medium");
$("> .arrow .up", this).stop().animate({"opacity": "0"}, "fast");
$("> .arrow .hover", this).stop().animate({"opacity": "1"}, "fast");
},
function(){
$("> .left .up", this).stop().animate({"opacity": "1"}, "fast");
$("> .left .hover", this).stop().animate({"opacity": "0"}, "fast");
$("> .arrow .up", this).stop().animate({"opacity": "1"}, "medium");
$("> .arrow .hover", this).stop().animate({"opacity": "0"}, "medium");
});*/
$('.arrowLeft').hover(function(){
$("> .left", this).stop().animate({"width": "43px"}, "fast");
},
function(){
$("> .left", this).stop().animate({"width": "33px"}, "fast");
});
$('.mapsIcon').hover(function(){
$("> a .left", this).stop().animate({"width": "43px"}, "fast");
},
function(){
$("> a .left", this).stop().animate({"width": "33px"}, "fast");
});
$('.arrowRight').hover(function(){
$("> .right", this).stop().animate({"width": "43px"}, "fast");
},
function(){
$("> .right", this).stop().animate({"width": "33px"}, "fast");
});
$('.referentieLijst li').hover(function(){
$("> .image .label .left", this).stop().animate({"width": "43px"}, "fast");
},
function(){
$("> .image .label .left", this).stop().animate({"width": "33px"}, "fast");
});
var activeFoto = 0;
var totalFotos = $("#photoGallery li").length;
var fotoWidth = $("#photoGallery").width();
var ulWidth = totalFotos * fotoWidth;
$("#photoGallery ul").css({'width':ulWidth+'px'});
var galleryPlay = true;
$("#photoGallery li").eq(0).css({'display':'block'});
$("#galleryMenu li").eq(0).toggleClass("active");
function fotoRotateGallery(){
if(galleryPlay){
$.doTimeout( 4000, function(){
if(galleryPlay){
$("#galleryMenu li").eq(activeFoto).toggleClass("active");
if(activeFoto == 0){
$("#photoGallery ul").css("left", "0");
}
activeFoto = activeFoto + 1;
var newPos = activeFoto * fotoWidth * -1 + "px";
$("#photoGallery ul").stop().animate({"left": newPos}, "slow");
if(activeFoto == totalFotos - 1){ activeFoto = 0; }
$("#galleryMenu li").eq(activeFoto).toggleClass("active");
fotoRotateGallery();
}
});
}
}
fotoRotateGallery();
$('#galleryMenu li').each(function(index) {
$(this).click(function(e){
if(index != activeFoto){
if(index == 0 && index == totalFotos){
}else{
e.preventDefault;
clickProjectAction(index);
}
}
});
});
$('#header .arrowLeft').click(function(e){
e.preventDefault;
newFoto = activeFoto - 1;
if(newFoto < 0){ newFoto = totalFotos - 2; }
clickProjectAction(newFoto);
});
$('#header .arrowRight').click(function(e){
e.preventDefault;
newFoto = activeFoto + 1;
if(newFoto == totalFotos - 1){ newFoto = 0; }
clickProjectAction(newFoto);
});
function clickProjectAction(newProjectActive){
$("#galleryMenu li").eq(activeFoto).toggleClass("active");
galleryPlay = false;
var newPos = newProjectActive * fotoWidth * -1 + "px";
$("#photoGallery ul").stop().animate({"left": newPos}, "slow");
$("#galleryMenu li").eq(newProjectActive).toggleClass("active");
activeFoto = newProjectActive;
}
$('#buttonTop').click(function(){
$('html,body').animate({
scrollTop: 0
}, 1500);
});
});