$(function(){

	// main navigation
	$( "#navigation" ).accordion({
		collapsible: true,
		//header: 'li.head a',
		header: '> li.head > :first-child,> :not(li):even',
		//header: '> li.head a:first-child',
		autoHeight: false,
		event: 'click',
		active: false,
		navigation: true
	});

	// sidebar images
	if($('div.header_image').length>0){
	    $('div.header_image').cycle();
	}

	// testimonials
	if($('div.testimonial_posts ul').length>0){
	    $('ul.category-post-navigation').cycle({
			fx: 'scrollVert',
			//fx: 'fadeZoom',
			fit: 0,
		    random: 1,
		    containerResize: 1,
		    //sync: true,
		    speed: 3000,
		    timeout: 6000
		});
	}

	//  news
//	if($('div.category_posts ul').length>0){
//	    $('ul.category-post-navigation').cycle({
//			fx: 'fade',
//			fit: 0,
//		    containerResize: 1,
//		    timeout: 6000
//		});
//	}

	// sidebar animation nav
	if($(".widget.sidebar-nav li a").length>0){
		$(".widget.sidebar-nav li a").hover(
			function(){if(!$(this)
				.hasClass("act")){$(this).stop()
				.animate({paddingLeft:'25px',width:163+'px'},150);}},
			function(){if(!$(this)
				.hasClass("act")){$(this).stop()
				.animate({paddingLeft:'15px',width:173+'px'},150);}
		});
	}

	// blog animation nav
	if($(".widget.blog_categories li a").length>0){
		$(".widget.blog_categories li a").hover(
			function(){if(!$(this)
				.hasClass("act")){$(this).stop()
				.animate({paddingLeft:'25px',width:163+'px'},150);}},
			function(){if(!$(this)
				.hasClass("act")){$(this).stop()
				.animate({paddingLeft:'15px',width:173+'px'},150);}
		});
	}

	// team member name slide
	$(function() {
		$('#team-navigation a').hover(function(){
			$(this).find('span').animate({bottom:'0px'},{queue:false,duration:500});
		}, function(){
			$(this).find('span').animate({bottom:'-26px'},{queue:false,duration:500});
		});
	});

	// main slider
	if($('#slider').length>0){
	    $('#slider').nivoSlider({
		    effect: 'fade',
		    pauseTime: 4400,
			captionOpacity:0.65,
			directionNav:true,
		    pauseOnHover: true,
			directionNavHide:true
		});
	}

	// main nav scrolling
	//$('#navigation').fixFloat();
    	    
});
 
$(window).load(function() {



});
