//avoid conflict with WordPress
$j = jQuery.noConflict();


jQuery(document).ready(function() {
	

	$j("#slider").nivoSlider();

	//moves quote button right on hover
	$j('#quoteButton').hover(function() {
	$j(this).animate({paddingLeft: '+=15px'}, 200);
	}, function() {
		$j(this).animate({paddingLeft: '-=15px'}, 200);
	});


	//to post navigation to top of window
	$j(window).scroll(function() {
		$j('#prime-nav')
		.stop()
		.animate({ 
		opacity: .85,
		top: $j(document).scrollTop()}, 'fast', 'swing');
	});

	// new accordion
	$j('#accordion ul > li ul')
    .click(function(e){
      e.stopPropagation();
    })
   // .filter(':not(:first)') //comment out to hide first element
    .hide();
    
 $j('#accordion ul > li').click(function(){
    var selfClick = $j(this).find('ul:first').is(':visible');
    if(selfClick) {
      return;
    }
    $j(this)
      .parent()
      .find('> li ul:visible')
      .slideToggle('fast', 'easeInExpo');
    
    $j(this)
      .find('ul:first')
      .stop(true, true)
      .slideToggle('fast', 'easeOutExpo');
  });
	

});

