Cufon.replace('ul#main-menu li a',{hover: true,fontSize:'23px'});
Cufon.replace('h3',{fontSize:'22px'});
Cufon.replace('h2', {fontSize:'25px'});


$(function () {
    $('input.search-field').watermark('Zoek op trefwoord, bijv: levensloop', { className: 'watermark' });
    $('div#services ul li').click(function () {
        //redirect
        return false;
    });

    var $ul, $icon;
    $('html.content div#groups').find('#diensten,#berekenen,#polisbeheer').hover(
		function () {
		    $ul = $(this).find("ul");
		    $icon = $(this).find("div.icon");
		    ulTopMargin = ($ul.outerHeight(true) - $ul.innerHeight()) / 2;
		    ulHeight = $ul.innerHeight() + ulTopMargin;
		    $(this).css("top", -ulHeight + 5);
		    $ul.show();
		    $icon.addClass("hide");
		    
		    //$(this).height($(this).height()); // solve safari/chrome height resizing issue
		    $(this).css('height', $ul.outerHeight(true)+23+'px');
		},
		function () {
		    $ul.hide();
		    $icon = $(this).find("div.icon");
		    $icon.removeClass("hide");
		    $(this).css("top", 0);
		    $(this).css('height', '51px');
		}
	)
})

$(document).ready(function () {
    $("a.boxed").each(function () {
        var split = this.id.split(";");
        if (split[0] != 0 && split[1] != 0) {
            $(this).fancybox({
                'autoScale': false,
                'width': parseInt(split[0]),
                'height': parseInt(split[1]),
                'autoDimensions': false,
                'centerOnScroll': false,
                'transitionIn': 'none',
                'transitionOut': 'none',
                'type': 'iframe',
                'onComplete': function () { }
            });
        }
        else {
            $(this).fancybox({
                'autoScale': true,
                'autoDimensions': true,
                'centerOnScroll': false,
                'transitionIn': 'none',
                'transitionOut': 'none',
                'type': 'iframe',
                'onComplete': function () { }
            });
        }
    });

});

