$(function (){
	if ($('#content_work')) { $('#content_work').codaSlider(); }
	if ($('#featured_slider')) { $('#featured_slider').codaSlider({
		autoSlide: true,
		autoSlideInterval: 4000,
		dynamicArrows: false,
		dynamicTabs: false
		});
	}
	if ($("#content_work a:has(img)")) { $("#content_work a:has(img)").fancybox(); }
	$('.accordion h3').click(function() {
		if ($(this).children(".min").html()=="+") {
			$(this).children(":first").replaceWith('<span class="min">-</span>');
		}
		else if ($(this).children(".min").html()=="-") {
			$(this).children(":first").replaceWith('<span class="min">+</span>');
		}
		$(this).next().toggle('fast');
		return false;
	}).next().hide();
	
	$('.expand_all').click(function() {
		if ($(this).html()=='Show All' || $(this).html()=='Show All') {
			$(this).empty().html('Hide All');
			$(this).removeClass('expand');
			$(this).addClass('hide');
			$('.accordion ul').show();
		}
		else if ($(this).html()=='Hide All' || $(this).html()=='Hide All') {
			$(this).empty().html('Show All');
			$(this).removeClass('hide');
			$(this).addClass('expand');
			$('.accordion ul').hide();
		}
	});
	$('.expand_all').mouseover(function() {
	$(this).css('color','#839e45');
	});
	$('.expand_all').mouseout(function() {
		$(this).css('color','#706963');
	});


	$('.accordion h3').mouseover(function() {
		$(this).css('color','#839e45');
	});
	$('.accordion h3').mouseout(function() {
		$(this).css('color','#706963');
	});
	
	$('.accordion div').hide();
	$('.accordion p.toggle').show();
	
	$('.accordion p.toggle').click(function() {
		if ($(this).text()=='(more)') {
			$(this).empty().html('<p class="toggle">(less)</p>');
		}
		else if ($(this).text()=='(less)') {
			$(this).empty().html('<p class="toggle">(more)</p>');
		}
		$(this).prev().toggle('normal');
		return false;
	}).next().hide();

});