File: D:/HostingSpaces/SBogers10/promic.komma.pro/wwwroot/css-js/promic.js
// JavaScript Document
/*var postionTopVerticalLine = 0;
function headerImageSize(){
var innerWidth = $(window).innerWidth();
$("#headerSlider li").css('width', innerWidth+'px');
$("#fullHorizonLine .line").css('width', innerWidth+'px');
$("#fullHorizonLine .line").css('margin-left', '-'+(innerWidth/2)+'px');
var offsetFooter = $("#footer").offset();
var offsetMainframe = $("#mainframe").offset();
var posFooter = offsetFooter.top - offsetMainframe.top + postionTopVerticalLine;
if($("#contentPromic.nieuws").length){ posFooter = posFooter - 360; }
posFooter = posFooter - 150;
$("#fullVerticalLine .line").css('height', posFooter+'px');
} */
var firstTime = true;
var urlWaarde;
var hoofdmenuItem;
var submenuItem;
function pageRefreshFunction(urlWaardeRequest){
urlWaarde = urlWaardeRequest.toLowerCase();
if (urlWaarde.substr(urlWaarde.length - 1) != '/') {
urlWaarde += '/';
}
urlWaarde = urlWaarde.substr(1, (urlWaarde.length - 2));
var waardes = urlWaarde.split('/');
hoofdmenuItem = waardes[0];
submenuItem = waardes[0]+"_"+waardes[1];
$("#productContainer").ready(function(){
nieuwePaginaReset();
nieuwHoofdmenuItem(hoofdmenuItem);
nieuwSubmenuItem(submenuItem);
});
}
//Disable right click for video's
/*
$('.video_frame').bind('contextmenu', function(e) {
return false;
});
*/
var galleryPlay = true;
var detailMenuWidth;
var activeFoto;
var totalFotos;
var fotoWidth;
var ulWidth;
var $spans;
var $paragraphs;
var $detailSlide;
var $liDetailList;
var $detailSlideMenu;
var $liSlideMenu;
var $uldetailSlide;
var $productDetails;
function detailSlideGallery(){
if(galleryPlay){
$.doTimeout('galleryTimer', 4000, function(){
if(galleryPlay){
$spans.eq(activeFoto).stop().animate({color: "#919194"}, "fast");
$paragraphs.eq(activeFoto).stop().animate({color: "#919194"}, "fast");
$liSlideMenu.eq(activeFoto).toggleClass("active");
$liDetailList.eq(activeFoto).stop().animate({"margin-left": "0px"}, "fast");
if(activeFoto == 0){
$uldetailSlide.css("left", "0");
}
activeFoto = activeFoto + 1;
var newPos = activeFoto * fotoWidth * -1 + "px";
$uldetailSlide.stop().animate({"left": newPos}, "slow");
if(activeFoto == totalFotos - 1){ activeFoto = 0; }
$spans.eq(activeFoto).stop().animate({color: "#f58326"}, "fast");
$paragraphs.eq(activeFoto).stop().animate({color: "#f58326"}, "fast");
$liSlideMenu.eq(activeFoto).toggleClass("active");
$liDetailList.eq(activeFoto).stop().animate({"margin-left": "50px"}, "fast");
detailSlideGallery();
}
});
}
}
function nieuwePagina(){
$uldetailSlide.css({'width':ulWidth+'px'});
galleryPlay = true;
$liSlideMenu.eq(0).toggleClass("active");
$spans.eq(0).css("color","#f58326");
$paragraphs.eq(0).css("color","#f58326");
$liDetailList.eq(0).stop().animate({"margin-left": "50px"}, "fast");
if(firstTime){
firstTime = false;
}
detailSlideGallery();
$liSlideMenu.each(function(index) {
$(this).click(function(e){
e.preventDefault;
clickSlideAction(index);
});
});
$liDetailList.each(function(index) {
$(this).click(function(e){
e.preventDefault;
clickSlideAction(index);
});
});
function clickSlideAction(newSlideActive){
$liDetailList.eq(activeFoto).stop().animate({"margin-left": "0px"}, "fast");
$liSlideMenu.eq(activeFoto).toggleClass("active");
$spans.eq(activeFoto).stop().animate({color: "#919194"}, "fast");
$paragraphs.eq(activeFoto).stop().animate({color: "#919194"}, "fast");
galleryPlay = false;
var newPos = newSlideActive * fotoWidth * -1 + "px";
$uldetailSlide.stop().animate({"left": newPos}, "slow");
$spans.eq(newSlideActive).stop().animate({color: "#f58326"}, "fast");
$paragraphs.eq(newSlideActive).stop().animate({color: "#f58326"}, "fast");
$liSlideMenu.eq(newSlideActive).toggleClass("active");
$liDetailList.eq(newSlideActive).stop().animate({"margin-left": "50px"}, "fast");
activeFoto = newSlideActive;
}
}
function nieuwePaginaReset(){
if($('#producten').length){
productenOverzicht();
}
$.doTimeout( 'galleryTimer' );
$spans = $("#detailList li span");
$paragraphs = $("#detailList li p");
$liDetailList = $('#detailList li');
$detailSlideMenu = $("#detailSlideMenu");
$liSlideMenu = $("#detailSlideMenu li");
$detailSlide = $("#detailSlide li");
$uldetailSlide = $("#detailSlide ul");
$productDetails = $("#detailSlide")
activeFoto = 0;
totalFotos = $detailSlide.length;
fotoWidth = $productDetails.width();
ulWidth = totalFotos * fotoWidth;
galleryPlay = true;
ctaButtons();
nieuwePagina();
}
function ctaButtons(){
$('a[rel="ctaKnop"]').addClass("ctaButton ctaBlack ctaAnimation");
$('a[rel="ctaKnopTop"]').addClass("buttonTop ctaButton animationOrange");
$('#inlogKnop').addClass("ctaButton ctaOrange animationOrange");
$('#uitlogKnop').addClass("ctaButton ctaOrange animationOrange");
$('.animationOrange').hover(function(){
$("> .left .up", this).stop().animate({"opacity": "0"}, "fast");
$("> .left .hover", this).stop().animate({"opacity": "1"}, "fast");
$("> .right .up", this).stop().animate({"opacity": "0"}, "fast");
$("> .right .hover", this).stop().animate({"opacity": "1"}, "fast");
$("> .left .text", this).stop().animate({borderColor: "#b6b4b4"}, "fast");
},function(){
$("> .left .up", this).stop().animate({"opacity": "1"}, "fast");
$("> .left .hover", this).stop().animate({"opacity": "0"}, "fast");
$("> .right .up", this).stop().animate({"opacity": "1"}, "fast");
$("> .right .hover", this).stop().animate({"opacity": "0"}, "fast");
$("> .left .text", this).stop().animate({borderColor: "#e5a370"}, "fast");
});
$('.animationBlack').hover(function(){
$("> .left .up", this).stop().animate({"opacity": "0"}, "fast");
$("> .left .hover", this).stop().animate({"opacity": "1"}, "fast");
$("> .right .up", this).stop().animate({"opacity": "0"}, "fast");
$("> .right .hover", this).stop().animate({"opacity": "1"}, "fast");
$("> .left .text", this).stop().animate({borderColor: "#e5a370"}, "fast");
},function(){
$("> .left .up", this).stop().animate({"opacity": "1"}, "fast");
$("> .left .hover", this).stop().animate({"opacity": "0"}, "fast");
$("> .right .up", this).stop().animate({"opacity": "1"}, "fast");
$("> .right .hover", this).stop().animate({"opacity": "0"}, "fast");
$("> .left .text", this).stop().animate({borderColor: "#b6b4b4"}, "fast");
});
}
var activeFade = 0;
var submenuActive = 0;
var firstTimeMenuFade = true;
var hoofditemsArray = {};
var subitemsArray = {};
function nieuwHoofdmenuItem(hoofdmenuItemId){
$('#mainProductMenulist li').each(function(index) {
$(this).click(function(e){
e.preventDefault;
menuFadeAction(index);
});
});
function menuFadeAction(newFadeActive){
if(firstTimeMenuFade){
$("#subBlanco").css('display','none');
firstTimeMenuFade = false;
}else{
$("#mainProductMenulist li").eq(activeFade).toggleClass("active");
$("#subProductMenulist .subMenuList").eq(activeFade).stop().animate({opacity: 0}, "fast", function(){$(this).css('display','none')});
$("#subProductMenulist .subMenuList").eq(activeFade).css("z-index","1");
}
$("#subProductMenulist .subMenuList").eq(newFadeActive).css("z-index","10");
$("#subProductMenulist .subMenuList").eq(newFadeActive).css('display','block');
$("#subProductMenulist .subMenuList").eq(newFadeActive).stop().animate({opacity: 1}, "fast");
$("#mainProductMenulist li").eq(newFadeActive).toggleClass("active");
activeFade = newFadeActive;
}
menuFadeAction(hoofditemsArray[hoofdmenuItemId]);
}
function nieuwSubmenuItem(submenuItem){
$('#subProductMenulist li').each(function(index) {
$(this).click(function(){
submenuActiveAction(index);
});
});
function submenuActiveAction(newSubmenuActive){
$("#subBlanco").css('display','none');
$("#subProductMenulist li").eq(submenuActive).removeClass("active");
$("#subProductMenulist li").eq(newSubmenuActive).addClass("active");
submenuActive = newSubmenuActive;
function newProductTitle(subItemLi){
if(subItemLi != undefined){
var waardeH2 = $("#subProductMenulist li").eq(subItemLi).children("a").attr("name");
waardeH2 = "<span>/ "+waardeH2;
waardeH2 = waardeH2.replace('_',' /</span> ');
}else{
waardeH2 = "";
}
$("#productTitle").html(waardeH2);
}
newProductTitle(newSubmenuActive);
}
submenuActiveAction(subitemsArray[submenuItem]);
}
function productenOverzicht(){
var producten = $("#producten li");
producten.click( function(e) {
if(e.target.tagName != 'A') {
var btn = $(this);
$('#jsLoad').load('/save_viewportProductOverview.php', function(){ window.location.href = $('.content .subitemList ul .target a',btn).attr('href'); });
}
})
$('#producten li').hover(function(){
var hoogteWaarde = $("> .content .subitemList li", this).length * 30;
$("> .content .subitemList", this).stop().animate({height: hoogteWaarde+"px"}, "fast");
$("> .content .button", this).stop().animate({top: "0px"}, "fast");
//$("> .content .subitemList .title .icon", this).toggleClass("arrowDown");
$("> .content .subitemList .title", this).stop().animate({backgroundColor: "#F58326"}, "fast");
},function(){
$("> .content .subitemList", this).stop().animate({height: "30px"}, "fast");
$("> .content .button", this).stop().animate({top: "-40px"}, "fast");
//$("> .content .subitemList .title .icon", this).toggleClass("arrowDown");
$("> .content .subitemList .title", this).stop().animate({backgroundColor: "#aeaeae"}, "fast");
});
$('.subitemList .rollOver').hover(function(){
$(this).stop().animate({backgroundColor: "#F58326"}, "fast");
},function(){
$(this).stop().animate({backgroundColor: "#aeaeae"}, "slow");
});
}
$(document).ready(function(){
if($('#inklapTekst').length){
var inklapText = $('#inklapTekst').html();
}
$('#mainProductMenulist li a').each(function(index) {
hoofditemsArray[$(this).attr("id")] = index;
});
$('#subProductMenulist li a').each(function(index) {
subitemsArray[$(this).attr("id")] = index + 1;
});
nieuwePaginaReset();
postionTopVerticalLine = parseFloat($("#fullVerticalLine .line").css('top')) * -1;
$('#hoofdmenu li.notActive').hover(function(){
$('> a',this).stop().animate({color: "#f58326"}, "fast");
},function(){
$('> a',this).stop().animate({color: "#ffffff"}, "fast");
});
$('#footermenu li.notActive').hover(function(){
$('> a',this).stop().animate({color: "#f58326"}, "fast");
},function(){
$('> a',this).stop().animate({color: "#9a9999"}, "fast");
});
$('#talen .notActive').hover(function(){
$("> a .hover", this).stop().animate({"opacity": "1"}, "fast");
},function(){
$("> a .hover", this).stop().animate({"opacity": "0"}, "fast");
});
$('#clientLogin a').hover(function(){
$(this).stop().animate({color: "#FF661B"}, "fast");
$("> .slot .hover", this).stop().animate({"opacity": "1"}, "fast");
$("> .slot .up", this).stop().animate({"opacity": "0"}, "fast");
$("> .slotOpen .hover", this).stop().animate({"opacity": "1"}, "fast");
$("> .slotOpen .up", this).stop().animate({"opacity": "0"}, "fast");
},function(){
$(this).stop().animate({color: "#CCC"}, "fast");
$("> .slot .hover", this).stop().animate({"opacity": "0"}, "fast");
$("> .slot .up", this).stop().animate({"opacity": "1"}, "fast");
$("> .slotOpen .hover", this).stop().animate({"opacity": "0"}, "fast");
$("> .slotOpen .up", this).stop().animate({"opacity": "1"}, "fast");
});
var loginOpen = false;
$('#clientLogin .login').click(function(){
if(loginOpen){
$(this).toggleClass("active");
$("#header").stop().animate({"margin-top": "0px"}, "medium");
loginOpen = false;
}else{
$(this).toggleClass("active");
$("#header").stop().animate({"margin-top": "100px"}, "medium");
loginOpen = true;
}
});
$('#footerLogo a').hover(function(){
$("> .hover", this).stop().animate({"opacity": "1"}, "fast");
},function(){
$("> .hover", this).stop().animate({"opacity": "0"}, "fast");
});
$("#label .labelContent").hover(function(){
$("> .text", this).stop().animate({"height": "81px"}, "medium");
},function(){
$("> .text", this).stop().animate({"height": "21px"}, "medium");
});
$('#footerBottom a').hover(function(){
$(this).stop().animate({color: "#FFF", borderColor: "#FFF"}, "fast");
},function(){
$(this).stop().animate({color: "#919194", borderColor: "#919194"}, "fast");
});
$('#topBtn').click(function(){
$('html,body').animate({
scrollTop: 0
}, 1500);
});
ctaButtons();
if($('#productsHome').length){
$("#productsHome li").click(function(){
window.location.href = $('.content .name a',this).attr('href');
});
$("#productsHome li").hover(function(){
//$("> .content .name", this).stop().animate({"bottom": "-30px"}, "fast");
$("> .content .button", this).stop().animate({"top": "0px"}, "fast");
},function(){
//$("> .content .name", this).stop().animate({"bottom": "0px"}, "fast");
$("> .content .button", this).stop().animate({"top": "-40px"}, "fast");
});
if($('#leesMeerHome').length){
var offsetHomeTextDiv = $("#mainframe").offset();
var posHomeTextDiv = offsetHomeTextDiv.top - 170;
$('#leesMeerHome').click(function(){
$('html,body').animate({
scrollTop: posHomeTextDiv+'px'
}, 1500);
});
}
}
if($('#bedrijfDiv').length || $('#teamList').length){
$("#teamList li").hover(function(){
$("> .content .up", this).stop().animate({"opacity": "0"}, "slow");
$("> .content .hover", this).stop().animate({"opacity": "1"}, "slow");
},function(){
$("> .content .up", this).stop().animate({"opacity": "1"}, "slow");
$("> .content .hover", this).stop().animate({"opacity": "0"}, "slow");
});
var offsetBedrijfDiv = $("#bedrijfDiv").offset();
var posBedrijfDiv = offsetBedrijfDiv.top - 180;
var offsetTeamDiv = $("#onsTeamDiv").offset();
var posTeamDiv = offsetTeamDiv.top - 180;
$('#bedrijfButton').click(function(){
$('html,body').animate({
scrollTop: posBedrijfDiv+'px'
}, 1500);
});
$('#onsTeamButton').click(function(){
$('html,body').animate({
scrollTop: posTeamDiv+'px'
}, 1500);
});
}
$(".nieuwsitems li").hover(function(){
$("> .bottomShadowDiv .ctaButton", this).stop().animate({"top": "0px"}, "fast");
$("> .content .datum", this).stop().animate({color: "#f58326"}, "fast");
$("> .content h2", this).stop().animate({color: "#f58326"}, "fast");
$("> .content p", this).stop().animate({color: "#000000"}, "fast");
},function(){
if($(this).hasClass("active")){
}else{
$("> .bottomShadowDiv .ctaButton", this).stop().animate({"top": "-40px"}, "fast");
$("> .content .datum", this).stop().animate({color: "#b6b4b4"}, "fast");
$("> .content h2", this).stop().animate({color: "#b6b4b4"}, "fast");
$("> .content p", this).stop().animate({color: "#b6b4b4"}, "fast");
}
});
var inhoud;
$(".readMorecontent .more").click(function(){
if($(this).hasClass("active")){
$("> .bottomShadowDiv a .left .text", this).text(inhoud);
$("> .content p span", this).stop().animate({opacity: "1"}, "fast");
}else{
inhoud = $("> .bottomShadowDiv a", this).text();
$("> .bottomShadowDiv a .left .text", this).text(inklapText);
$("> .content p span", this).stop().animate({opacity: "0"}, "fast");
}
///$("> .bottomShadowDiv a .right .icon", this).toggleClass("arrowTop");
$(this).toggleClass("active");
//$("> .readMoreContent", this).slideToggle();
});
var inhoud;
$(".nieuwsitems li").click(function(){
if($(this).hasClass("active")){
$("> .bottomShadowDiv a .left .text", this).text(inhoud);
$("> .content p span", this).stop().animate({opacity: "1"}, "fast");
}else{
inhoud = $("> .bottomShadowDiv a", this).text();
$("> .bottomShadowDiv a .left .text", this).text(inklapText);
$("> .content p span", this).stop().animate({opacity: "0"}, "fast");
}
$("> .bottomShadowDiv a .right .icon", this).toggleClass("arrowTop");
$(this).toggleClass("active");
$("> .readMoreContent", this).slideToggle();
});
var year;
//Show old news items
$(".oldnewsTitle").click(function(){
//alert( this.id );
year = this.id;
var image = document.getElementById('arrow'+year);
if($(this).hasClass("active")){
$("."+year).hide("slow");
image.src = "/img/nieuws/news_arrow_down.png";
}else{
$("."+year).show("slow");
image.src = "/img/nieuws/news_arrow_up.png";
}
$(this).toggleClass("active");
});
$('#mainProductMenulist li').each(function(){
$(this).width($(this).width() + 4);
});
if($('#simplePhotoSlider').length){
var activeSimpleFoto = 0;
var totalSimpleFotos = $("#simplePhotoSlider li").length;
var fotoSimpleWidth = $("#simplePhotoSlider").width();
var ulSimpleWidth = totalSimpleFotos * fotoSimpleWidth;
function simpleSlideGallery(){
$.doTimeout(4000, function(){
if(activeSimpleFoto == 0){
$("#simplePhotoSlider ul").css("left", "0");
}
activeSimpleFoto = activeSimpleFoto + 1;
var newPos = activeSimpleFoto * fotoSimpleWidth * -1 + "px";
$("#simplePhotoSlider ul").stop().animate({"left": newPos}, "slow");
if(activeSimpleFoto == totalSimpleFotos - 1){ activeSimpleFoto = 0; }
simpleSlideGallery();
});
}
simpleSlideGallery();
}
if($('#streamerAnimation').length){
var activeStreamer = 0;
var totalStreamers = $("#streamerAnimation li").length;
$("#streamerAnimation li").eq(0).css('opacity','100');
function streamerAnimation(){
$.doTimeout(4000, function(){
$("#streamerAnimation li").eq(activeStreamer).stop().animate({"opacity": 0, "left":"-200px"}, "medium");
activeStreamer = activeStreamer + 1;
if(activeStreamer == totalStreamers){ activeStreamer = 0; }
$("#streamerAnimation li").eq(activeStreamer).css("left","350px");
$("#streamerAnimation li").eq(activeStreamer).stop().animate({"opacity": 100, "left":"80px"}, "slow");
streamerAnimation();
});
}
streamerAnimation();
}
$('#komma').hover(function(){
$("> a", this).stop().animate({color: "#fff"}, "fast");
$("> .komma_logo .up", this).stop().animate({"opacity": "0"}, "fast");
$("> .komma_logo .hover", this).stop().animate({"opacity": "1"}, "fast");
},function(){
$("> a", this).stop().animate({color: "#919194"}, "fast");
$("> .komma_logo .up", this).stop().animate({"opacity": "1"}, "fast");
$("> .komma_logo .hover", this).stop().animate({"opacity": "0"}, "fast");
});
if($('#inlogForm')){
var orgEmail = $("#emailadres_login").val();
var orgPassword = "password";
$('#emailadres_login').focus(function() { value=$(this).val(); if($(this).val()==orgEmail) { $(this).attr("value","");}});
$('#emailadres_login').blur(function() { if($(this).val()=="") { $(this).val(orgEmail);} });
$('#password_login').focus(function() { value=$(this).val(); if($(this).val()==orgPassword) { $(this).attr("value","");}});
$('#password_login').blur(function() { if($(this).val()=="") { $(this).val(orgPassword);} });
$('<input type="hidden" />').attr({
name: 'secretcode',
id: 'secretcode',
value: 'spamcheckkomma'
}).appendTo("#inlogForm");
function sendInlogForm(){
$(".error").hide();
var hasContactError = false;
var emailReg = /[\w-\.]+@([\w-]+\.)+[\w-]{2,4}/;
var emailVal = $("#emailadres_login").val();
if(emailVal == '' || emailVal == orgEmail || !emailReg.test(emailVal)) {
hasContactError = true;
}
var passwordVal = $("#password_login").val();
if(passwordVal == '' || passwordVal == 'password') {
hasContactError = true;
}
var secretcode = $("#secretcode").val();
$("#inlogFoutGegevens").fadeOut();
$("#inlogFoutError").fadeOut();
if(hasContactError){
$("#inlogFoutGegevens").fadeIn();
}else{
$.post("/inlogValidation.php",
{ email: emailVal, password: passwordVal, secretcode: secretcode },
function(data){
if (data.query_ok == "goed") {
document.location = data.url;
}else if (data.query_ok == "nietGeactiveerd") {
$("#inlogPromicNietGeactiveerd").fadeOut();
$("#inlogFoutGegevens").fadeOut();
$("#inlogFoutError").fadeOut();
$("#inlogNietGeactiveerd").fadeIn();
}else if (data.query_ok == "promicNietGeactiveerd") {
$("#inlogFoutGegevens").fadeOut();
$("#inlogFoutError").fadeOut();
$("#inlogNietGeactiveerd").fadeOut();
$("#inlogPromicNietGeactiveerd").fadeIn();
}else if (data.query_ok == "fout") {
$("#inlogFoutError").fadeOut();
$("#inlogNietGeactiveerd").fadeOut();
$("#inlogPromicNietGeactiveerd").fadeOut();
$("#inlogFoutGegevens").fadeIn();
}else{
$("#inlogNietGeactiveerd").fadeOut();
$("#inlogPromicNietGeactiveerd").fadeOut();
$("#inlogFoutGegevens").fadeOut();
$("#inlogFoutError").fadeIn();
}
}, "json");
}
return false;
}
$("#inlogKnop").click(function(e){
sendInlogForm();
});
$('#inlogForm input').bind('keypress', function(e) {
var code = (e.keyCode ? e.keyCode : e.which);
if(code == 13) { //Enter keycode
sendInlogForm();
}
});
}
$("#uitlogKnop").click(function(){
$.post("/uitloggen.php",{},
function(data){
document.location = data.url;
}, "json");
});
//account form
if($('#aanmeldenAccount').length){
if($('#aanmeldenAccount.nl').length){
var orgBedrijfsnaam = "Bedrijfsnaam";
var orgTelefoonnummer = "Telefoonnummer";
var orgVoornaam = "Voornaam";
var orgAchternaam = "Achternaam";
var orgEmailadres = "E-mailadres";
var orgWachtwoord = "Wachtwoord";
}
if($('#aanmeldenAccount.en').length){
var orgBedrijfsnaam = "Company name";
var orgTelefoonnummer = "Telephone number";
var orgVoornaam = "First name";
var orgAchternaam = "Last name";
var orgEmailadres = "E-mail address";
var orgWachtwoord = "Wachtwoord";
}
if($('#aanmeldenAccount.de').length){
var orgBedrijfsnaam = "Firmennamen";
var orgTelefoonnummer = "Telefon";
var orgVoornaam = "Vorname";
var orgAchternaam = "Nachname";
var orgEmailadres = "E-Mail Adresse";
var orgWachtwoord = "Wachtwoord";
}
$('#bedrijfsnaam').focus(function() { value=$(this).val(); if($(this).val()==orgBedrijfsnaam) { $(this).attr("value","");}});
$('#bedrijfsnaam').blur(function() { if($(this).val()=="") { $(this).val(orgBedrijfsnaam);} });
$('#telefoonnummer').focus(function() { value=$(this).val(); if($(this).val()==orgTelefoonnummer) { $(this).attr("value","");}});
$('#telefoonnummer').blur(function() { if($(this).val()=="") { $(this).val(orgTelefoonnummer);} });
$('#voornaam').focus(function() { value=$(this).val(); if($(this).val()==orgVoornaam) { $(this).attr("value","");}});
$('#voornaam').blur(function() { if($(this).val()=="") { $(this).val(orgVoornaam);} });
$('#achternaam').focus(function() { value=$(this).val(); if($(this).val()==orgAchternaam) { $(this).attr("value","");}});
$('#achternaam').blur(function() { if($(this).val()=="") { $(this).val(orgAchternaam);} });
$('#emailadres').focus(function() { value=$(this).val(); if($(this).val()==orgEmailadres) { $(this).attr("value","");}});
$('#emailadres').blur(function() { if($(this).val()=="") { $(this).val(orgEmailadres);} });
$('#wachtwoord').focus(function() { value=$(this).val(); if($(this).val()==orgWachtwoord) { $(this).attr("value","");}});
$('#wachtwoord').blur(function() { if($(this).val()=="") { $(this).val(orgWachtwoord);} });
$('#wachtwoord_check').focus(function() { value=$(this).val(); if($(this).val()==orgWachtwoord) { $(this).attr("value","");}});
$('#wachtwoord_check').blur(function() { if($(this).val()=="") { $(this).val(orgWachtwoord);} });
$('#systeemFormulierSubmit').click(function(e){
e.preventDefault();
$("#aanmeldenAccount").submit();
});
}
$('body').append('<div id="jsLoad"></div>');
$('.saveViewport').click(function(e){
e.preventDefault();
var btn = $(this);
$('#jsLoad').load('/save_viewport.php?offsetTop='+$(document).scrollTop(), function(){ window.location.href = $(btn).attr('href'); });
});
$('.saveViewportProductOverview').click(function(e){
e.preventDefault();
var btn = $(this);
$('#jsLoad').load('/save_viewportProductOverview.php', function(){ window.location.href = $(btn).attr('href'); });
});
if($('#klantRegistratie').length){
var labelNaam = Array;
$( "#klantRegistratie input[type='text']" ).each(function(index) {
//console.log ($(this).attr("data-label"));
labelNaam[index] = $(this).attr("data-label");
if($(this).val()!=labelNaam[index]){ $(this).css('color','#000000'); }
$(this).focus(function() { if($(this).val()==labelNaam[index]) { $(this).attr("value","");} $(this).css('color','#000000'); });
$(this).blur(function() { if($(this).val()=="") { $(this).val(labelNaam[index]); $(this).css('color','#b6b4b4'); } });
});
$('#postadresUitklappen').click(
function(){
if(!$('#ja_postadres').prop('checked')){
$('#postadres').removeClass('active');
}else{
$('#postadres').addClass('active');
}
}
);
$('#leveradresUitklappen').click(
function(){
if(!$('#ja_leveradres').prop('checked')){
$('#leveradres').removeClass('active');
leverAdresUitgeklapt = false;
}else{
$('#leveradres').addClass('active');
}
}
);
$('#lever_specs_uitklap').click(
function(){
if(!$('#lever_specs_radio_nee').prop('checked')){
$('#input_lever_specs').removeClass('active');
leverAdresUitgeklapt = false;
}else{
$('#input_lever_specs').addClass('active');
}
}
);
$('#tel_inkoop_uitklap').click(
function(){
if(!$('#inkoop_tel_direct_ja').prop('checked')){
$('#input_telefoon_inkoop').removeClass('active');
leverAdresUitgeklapt = false;
}else{
$('#input_telefoon_inkoop').addClass('active');
}
}
);
$('#contact_administratieUitklappen').click(
function(){
if(!$('#ja_contact_admin_anders').prop('checked')){
$('#contact_administratie').removeClass('active');
leverAdresUitgeklapt = false;
}else{
$('#contact_administratie').addClass('active');
}
}
);
$('#tel_admin_uitklap').click(
function(){
if(!$('#admin_tel_direct_ja').prop('checked')){
$('#input_telefoon_admin').removeClass('active');
leverAdresUitgeklapt = false;
}else{
$('#input_telefoon_admin').addClass('active');
}
}
);
$('#systeemFormulierSubmit').click(function(e){
e.preventDefault();
$("#klantRegistratie").submit();
});
}
if($('#voorwaardenAccount').length){
$('#systeemFormulierSubmit').click(function(e){
e.preventDefault();
$("#voorwaardenAccount").submit();
});
}
});
$(window).load(function(){
headerImageSize();
$('#headerSlider').css('display','block');
});
$(window).resize(function() {
//scrollFunction();
headerImageSize();
});
$('.vacature-link').click(function(){
var offsetHomeTextDiv = $($(this).attr('href')).offset();
var posHomeTextDiv = offsetHomeTextDiv.top - 170;
$('html,body').animate({
scrollTop: posHomeTextDiv+'px'
}, 1500);
return false;
});