jQuery(document).ready(function() {
	
	jQuery('a.fancybox').fancybox();
	
	// Blank
	jQuery('.open-file').click(function() {
		window.open(this.href,'_blank');
		return false;
	});
	
	// Piktogramme
	jQuery('.show-pikto').click(function() {
		jQuery('.menu-pikto').css('background-color', 'white');
		return false;
	});
	jQuery('#avmenu').each(function() {
		var thispikto = jQuery('body').attr('class');
		if(thispikto) {
			var check = thispikto.match(/pikto-[a-zA-Z0-9]+/);
			if(check) {
				jQuery('> ul > li', this).hide();
				jQuery('> ul > li a.'+thispikto, this).parent().show();
			}
		} else {
			thispikto = jQuery('> ul > li > a[class*="trail"]', this).attr('class');
			if(thispikto) {
				check = thispikto.match(/pikto-[a-zA-Z0-9]+/);
				if(check) {
					jQuery('> ul > li', this).hide();
					jQuery('> ul > li a.'+check, this).parent().show();
				}
			}
		}
	});
	

});

