
//Accordion
$(document).ready(function(){

$('.pareas').accordion({
	header: 'h2',
	event: 'click',
	panelSelector: 'p',
	active: false,
	autoHeight: false,
	clearStyle: true,
	animated: 'easeslide',
	collapsible: true,
	icons: {
        header: "acchead",
        headerSelected: "accheadselect"}
	});
					
$(".pareas h2").click(function(){
$("p").fadeIn(1500,"linear");
$("img").fadeIn(1500,"linear");
$("iframe").fadeIn(1500,"linear");
});

	});

//Top Image Rotator	
$(function() {
	setInterval ("rotateImages()", 4000);
});

function rotateImages() {
	var oCurPhoto = $('#photoslider div.current');
	var oNxtPhoto = oCurPhoto.next ();
	if (oNxtPhoto.length === 0)
		oNxtPhoto = $('#photoslider div:first');
	
	oCurPhoto.removeClass ('current').addClass('previous');
	oNxtPhoto.css({opacity:0.0}).addClass('current').animate({opacity: 1.0}, 1500,
	function() {
	oCurPhoto.removeClass('previous');
	});
	
}

