function slideSwitch() {
	var active = jQuery('#slideshow div.active');

	if ( active.length == 0 ) active = jQuery('#slideshow div:last');

	var next =  active.next().length ? active.next()
		: jQuery('#slideshow div:first');

	active.addClass('last-active');

	next.css({opacity: 0.0})
		.addClass('active')
		.animate({opacity: 1.0}, 1000, function() {
			active.removeClass('active last-active');
		});
}

jQuery(document).ready( function() {		
	
	// Fix background PNG images
	jQuery("#header").pngfix({
		sizingMethod: "crop"
	});
	
	jQuery("img#logo").pngfix();

	jQuery("div#header div#special_header div#special_text-330557811, #content, #slideshow, #slideshow .slide_image, div#page-posts, div#page-posts div.post, div.wp-caption, .round_box_black, .round_box, #funbox_form").corner( "10px");

	jQuery("div#header div#special_header div#special_event-calendar").corner( "10px bottom");

	jQuery("div#header div#special_header #special_text-330557814 div#search, div.back_to_top, div#header div#special_header div#text-330557813 ul li, div#header div#special_header div#text-330557813").corner( "10px tl bl");

	jQuery("#funbox_form .submit, div#primary li#pages, div#primary li#pages ul .page_item").corner( "10px tr br");
	FLIR.init({path:'http://solacenter.org/wp-content/themes/sola/js/facelift/'},new FLIRStyle( {mode:'static'} ));
	FLIR.auto( [ '' ] );
	
	jQuery("#content h1,#content h2,#content h3,#content h4,#content h5,#content h6, li#pages ul li.page_item, #special_text-330557813 li, #sola_information h2, #sola_information .sola_address, #sola_information .sola_phone, #funbox_form fieldset legend, .back_to_top").each( function() { 
		FLIR.replace( this, new FLIRStyle({ cFont:'adesm' }) ); 
	} );

	if ( jQuery("#slideshow") ) {
		jQuery(function() {
			setInterval( "slideSwitch()", 5000 );
		});
	}

});




