$(document).ready(function() {

	/* 
	* attach a function to open all links with a class of "external" in a new window 
	* this avoids the use of target="_blank" and allows us to validate as XHTML strict
	*/
	$("a[rel^='external']").click( function() {
		window.open(this.href);
		return false;
	});

/*    $("a[rel^='prettyPhoto']").prettyPhoto({
		animationSpeed: 'fast',
		padding: 40,
		opacity: 0.8,
		allow_resize: false,
		theme: 'dark_rounded'
	});*/

	/*
	* prevent ie from flickering with css backgrounds
	*/
	try {
		document.execCommand('BackgroundImageCache', false, true);
	} catch(e) {} 

	/*
	* index slideshow
	*/
	if($("#indexSlideBlock > div").size() == 1 ){
		$('#indexSlideBlock div').show();
	} else {
		$('#indexSlideBlock').cycle({
			fx:         'fade',
			timeout:    7000, 
			speed:      700
		});
	}
	
   $('#accordion div').hide();
   $('#accordion h4').click(function(){
	   $('#accordion h4 img').attr("src","/images/graphics/plus.gif");
	   $(this).find('img').attr("src","/images/graphics/minus.gif");
	   $('#accordion div').slideUp();
	   $(this).next().slideDown();
	   return false;
   });

	
});
