
var Toggles = {
	
	
	
	setup: function(){
		console.log("Initializing Toggles");
		if( $("ciid_showhide_comments") ){
			console.log(" Comments");
			var copen;
			var Slide_comments	= new Fx.Slide('comments_wrap', {'duration':1});
			Slide_comments.hide();
			copen = false;
			$("ciid_showhide_comments_b").addEvent('click', function(e){
				e = new Event(e);
				Slide_comments.toggle();
				copen = !copen;
				
				$('ciid_showhide_comments').setText( (copen)?"Hide":"Show Comments and Responces to this Post" );
				e.stop();
			});
		}
		
		if( $("ciid_showhide_reply") ){
			console.log(" Replies");
			var ccopen;
			var Slide_reply		= new Fx.Slide('commentformbox', {'duration':1});
			Slide_reply.hide();
			$("ciid_showhide_reply_b").addEvent('click', function(e){
				e = new Event(e);
				Slide_reply.toggle();
				ccopen = !ccopen;
				
				$('ciid_showhide_reply').setText( (ccopen)?"Hide":"Show Comments Form" );
				e.stop();	
			});
		}

	}
}