$(function() {

	// fix IE li hover
	$("li").hover(
      function () {
        $(this).addClass('hover');
      }, 
      function () {
        $(this).removeClass('hover');
      }
    );

	// fix IE content height
	// beter in conditional stylesheet!!!
	//jQuery.each(jQuery.browser, function(i, val) {
	//	if( i == 'msie'  && val == true){
	//		$('#pagecontainer').css({height:"100%"});
	//	}
    //});
    
    // pressrelease sidebar fully clickable
   /* 	 $(
    	$('#sidebar .pressrelease p a')
    	.parent('p')
    	.parent('div')
    )
    .css({cursor:"pointer"})
    .click(
    	function(){
    		window.location = $('a',$(this)).attr('href');
  		}
  	)
     */
    
});

$(function() {
	
	// molentjes transparanter
	$('#footer').css('opacity','0.2');
    
});


$(function() {
//lightbox
	$('a.thickbox').lightbox({
	
		fitToScreen: true,
		displayHelp: false,
		fileLoadingImage: '../gui/lightbox/loadingAnimation_inv.gif',
		fileBottomNavCloseImage : '../gui/lightbox/close_small.gif',
		slideNavBar: false,
		navbarOnTop: true,
		strings : {
			help: ' \u2190 / P - vorig beeld\u00a0\u00a0\u00a0\u00a0\u2192 / N - volgend beeld\u00a0\u00a0\u00a0\u00a0ESC / X - sluit',
			prevLinkTitle: 'vorige',
			nextLinkTitle: 'volgende',
			prevLinkText:  '&laquo; Vorige',
			nextLinkText:  'Volgende &raquo;',
			closeTitle: 'sluit',
			image: 'Afbeelding ',
			of: ' van '
		}
		
	});
});

$(function() {
// formulier ajax
	$('form').ajaxForm({
		target: $('form').parent(),
		success: checkAction  // post-submit callback 
	});
});


// post-submit callback 
function checkAction(responseText, statusText)  { 

    // for normal html responses, the first argument to the success callback 
    // is the XMLHttpRequest object's responseText property 
 
    // if the ajaxSubmit method was passed an Options Object with the dataType 
    // property set to 'xml' then the first argument to the success callback 
    // is the XMLHttpRequest object's responseXML property 
 
    // if the ajaxSubmit method was passed an Options Object with the dataType 
    // property set to 'json' then the first argument to the success callback 
    // is the json data object returned by the server 
 	
 	if(!responseText){
 	
 		//alert('eh?');
		
		return false;
		
    } else {
    	
    	$('form').ajaxForm({
			target: $('form').parent(),
			success: checkAction  // post-submit callback 
		});
		
		return false;
    }
} 
