/*
window.addEvent('domready', function() {
	fixMenuSize();
});
window.addEvent('resize', function() {
	fixMenuSize();
});

*/

function alertSize() {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
 
  return myHeight;
}

	


function fixMenuSize(){
	
	var browser=navigator.appName;
	var b_version=navigator.appVersion;
	
	t_size = (window.getScrollHeight());

	s_size = t_size-215-35-54-50;
	if(browser=='Microsoft Internet Explorer')
		s_size = s_size - 14;
	
	if(s_size<200)
		s_size = 200;		
		
	document.getElementById('menu').style.height = s_size + 'px';
	if(browser=='Microsoft Internet Explorer'){
		if(document.getElementById('inner_div_id'))
			document.getElementById('inner_div_id').style.height = t_size-4 + 'px';
	}
		
	
}

function make_active(x){
	document.getElementById('menu_'+x).style.display = 'block';
}

function make_inactive(x){
	document.getElementById('menu_'+x).style.display = 'none';
}

function  make_active_sub(x){
	document.getElementById('sub_menu_'+x).className = 'sub_menu_item_over_over';
}

function  make_inactive_sub(x){
	document.getElementById('sub_menu_'+x).className = 'sub_menu_item_over';
}

var are_img = 0;


jQuery(document).ready(function() {
	if(are_img){
	// We only want these styles applied when javascript is enabled
	jQuery('div.navigation').css({'width' : '300px', 'float' : 'right'});
	jQuery('div.content_gal').css('display', 'block');

	// Initially set opacity on thumbs and add
	// additional styling for hover effect on thumbs
	var onMouseOutOpacity = 0.67;
	jQuery('#thumbs ul.thumbs li').opacityrollover({
		mouseOutOpacity:   onMouseOutOpacity,
		mouseOverOpacity:  1.0,
		fadeSpeed:         'fast',
		exemptionSelector: '.selected'
	});
	
	// Initialize Advanced Galleriffic Gallery
	var gallery = jQuery('#thumbs').galleriffic({
		delay:                     2500,
		numThumbs:                 9,
		preloadAhead:              10,
		enableTopPager:            true,
		enableBottomPager:         true,
		maxPagesToShow:            7,
		imageContainerSel:         '#slideshow',
		controlsContainerSel:      '#controls',
		captionContainerSel:       '#caption',
		loadingContainerSel:       '#loading',
		renderSSControls:          true,
		renderNavControls:         true,
		playLinkText:              '<img src="/images/play.png" alt="play"/>',
		pauseLinkText:             '<img src="/images/pauze.png" alt="pause"/>',
		prevLinkText:              '&lsaquo; vorige foto',
		nextLinkText:              'volgende foto &rsaquo;',
		nextPageLinkText:          'volgende &rsaquo;',
		prevPageLinkText:          '&lsaquo; vorige',
		enableHistory:             false,
		autoStart:                 true,
		syncTransitions:           true,
		defaultTransitionDuration: 900,
		onSlideChange:             function(prevIndex, nextIndex) {
			// 'this' refers to the gallery, which is an extension of $('#thumbs')
			this.find('ul.thumbs').children()
				.eq(prevIndex).fadeTo('fast', onMouseOutOpacity).end()
				.eq(nextIndex).fadeTo('fast', 1.0);
		},
		onPageTransitionOut:       function(callback) {
			this.fadeTo('fast', 0.0, callback);
		},
		onPageTransitionIn:        function() {
			this.fadeTo('fast', 1.0);
		}
	});
	}
});



