$(document).ready(function() {
	$('ul.hide').hide();
	$('#pages ul').hide();
	$('#articles ul').hide();
	//$('#categories ul ul').hide();
	$('.sidebar-box h2').click(function(){
 		$(this).next().slideToggle("fast");
 	});
 	//$('#categories ul li a').click(function(){
 	//	$(this).next().slideToggle("fast");
 	//	return false;
 	//});
 	
	$('ul#nav').superfish({
		delay: 400,
		speed: 'fast'
	}); 
	$('#faqpg').find('dd').end().find('dt').click(function() {
			var answer = $(this).next();
			if (answer.is(':visible')) {
				answer.slideUp("medium");
			} else {
				answer.slideDown("medium");
			}
		});
		$('li.external a').click( function() {
	        window.open( jQuery(this).attr('href') );
	        return false;
	    });
	    $('a.external').click( function() {
	        window.open( jQuery(this).attr('href') );
	        return false;
	    });
	     $('#nav li:last-child').css({
	     	background:"none"
     	});
     	$('.sidebar-box ul li ul li:last-child').css({
     		border: "none"
 		});
	});
	    
	function showall()
	{
		$("dd").show();
	}
	function hideall()
	{
		$("dd").hide();
	}
	function mycarousel_initCallback(carousel)
{
    // Disable autoscrolling if the user clicks the prev or next button.
    carousel.buttonNext.bind('click', function() {
        carousel.startAuto(0);
    });

    carousel.buttonPrev.bind('click', function() {
        carousel.startAuto(0);
    });

    // Pause autoscrolling if the user moves with the cursor over the clip.
    carousel.clip.hover(function() {
        carousel.stopAuto();
    }, function() {
        carousel.startAuto();
    });
};

$(document).ready(function() {
    $('#mycarousel').jcarousel({
        auto: 3,
        wrap: 'both',
        animation: 1000,
		scroll:1,
        visible: 1,
        easing: 'easeOutQuint',
        initCallback: mycarousel_initCallback
    });
});
