
$(document).ready(function () {


    var objectWidth = $(".campagne-wide").width();

    var flashObject = (objectWidth / 48) * 27.4;
    //$(".campagne-wide").css({"height": flashObject, "border-bottom":"10px solid #f3f3f3"});
    //$(".flash-replacer").css({"height": flashObject, "border-bottom":"10px solid #f3f3f3"});

    /*
    if($(".campagne-wide").length > 0) {
    
    var so = new SWFObject("/media/144682/groot-filmpje.swf", "sotester", "100%", flashObject, "8", "#f3f3f3");
    so.addParam("wmode", "opaque");
    so.addParam("loop", "false"); 
    so.write("flash-replace");
    }
    */
    if ($(".campagne-wide").length > 0) {

    } 
    if ($("input.numbersOnly").length > 0) {
		$('input.numbersOnly').keyup(function () { 
			this.value = this.value.replace(/[^0-9\.]/g,'');
		});

    }

    if ($(".campagne-boxed").length > 0) {
        var so = new SWFObject("klein-filmpje.swf", "sotester", "960", "377", "8", "#1d2532");
        so.addParam("wmode", "transparent");
        so.addParam("loop", "false");
        so.addParam("align", "l");
        so.write("flash-replace");
    }
    // Watermark op de Algemene Zoekfunctie

    if ($("#zoekTerm").length > 0) {
        $("#zoekTerm").Watermark("Vul je zoekterm(en) in", "#067fae");
    }
    
    if ($("#zoekTermHome").length > 0) {
        $("#zoekTermHome").Watermark("Vul je zoekterm(en) in", "#fff");
    }

    if ($("#zoekTermFAQ").length > 0) {
        $("#zoekTermFAQ").Watermark("Vul je zoekterm(en) in", "#d6d6d6");
    }

    if ($("#aanmeldVeld").length > 0) {
        $("#aanmeldVeld").Watermark("Vul hier je e-mail adres in", "#d6d6d6");
    }

    // Clickable div blocks 

    // Hele blok clickable maken
    if ($(".section").length > 0) {
	
	$(".section").each(function(){
	
		if($(this).hasClass('caseBlock')) {
			
			$('.caseItem', this).each(function(){
				var linkElm;
				if($("a:first",this).length > 0) {
					linkElm = $("a:first",this);
				}
				if(linkElm) {	
					$(this).click(function () {
						window.location = $(linkElm).attr("href");
					});
					
				
					// :hover functie op hele block
					$(this).hover(
						function () {
							$(this).addClass("sectionhover");
						},
						function () {
							$(this).removeClass("sectionhover");
							$(".learn-more").remove();
						}
					);
				}
			});
			
		} else {
			var linkElm;
			if($("h3:first a:first",this).length > 0) {
				linkElm = $("h3:first a:first",this);
			}else if($("a:first",this).length > 0) {
				linkElm = $("a:first",this);
			}
			
			if(linkElm) {	
				$(this).click(function () {
					window.location = $(linkElm).attr("href");
				});				
			
				// :hover functie op hele block
				$(this).hover(
					function () {
						$(this).addClass("sectionhover");
		//                $(this).append('<div class="clearboth"></div>');
					},
					function () {
						$(this).removeClass("sectionhover");
						$(".learn-more").remove();
					}
				);
			}
		}
		
	});
		
    }

    //doegoodie clickable maken
    if ($(".doegoodie").length > 0) {
        $(".doegoodie").click(function () {
            window.location = $(this).find(".info a:first").attr("href");
        });

        // :hover functie op hele block
        $(".doegoodie").hover(
            function () {
                $(this).addClass("sectionhover");
            },
            function () {
                $(this).removeClass("sectionhover");
                $(".learn-more").remove();
            }
        );
    }

    // Hele ThemaBlokken clickable maken
    if ($(".themaBlock").length > 0) {
        $(".themaBlock").click(function () {
            window.location = $(this).find("a:first").attr("href");
        });

        // :hover functie op hele block
        $("#tb01, #tb02, #tb03, #tb04 ,#tb05").hide();


        // TODO: Fix these scripts below to be dynamic
        $(".tb01, .tt01").hover(
            function () {
                $("#tb01").show();
                $(".tt01").addClass("tthover");
            },
            function () {
                $("#tb01").hide();
                $(".tt01").removeClass("tthover");
            }
        );

        $(".tb01").mouseout(
            function () {
                $("#tb01").hide();
                $(".tt01").removeClass("tthover");
            }

        );

        $(".tb02, .tt02").hover(
            function () {
                $("#tb02").show();
                $(".tt02").addClass("tthover");
            },
            function () {
                $("#tb02").hide();
                $(".tt02").removeClass("tthover");
            }
        );

        $(".tb02").mouseout(
            function () {
                $("#tb02").hide();
                $(".tt02").removeClass("tthover");
            }

        );

        $(".tb03, .tt03").hover(
            function () {
                $("#tb03").show();
                $(".tt03").addClass("tthover");
            },
            function () {
                $("#tb03").hide();
                $(".tt03").removeClass("tthover");
            }
        );

        $(".tb03").mouseout(
            function () {
                $("#tb03").hide();
                $(".tt03").removeClass("tthover");
            }

        );

        $(".tb04, .tt04").hover(
            function () {
                $("#tb04").show();
                $(".tt04").addClass("tthover");
            },
            function () {
                $("#tb04").hide();
                $(".tt04").removeClass("tthover");
            }
        );

        $(".tb04").mouseout(
            function () {
                $("#tb04").hide();
                $(".tt04").removeClass("tthover");
            }

        );

        $(".tb05, .tt05").hover(
            function () {
                $("#tb05").show();
                $(".tt05").addClass("tthover");
            },
            function () {
                $("#tb05").hide();
                $(".tt05").removeClass("tthover");
            }
        );

        $(".tb05").mouseout(
            function () {
                $("#tb05").hide();
                $(".tt05").removeClass("tthover");
            }

        );


    }

    // Afbeeldingen switcher

    if ($("#afbeeldingenbox").length > 0) {
        var carouselItems = $("#afbeeldingenbox li").size();
        var carouselCounter = 1;

        $(this).everyTime(10000, 2, function () {
            $("#afbeeldingenbox li.active").fadeOut(500).removeClass("active");
            $("#afbeeldingenbox a.active").removeClass("active");

            if (carouselCounter == carouselItems) {
                carouselCounter = 1;
            } else {
                carouselCounter = carouselCounter + 1;
            }

            $("#afbeeldingenbox li.item" + carouselCounter).fadeIn(500).addClass("active");
            $("#afbeeldingenbox a.item" + carouselCounter).addClass("active");
        });

        var clickedElementClassName = null;

        $("#afbeeldingenbox .jcarousel-control a").click(function () {
            $(this).stopTime(2);

            $("#afbeeldingenbox li:visible:not(.active)").hide();

            clickedElementClassName = this.className.replace(' active', '');
            correspondingElement = $("#afbeeldingenbox li." + clickedElementClassName);

            if (!correspondingElement.is(":visible")) {
                $("#afbeeldingenbox li.active").fadeOut(500).removeClass("active");
                $("#afbeeldingenbox a.active").removeClass("active");

                $("#afbeeldingenbox li." + clickedElementClassName).fadeIn(500).addClass("active");
                $("#afbeeldingenbox a." + clickedElementClassName).addClass("active");
            }

            carouselCounter = clickedElementClassName.replace('item', '') * 1;

            $(this).everyTime(10000, 2, function () {
                $("#afbeeldingenbox li.active").fadeOut(500).removeClass("active");
                $("#afbeeldingenbox a.active").removeClass("active");

                if (carouselCounter == carouselItems) {
                    carouselCounter = 1;
                } else {
                    carouselCounter = carouselCounter + 1;
                }

                $("#afbeeldingenbox li.item" + carouselCounter).fadeIn(500).addClass("active");
                $("#afbeeldingenbox a.item" + carouselCounter).addClass("active");
            });

            return false;
        });


    }


    // Afbeeldingen switcher

    if ($("#projectCaroussel").length > 0) {

        var carouselItems2 = $("#projectCaroussel li").size();
        var carouselCounter2 = 1;

        $(this).everyTime(10000, 2, function () {
            $("#projectCaroussel li.active").fadeOut(500).removeClass("active");
            $("#projectCaroussel a.active").removeClass("active");

            if (carouselCounter2 == carouselItems2) {
                carouselCounter2 = 1;
            } else {
                carouselCounter2 = carouselCounter2 + 1;
            }

            $("#projectCaroussel li.foto" + carouselCounter2).fadeIn(500).addClass("active");
            $("#projectCaroussel a.foto" + carouselCounter2).addClass("active");
        });

        var clickedElementClassName2 = null;

        $("#projectCaroussel .jcarousel-control2 a").click(function () {
            $(this).stopTime(2);

            $("#projectCaroussel li:visible:not(.active)").hide();

            clickedElementClassName2 = this.className.replace(' active', '');
            correspondingElement2 = $("#projectCaroussel li." + clickedElementClassName2);

            if (!correspondingElement2.is(":visible")) {
                $("#projectCaroussel li.active").fadeOut(500).removeClass("active");
                $("#projectCaroussel a.active").removeClass("active");

                $("#projectCaroussel li." + clickedElementClassName2).fadeIn(500).addClass("active");
                $("#projectCaroussel a." + clickedElementClassName2).addClass("active");
            }

            carouselCounter2 = clickedElementClassName2.replace('foto', '') * 1;

            $(this).everyTime(10000, 2, function () {
                $("#projectCaroussel li.active").fadeOut(500).removeClass("active");
                $("#projectCaroussel a.active").removeClass("active");

                if (carouselCounter2 == carouselItems2) {
                    carouselCounter2 = 1;
                } else {
                    carouselCounter2 = carouselCounter2 + 1;
                }

                $("#projectCaroussel li.foto" + carouselCounter2).fadeIn(500).addClass("active");
                $("#projectCaroussel a.foto" + carouselCounter2).addClass("active");
            });

            return false;
        });

    }


   

    // Tabs op projecten site
    if ($("#tabContainer").length > 0) {
        var $tabs = $('#tabContainer > ul').tabs();

        // Alle foto's link in programma's
        $("#alle").click(function () {
            $tabs.tabs("select", 2);
            location.href = location.href.split("#")[0] + "#tab03";
            return false;
        });
    }

    // Nieuws ticker op homepage

    if ($(".nieuws").length > 0) {
        $('.nieuws').innerfade({
            animationtype: 'fade',
            speed: 'fast',
            timeout: 5000,
            type: 'random'
        });
    }

    // Regionale sites Gmaps implementatie

    if ($("#regionaleSites").length > 0) {
        $("#regionaleSitesContent").hide();
        $("#regionaleSitesToggle").click(function () {
            $("#regionaleSitesContent").toggle(200);
            if ($("#regionaleSitesToggle").hasClass("activeToggle")) {
                $("#regionaleSitesToggle").removeClass("activeToggle");
            } else {
                $("#regionaleSitesToggle").addClass("activeToggle")
            }
        });
    }

    // Caroussel normal 
/*    if ($("#uitgelicht .carousel").length > 0) {
        jQuery("#uitgelicht .carousel").jcarousel({
            scroll: 1,
            wrap: 'circular',
            auto: 8
        });
        
        var t=setTimeout('removeItem6()', 3000);  
    }*/
     

  //Generalizing carousels
  
  //carouselInitialize();
  
   if ($(".generalCarousel .carousel").children('li').length > 0) {
     fillThePageByCarouselItems('.generalCarousel .carousel');
    if ($.browser.msie && parseFloat($.browser.version) < 7) {
      jQuery(".generalCarousel .carousel").jcarousel({ scroll: 11, auto: 1 });
    } else {
      jQuery(".generalCarousel .carousel").jcarousel({
        scroll: 1,
        //wrap: 'last',
        auto: 11
      });
    }
    setDynamicSize('.generalCarousel', 340);
    }    
    
// CALL-23060 Site ligt (deels) in puin!
// the carousel did not work for the webshop-caroussel     
//    if ($("#homePopularItems .carousel").length > 0) {
//        if ($.browser.msie && $.browser.version.substr(0, 3) == "6.0") {
//            jQuery("#homePopularItems .carousel").jcarousel({ scroll: 1, auto: 11 });
//        } else {
//            jQuery("#homePopularItems .carousel").jcarousel({
//                scroll: 1,
//                wrap: 'circular',
//                auto: 11
//            });
 //       }
 //   }

if ($("#smallCarousel .carousel").length > 0) {
	$("div#smallCarousel").css("overflow-y", "hidden");
	jQuery("#smallCarousel .carousel").jcarousel({
    	scroll: 1,
        wrap: 'circular',
        auto: 6
        
    });
    
}


    // browserdetectie 

    var BrowserDetect = {
        init: function () {
            this.browser = this.searchString(this.dataBrowser) || "An unknown browser";
            this.version = this.searchVersion(navigator.userAgent)
      || this.searchVersion(navigator.appVersion)
      || "an unknown version";
            this.OS = this.searchString(this.dataOS) || "an unknown OS";
        },
        searchString: function (data) {
            for (var i = 0; i < data.length; i++) {
                var dataString = data[i].string;
                var dataProp = data[i].prop;
                this.versionSearchString = data[i].versionSearch || data[i].identity;
                if (dataString) {
                    if (dataString.indexOf(data[i].subString) != -1)
                        return data[i].identity;
                }
                else if (dataProp)
                    return data[i].identity;
            }
        },
        searchVersion: function (dataString) {
            var index = dataString.indexOf(this.versionSearchString);
            if (index == -1) return;
            return parseFloat(dataString.substring(index + this.versionSearchString.length + 1));
        },
        dataBrowser: [
    {
        string: navigator.userAgent,
        subString: "Chrome",
        identity: "Chrome"
    },
    {
        string: navigator.vendor,
        subString: "Apple",
        identity: "Safari",
        versionSearch: "Version"
    },
    {
        string: navigator.userAgent,
        subString: "Firefox",
        identity: "Firefox"
    },
    {
        string: navigator.userAgent,
        subString: "MSIE",
        identity: "Explorer",
        versionSearch: "MSIE"
    }
  ],
        dataOS: [
    {
        string: navigator.platform,
        subString: "Win",
        identity: "Windows"
    },
    {
        string: navigator.platform,
        subString: "Mac",
        identity: "Mac"
    }
  ]

    };
    BrowserDetect.init();
    if (BrowserDetect.browser == "Firefox" && BrowserDetect.OS == "Mac") {
        //$(".formRadioBar").css({"margin-top": "17px !important", "height": "100px !important"});
        $("#smallForm").css({ "margin-bottom": "13px !important" });

    }
    if (BrowserDetect.browser == "Safari" && BrowserDetect.OS == "Mac") {
        $(".formRadioBar").css({ "margin-top": "10px !important" });
    }

    //Bijschrift bij afbeelding in content
    var imgWidth = $("#contentImageBijschrift").width();
    var imgHeight = $("#contentImageBijschrift").height();
    $('div.wrapBijschrift').css('width', imgWidth - 20);
    $('div.wrapBijschrift').css('height', imgHeight);
    $('span.bijschrift').css('width', imgWidth - 20);
      
    //Externe links openen in nieuw venster
    //$("a[@href^='http']").attr('target','_blank');
    $("a[href^='http']").attr("target", "_blank");
    
    
    if(jQuery.browser.msie && jQuery.browser.version <8){  
   $("#mask_left").css("margin","0px");
     $("#mask_left").css("padding","0px");
     $("#mask_left").css("left","0px");
     $("#mask_left").css("position","absolute");
     $("#mask_left").css("top","0px");
     mLeft =$("#mask_left").clone(); 
     $("#mask_left").remove();
    
    $("#uitgelicht .jcarousel-container").append(mLeft) ;
    $("#mask_right").css("margin","0px");
     $("#mask_right").css("padding","0px");
     $("#mask_right").css("left","700px");
     $("#mask_right").css("position","absolute");
     $("#mask_right").css("top","0px");
     mRight =$("#mask_right").clone(); 
     $("#mask_right").remove();
  $("#uitgelicht .jcarousel-container").append(mRight ) ;
  }
  if(jQuery.browser.chrome || jQuery.browser.safari){
    if ($.os.name == "mac"){
      if($('#nieuwsbriefObject')){
        $('#nieuwsbriefObject').height(134);
      }
      if($('#nieuwsbriefObject2')){
        $('#nieuwsbriefObject2').height(148);
      }
    }else if($.os.name == "win"){
      if($('#nieuwsbriefObject')){
        $('#nieuwsbriefObject').height(137);
      }
      if($('#nieuwsbriefObject2')){
        $('#nieuwsbriefObject2').height(137);
      }
    }
  }
  
  headerCarousel();
  photoCarouselWide();
  photoCarouselSmall();
  cufonize();

});

(function ($) {
  $.fn.vAlign = function() {
  return this.each(function(i){
  var h = $(this).height();
  var oh = $(this).outerHeight();
  var mt = (h + (oh - h)) / 2;
  $(this).css("margin-top", "-" + mt + "px");
  $(this).css("top", "50%");
  $(this).css("position", "relative");
  });
  };
})(jQuery);


(function ($) {
  $.fn.hAlign = function() {
  return this.each(function(i){
  var w = $(this).width();
  var ow = $(this).outerWidth();
  var ml = (w + (ow - w)) / 2;
  $(this).css("margin-left", "-" + ml + "px");
  $(this).css("left", "50%");
  $(this).css("position", "absolute");
  });
  };
})(jQuery);


function css_browser_selector(u){var ua = u.toLowerCase(),is=function(t){return ua.indexOf(t)>-1;},g='gecko',w='webkit',s='safari',o='opera',h=document.documentElement,b=[(!(/opera|webtv/i.test(ua))&&/msie\s(\d)/.test(ua))?('ie ie'+RegExp.$1):is('firefox/2')?g+' ff2':is('firefox/3.5')?g+' ff3 ff3_5':is('firefox/3')?g+' ff3':is('gecko/')?g:is('opera')?o+(/version\/(\d+)/.test(ua)?' '+o+RegExp.$1:(/opera(\s|\/)(\d+)/.test(ua)?' '+o+RegExp.$2:'')):is('konqueror')?'konqueror':is('chrome')?w+' chrome':is('iron')?w+' iron':is('applewebkit/')?w+' '+s+(/version\/(\d+)/.test(ua)?' '+s+RegExp.$1:''):is('mozilla/')?g:'',is('j2me')?'mobile':is('iphone')?'iphone':is('ipod')?'ipod':is('mac')?'mac':is('darwin')?'mac':is('webtv')?'webtv':is('win')?'win':is('freebsd')?'freebsd':(is('x11')||is('linux'))?'linux':'','js']; c = b.join(' '); h.className += ' '+c; return c;}; css_browser_selector(navigator.userAgent);


function fillThePageByCarouselItems(identifier){
  
//     var $max = 7;
//     var $container = $(identifier.toString());
//     var $original = $container.children('li');
//     var totalChildren = $original.length;
//  
//     while (totalChildren < $max) 
//     {
//        $container.append($original.clone());
//        totalChildren = $container.children('li').length;
//     }
}

function setDynamicSizeWithContainer(carousel)
{
    var sum = 0;
    var i = 0;
    
    var $container = $(carousel);
    
    var items = $container.find('li');
    while (i < items.length)
    {
    sum += items[i].offsetWidth + 11;
    i++;
    }
    
    if (sum > 1024)
    return;
 

  var $skin = $(carousel).children(' .jcarousel-skin');
  $skin.width(sum.toString().concat("px"));
}

function setDynamicSize(identifier, width)
{
  var sum = 0;
    var i = 0;
    
    var $container = $(identifier.toString().concat(" .carousel"));
    
    while (i < $container.children('li').length)
    {
    sum += $container.children('li')[i].offsetWidth + 10;
    i++;
    }
    
    if (sum > width)
    return;
  if (sum == 0)
    return;
    
    var $skin = $(identifier.toString().concat(" .jcarousel-skin"));
  $skin.width(sum.toString().concat("px"));
}


function removeItem4() {
     if ($("#uitgelicht .jcarousel-item-4").length > 0) {
            $("#uitgelicht .jcarousel-item-4").remove();
    }
}

function removeItem6() {
     if ($("#uitgelicht .jcarousel-item-6").length > 0) {
            $("#uitgelicht .jcarousel-item-6").remove();
    }
}
      
function carouselInitialize()
{
  if ($(".lesmateriaalThemaItems .carousel").length > 0)
    {
         if ($(".lesmateriaalThemaItems .carousel").children('li').length > 0) {

        fillThePageByCarouselItems('.lesmateriaalThemaItems .carousel');
        if ($.browser.msie && parseFloat($.browser.version) < 7) {
            jQuery(".lesmateriaalThemaItems .carousel").jcarousel({ scroll: 1, auto: 11 });
        } else {
            jQuery(".lesmateriaalThemaItems .carousel").jcarousel({
                scroll: 1,
                //wrap: 'last',
                auto: 11
            });
        }

        $('.lesmateriaalThemaItems').each(function(index, para) {
            setDynamicSizeWithContainer(para);
        });
         }

    }

  if ($("#lesmateriaalSpreekbeurtboekjeItems .carousel").length > 0) 
     {
       if ($("#lesmateriaalSpreekbeurtboekjeItems .carousel").children('li').length > 0) {
       
        fillThePageByCarouselItems('#lesmateriaalSpreekbeurtboekjeItems .carousel');
        if ($.browser.msie && parseFloat($.browser.version) < 7) {
          jQuery("#lesmateriaalSpreekbeurtboekjeItems .carousel").jcarousel({ scroll: 1, auto: 11 });
        } else {
          jQuery("#lesmateriaalSpreekbeurtboekjeItems .carousel").jcarousel({
            scroll: 1,
            //wrap: 'last',
            auto: 11
          });
        }
        setDynamicSize('#lesmateriaalSpreekbeurtboekjeItems', 1024);
      }
  }
                           
  if ($("#lesmateriaalTentoonstellings .carousel").length > 0) 
  {
      if ($("#lesmateriaalTentoonstellings .carousel").children('li').length > 0) {
        fillThePageByCarouselItems('#lesmateriaalTentoonstellings .carousel');
        if ($.browser.msie && parseFloat($.browser.version) < 7) {
          jQuery("#lesmateriaalTentoonstellings .carousel").jcarousel({ scroll: 1, auto:11 });
        } else {
          jQuery("#lesmateriaalTentoonstellings .carousel").jcarousel({
            scroll: 1,
            //wrap: 'last',
            auto: 11
          });
        }
        setDynamicSize('#lesmateriaalTentoonstellings');
      }
  }
      
    if ($("#lesmateriaalKleurplaten .carousel").length > 0) 
    {
        if ($("#lesmateriaalKleurplaten .carousel").children('li').length > 0) {
         fillThePageByCarouselItems('#lesmateriaalKleurplaten .carousel');
        if ($.browser.msie && parseFloat($.browser.version) < 7) {
          jQuery("#lesmateriaalKleurplaten .carousel").jcarousel({ scroll: 11, auto: 1 });
        } else {
          jQuery("#lesmateriaalKleurplaten .carousel").jcarousel({
            scroll: 1,
            //wrap: 'last',
            auto: 11
          });
        }
        setDynamicSize('#lesmateriaalKleurplaten', 1024);
      }  
   }    
   
   if ($("#brochures .carousel").length > 0) {
        if ($("#brochures .carousel").children('li').length > 0) {
            fillThePageByCarouselItems('#brochures .carousel');
            if ($.browser.msie && parseFloat($.browser.version) < 7) {
                jQuery("#brochures .carousel").jcarousel({ scroll: 11, auto: 1 });
            } else {
                jQuery("#brochures .carousel").jcarousel({
                    scroll: 1,
                    //wrap: 'last',
                    auto: 11
                });
            }
            setDynamicSize('#brochures', 1024);
        }
    }

    if ($("#Informatiesets .carousel").length > 0) {
        if ($("#Informatiesets .carousel").children('li').length > 0) {
            fillThePageByCarouselItems('#Informatiesets .carousel');
            if ($.browser.msie && parseFloat($.browser.version) < 7) {
                jQuery("#Informatiesets .carousel").jcarousel({ scroll: 11, auto: 1 });
            } else {
                jQuery("#Informatiesets .carousel").jcarousel({
                    scroll: 1,
                    //wrap: 'last',
                    auto: 11
                });
            }
            setDynamicSize('#Informatiesets', 1024);
        }
    }

  
}
function photoCarouselSmall() {
	$('#photoCarouselSmall').infiniteCarousel({
		displayThumbnailBackground: false,
		displayProgressBar: false,
		textholderHeight: '0.33',
		thumbnailWidth: '18px',
		thumbnailHeight: '17px',
		thumbnailFontSize: '9px',
		transitionSpeed: 800,
		displayTime: 6000,
		autoStart: true,
		carouselHeight: 235
	});
}      
function photoCarouselWide() {
	$('#photoCarouselWide').infiniteCarousel({
		displayThumbnailBackground: false,
		displayProgressBar: false,
		textholderHeight: '0.33',
		thumbnailWidth: '18px',
		thumbnailHeight: '17px',
		thumbnailFontSize: '9px',
		transitionSpeed: 800,
		displayTime: 6000,
		autoStart: true,
		carouselHeight: 244
	});
}

function headerCarousel() {
	$('#uitgelicht').infiniteCarousel({
		displayThumbnailBackground: false,
		displayProgressBar: false,
		textholderHeight: '0.32',
		thumbnailWidth: '18px',
		thumbnailHeight: '17px',
		thumbnailFontSize: '9px',
		transitionSpeed: 800,
		displayTime: 6000,
		autoStart: true
	});
}
function cufonize() {

    /*Cufon standerd styles*/
    
	Cufon.replace(['#hoofdmenu li a'], {
        fontFamily: 'Univers',
        fontWeight: '400',
        hover: true
    });
    Cufon.replace(['#homeDonateButton, #homeGiftButton, #wordLidFooter'], {
        fontFamily: 'Univers',
        fontWeight: '700',
        hover: true
    });
    Cufon.replace(['h1, h2:not(.nocufon)'], {
        fontFamily: 'Univers',
        fontWeight: '300',
        hover: true
    });

}
function tooltip() {
    $('.tooltip').toggle(function(){
		$(this).addClass('showTooltip');
		$(this).bind('mouseleave',function(){
			$(this).unbind('mouseleave').removeClass('showTooltip');
		});
	},function(){
		$(this).removeClass('showTooltip');
	});
}
