jQuery(window).load(function() {
	jQuery("ul.sf-menu").supersubs({
		minWidth:    12,   // minimum width of sub-menus in em units 
        maxWidth:    30   // maximum width of sub-menus in em units 
	}).superfish({dropShadows: true, delay: 1000, animation:   {opacity:'show',height:'show'}}); 
	jQuery("ul.sf-menu li").hover(function() {
	  	jQuery(this).addClass('hover');
	}, function() {
	    jQuery(this).removeClass('hover');
	});
	
	var headerPhotoHeight = jQuery('div.header > img').height();
	jQuery('div.header_in div.buttons').css('top', (headerPhotoHeight-168) + 'px');
	
	jQuery("a[href^='http://'],a[href^='www.'],a[href^='https://'],a[rel='external']").not("a[href^='http://www.ridderschool.nl']").attr('target','_blank');
	try {
		jQuery('div.slideshow img').show();
	} catch (error) {
	
	}
});

jQuery(document).ready(function() {
	jQuery(document).pngFix();
	jQuery('img.gallery_image').mouseover(function() {
    	jQuery(this).addClass('hover');
   });
   jQuery('img.gallery_image').mouseout(function() {
    	jQuery(this).removeClass('hover');
   });    
	jQuery("a[rel^='prettyPhoto']").prettyPhoto({
		animationSpeed: 'normal', 				/* fast/slow/normal */
		slideshow:5000, 
		overlay_gallery:false,
		autoplay_slideshow: true,
		padding: 40, 							/* padding for each side of the picture */
		opacity: 0.5, 							/* Value between 0 and 1 */
		showTitle: true, 						/* true/false */
		allowresize: false, 					/* true/false */
		counter_separator_label: ' van ', 	/* The separator for the gallery counter 1 "of" 2 */
		theme: 'light_rounded' 				/* light_rounded / dark_rounded / light_square / dark_square */
	});
});

var Slideshow = {
	
	get		: function(pageId) {
		jQuery.get("/ajax_server.php?action=getImages&pageId=" + pageId, function(data){
		  	if (data && data != "") {
				jQuery('div.site_rgt_note_wrapper').html(data);
				jQuery('.slideshow').cycle();	  
			}
		});
	}
}                                              
