// JavaScript / jQuery Document$(function(){	// Menu:	$("#navigation ul ul").hide();	$("#navigation ul li").each(function(){		var isActive = $(this).hasClass("current_page_item");		if(!isActive) {			isActive = $(this).hasClass("current_page_parent");			}				var originalHeight = $("ul", this).height();		$(this).hover(function(){			if(!isActive) {				$(this).addClass("current_page_item");			}			$("ul", this).css({height: originalHeight}).hide().stop().slideDown(100);		}, function(){			if(!isActive) {				$(this).removeClass("current_page_item");			}			$("ul", this).stop().slideUp(100);		});	});		// E-mail subscriber:	$("input.email").focus(function(){		if($(this).val()=='Enter email address') {			$(this).val('');			}	}).blur(function(){		if($(this).val()=='') {			$(this).val('Enter email address');			}	});		// Responsibility:	$("ul.responsibility li").each(function(){		if($("h3 a", this).attr("href")!=undefined) {			$(this).hover(function(){				$(this).addClass("hover");			}, function(){				$(this).removeClass("hover");			}).click(function(){				window.open($("h3 a", this).attr("href"));			});		} else {			$(this).css({cursor: "default"});			}	});		// Companies:	$(".companiesForm form select").change(function(){		var val = $(this).val();		if(val!=0) {			window.location = '/?page_id=' + val;		}	});		// Roles accordeon:	$("ul.accordeon li").each(function(){		var originalHeight = $("div", this).height();		$("div.container", this).css({height: 0}).hide();		$("h3", this).hover(function(){			$(this).addClass("active");		}, function(){			if(!$(this).hasClass("clicked")) {				$(this).removeClass("active");			}		}).click(function(){			$("ul.accordeon li div.container:visible").stop().animate({height: 0}, 500, function(){ $(this).hide(); }).prev().removeClass("active clicked");			$(this).addClass("active clicked").next().stop().animate({height: originalHeight}, 500);			// Google Analytics:			try {				// var pageTracker = _gat._getTracker("UA-2621410-8");				_udn = "none";				_ulink = 1;				_uOsr[20]="Baidu";				_uOkw[20]="wd";				// pageTracker._trackPageview('Our Roles - ' + $(this).text());				_uacct = "UA-415632-40";				urchinTracker('Our Roles - ' + $(this).text());			} catch(err) {				// Do nothing				}		});	});		// Brands:	/*	$("div.brands div.balloon").hide().addClass("balloonTL").mouseout(function(){		$(this).hide();			}).mouseover(function(){		$(this).show();	});	*/	$("div.beers img").each(function(){				var brand = $(this).attr("alt");		// Ballonnen positioneren:				var curleft = 0;		if(this.x) {			curleft = this.x;		} else if(this.offsetParent) {			curleft = this.offsetLeft;		}				var myLeft = curleft + (this.width / 2);				// Safari bug oplossen:		if(navigator.userAgent.toLowerCase().indexOf('safari') != -1) {			var bodyOffset = ($("body").width() - $("#body").width())/2;			if(bodyOffset > 0) {				myLeft -= bodyOffset;			}		}				var myTop = 50;		if($(this).hasClass("lower")) {			myTop = 250;							} 				$("div.brands div." + brand).addClass("balloonTL").css({left: myLeft + "px", top: myTop + "px"});				$(this).mouseover(function(){			$("div.brands div."+ brand).show();		}).mouseout(function(){			$("div.brands div."+ brand).hide();		});					});		// Deze code geeft een flickering-probleem in Google Chrome:		$("div.balloon").mouseover(function(){		this.style.display = "block";	}).mouseout(function(){		this.style.display = "none";	});			/*		$("div.beers img, div.balloon").hover(function(){		$("div.brands div." + brand).show();	}, function(){		// $("div.brands div." + brand).hide();	});	*/				/*		$(this).mouseover(function(e){						var curleft = 0;			if(this.x) {				curleft = this.x;			} else if(this.offsetParent) {				curleft = this.offsetLeft;			}						var myLeft = curleft + (this.width / 2);						// Safari bug oplossen:			if(navigator.userAgent.toLowerCase().indexOf('safari') != -1) {				var bodyOffset = ($("body").width() - $("#body").width())/2;				if(bodyOffset > 0) {					myLeft -= bodyOffset;				}			}						var myTop = 50;			if($(this).hasClass("lower")) {				myTop = 250;								} 						$("div.brands div." + brand).css({left: myLeft + "px", top: myTop + "px"}).show();		}).mouseout(function(e){			$("div.brands div.balloon").hide();		});		*/	// });		// Videos:	$("ul.videos li:not(.notClickable)").click(function(){		// Hoogte voor de zwarte overlay instellen:		var h = $("#body").height();		if(h < $(window).height()) { h = $(window).height(); }		if(h < $(document).height()) { h = $(document).height(); }		$(this).blur();		$("#ajaxLoader").show();		$("#black").css({opacity: "0.7", height: h + "px"}).show();		// Gegevens overnemen:		var name = $("dd.name", this).text();		var jobtitle = $("dd.jobtitle", this).text();		var business = $("dd.business", this).text();		var country = $("dd.country", this).text()				$("#videoContent span.name").text(name);		$("#videoContent span.jobtitle").text(jobtitle);		$("#videoContent span.business").text(business);						$("#videoContent p.description").text('At the time of filming ' + name + ' worked as a ' + jobtitle + ' in our ' + business + ' business');				$("#videoContent div.videoTranscriptContainer").html($("div.transcript", this).html());		$("#videoContent a.video").addClass("active");		$("#videoContent a.transcript").removeClass("active");		$("#videoContent div.videoInnerContentContainer").show();		$("#videoContent div.videoTranscriptContainer").hide();		// Flash laden:		var flv = $("var.filename", this).text();		swfobject.embedSWF("/swf/videoplayer.swf", "flashMoviePlayer", "611", "344", "9.0.0", false, {filename: flv}, {}, {});		// Content showen:				var ScrollTop = document.body.scrollTop;		if (ScrollTop == 0) {		    if (window.pageYOffset) {				ScrollTop = window.pageYOffset;			} else {				ScrollTop = (document.body.parentElement) ? document.body.parentElement.scrollTop : 0;			}		}		$("#videoContent").css({top: (ScrollTop + 50) + "px"}).show();		$("#ajaxLoader").hide();				// Google Analytics:		try {			// var pageTracker = _gat._getTracker("UA-2621410-8");			_udn = "none";			_ulink = 1;			_uOsr[20]="Baidu";			_uOkw[20]="wd";			// pageTracker._trackPageview('Our People - ' + name);			_uacct = "UA-415632-40";			urchinTracker('Our People - ' + name);		} catch(err) {			// Do nothing		}				return false;	});	$("#videoContent a.video").click(function(){		$(this).addClass("active");		$("#videoContent a.transcript").removeClass("active");		$("#videoContent div.videoInnerContentContainer").show();		$("#videoContent div.videoTranscriptContainer").hide();		return false;	});	$("#videoContent a.transcript").click(function(){		$(this).addClass("active");		$("#videoContent a.video").removeClass("active");		$("#videoContent div.videoInnerContentContainer").hide();		$("#videoContent div.videoTranscriptContainer").show();		return false;	});	$("#videoContent a.close").click(function(){		$("#videoContent").hide();		$("#flashMoviePlayer").html("");		$("#black").hide();		return false;	});		// Bug in safari verwijderen:	$("#navigation a").removeAttr("title");		// Laatste navigatie dotted line verwijderen:	$("#navigation ul ul").each(function(){ $("a:last", this).css({backgroundImage: "none"}); });});// SWF-Objects:var flashvars = {};var params = {scale: "noscale"};var attributes = {};swfobject.embedSWF("/swf/brandticker.swf", "brandTicker", "960", "110", "9.0.0", false, flashvars, {salign: "tl"}, attributes);swfobject.embedSWF("/swf/intro.swf", "introFlash", "960", "530", "9.0.0", false, flashvars, {bgcolor: "#ffffff"}, attributes);swfobject.embedSWF("/swf/worldmap.swf", "worldmapFlash", "659", "396", "9.0.0", false, {xmlFile: "/companies_xml.php"}, params, attributes);swfobject.embedSWF("/swf/MiniBrandTicker.swf", "modulesFlash", "184", "120", "9.0.0", false, flashvars, {wmode: "transparent"}, attributes);swfobject.embedSWF("/swf/videoplayer2.swf", "homeFlashMovie", "507", "241", "9.0.0", false, {filename: "/swf/flv/home.flv"}, {wmode: "transparent"}, {});swfobject.embedSWF("/swf/heinHome.swf", "module4", "184", "212", "9.0.0", false, {}, {}, {});swfobject.embedSWF("/swf/heinModule.swf", "heinModule", "184", "120", "9.0.0", false, {}, {wmode: "transparent"}, {});swfobject.embedSWF("/swf/sustainability.swf", "sustainability", "320", "240", "9.0.0", false, {}, {wmode: "transparent"}, {});
