$(document).ready(function(){

	$('div#show_hide > div').hide();  
	$('div#show_hide > span.name_title').click(function() {
		$(this).next('div').slideToggle('fast')
		.siblings('div:visible').slideUp('fast');
		});

	//Document library lists
	$('div#show_hide > div').hide();  
	$('div#show_hide > h3.cattitle').click(function() {
		$(this).toggleClass('opened');
		$(this).next('div').slideToggle('fast')
		.siblings('div:visible').slideUp('fast');
		$(this).siblings('h3.opened').removeClass('opened');
		});
    

	$('img.captioned').jcaption();

	$('#login_form').hide();
	// shows the login form  
	$('a.login').click(function() {
	$('#login_form').slideDown('slow') ;
	return false;
	});

	// hides the login form  
	$('a.login_close').click(function() {
	$('#login_form').slideUp('slow') ;
	return false;
	});

	$('#cformsform').hide();
	// shows the newsletter form  
	$('a.showform').click(function() {
	$('#cformsform').slideDown('slow') ;
	return false;
	});

	// fancify the HR for IE 
	$("hr").replaceWith("<div class=\"hr\"></div>");


	// This puts a class of left or right on floated images
	//$("img").each(function(){
	//var imgAlign = $(this).css("float");
	//if (imgAlign != ''){
		//$(this).addClass(imgAlign);
		//}
   	//});

	//Kill the separator on the last sidebar post
	$(".sidebar_post:last").addClass('last');

	// Homepage rotating testimonials
	$('#testimonial_box').cycle({
		fx: 'fade', // choose your transition type, ex: fade, scrollUp, shuffle, etc...
		timeout: 10000,
		sync: false,
		cleartype:  1,
		pause: 1 //pause on hover
	});

	$("#docs_list li:odd").addClass("alt");


});