window.addEvent( 'domready', function(){
		var firstItem = 0;
		$$( '.sliderWrapper' ).each(function(item){
		var thisSlider = new Fx.Slide( item.getElement( '.slideItem' ), {
                                transition: 'cubic:in:out',
                                duration: 500,
                                onComplete: function(){
                                                swapbg(item.getElement('h4'),thisSlider.open);
                                }
                                } );
		item.getElement( '.slideToggle' ).addEvent( 'click', function(){
			   thisSlider.toggle();
			   } );
                swapbg(item.getElement('h4'),thisSlider.open);
		/*if (firstItem == 0) {
			thisSlider.show();
                        swapbg(item.getElement('h4'),thisSlider.open);
			firstItem = 1;
		}else{
			thisSlider.hide();
		}*/
		} );
} );
function swapbg(item,status){
		(status) ? item.setStyle('background','url(http://infusionmedia.s3.amazonaws.com/site/infusionsoft/templates-6-09/charts/competitive/minus-btn.png) 5px 7px no-repeat') : item.setStyle('background','url(http://infusionmedia.s3.amazonaws.com/site/infusionsoft/templates-6-09/charts/competitive/plus-btn.png) 5px 7px no-repeat');
}
