(function($) {
	jQuery(document).ready(function() {
		$("ul.main_nav li").hover(function(){
			$(this).addClass("hover");
			$('ul:first',this).css('visibility', 'visible');
		}, function(){
			$(this).removeClass("hover");
			$('ul:first',this).css('visibility', 'hidden');
		});

		$('.rounded_top').corners('top');

		if ($('#referentie_carrousel').length > 0) {
			$('#referentie_carrousel') 
			.cycle({ 
				fx: 'fade', 
				speed: 1000, 
				timeout: 6000 
			});
		}

		if ($('#testimonial_carrousel').length > 0) {
			$('#testimonial_carrousel') 
			.cycle({ 
				fx: 'fade', 
				speed: 1000, 
				timeout: 6000 
			});
		}

		if ($('#header_button div.btn_blue').length > 0) {
			$("#header_button div.btn_blue").hover(function(){
				$("#header_button div.btn_blue").addClass("hover");
				$("#header_button div.btn_blue a").addClass("hover");
			}, function(){
				$("#header_button div.btn_blue").removeClass("hover");
				$("#header_button div.btn_blue a").removeClass("hover");
			});
		}
		if ($('#left_content div.btn_blue').length > 0) {
			$("#left_content div.btn_blue").hover(function(){
				$("#left_content div.btn_blue").addClass("hover");
				$("#left_content div.btn_blue a").addClass("hover");
			}, function(){
				$("#left_content div.btn_blue").removeClass("hover");
				$("#left_content div.btn_blue a").removeClass("hover");
			});
		}
		if ($('#main_content div.btn_blue').length > 0) {
			$("#main_content div.btn_blue").hover(function(){
				$("#main_content div.btn_blue").addClass("hover");
				$("#main_content div.btn_blue a").addClass("hover");
			}, function(){
				$("#main_content div.btn_blue").removeClass("hover");
				$("#main_content div.btn_blue a").removeClass("hover");
			});
		}
		if ($('#jobdetail div.btn_blue').length > 0) {
			$("#jobdetail div.btn_blue").hover(function(){
				$("#jobdetail div.btn_blue").addClass("hover");
				$("#jobdetail div.btn_blue a").addClass("hover");
			}, function(){
				$("#jobdetail div.btn_blue").removeClass("hover");
				$("#jobdetail div.btn_blue a").removeClass("hover");
			});
		}
		if ($('.overlay div.btn_black').length > 0) {
			$(".overlay div.btn_black").hover(function(){
				$(".overlay div.btn_black").addClass("hover");
				$(".overlay div.btn_black a").addClass("hover");
			}, function(){
				$(".overlay div.btn_black").removeClass("hover");
				$(".overlay div.btn_black a").removeClass("hover");
			});
		}
		if ($('#breadcrumb').length > 0) {
			$("#breadcrumb li").hover(function(){
				$(this).addClass("hover");
			}, function(){
				$(this).removeClass("hover");
			});
		}

		if ($('iframe').length > 0) {
			var iFrames = document.getElementsByTagName('iframe');
	
			// Resize heights.
			function iResize()
			{
				// Iterate through all iframes in the page.
				for (var i = 0, j = iFrames.length; i < j; i++)
				{
					// Set inline style to equal the body height of the iframed content.
					iFrames[i].style.height = iFrames[i].contentWindow.document.body.offsetHeight + 'px';
				}
			}
	
			// Check if browser is Safari or Opera.
			if ($.browser.safari || $.browser.opera)
			{
				// Start timer when loaded.
				$('iframe').load(function()
					{
						setTimeout(iResize, 0);
					}
				);
	
				// Safari and Opera need a kick-start.
				for (var i = 0, j = iFrames.length; i < j; i++)
				{
					var iSource = iFrames[i].src;
					iFrames[i].src = '';
					iFrames[i].src = iSource;
				}
			}
			else
			{
				// For other good browsers.
				$('iframe').load(function()
					{
						// Set inline style to equal the body height of the iframed content.
						this.style.height = this.contentWindow.document.body.offsetHeight + 'px';
					}
				);
			}
		}
	})
})(jQuery);
jQuery.noConflict();