jQuery.noConflict();

jQuery(document).ready(function() {
	
	// Expand Panel
	jQuery("#slideit").click(function(){
		jQuery("div#slidepanel").slideDown("slow");
	
	});	
	
	// Collapse Panel
	jQuery("#closeit").click(function(){
		jQuery("div#slidepanel").slideUp("slow");	
	});		
	
	// Switch buttons from "Log In | Register" to "Close Panel" on click
	jQuery("#toggle a").click(function () {
		jQuery("#toggle a").toggle();
	});		
		
});


// Front slideshow
jQuery(document).ready(
				function(){
					
					jQuery('ul#frontslide_box').innerfade({
						speed: 1000,
						timeout: 5000,
						type: 'random',
						containerheight: '350px'
			});
		});

// Slide slideshow 2

jQuery(document).ready(function () {

    function mycarousel_initCallback(carousel) {
        jQuery('#featured-item-next').bind('click', function () {
            carousel.next();
            return false;
        });
        jQuery('#featured-item-prev').bind('click', function () {
            carousel.prev();
            return false;
        });

        // 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();
        });

    };

jQuery('#featured_content').jcarousel({
        scroll: 1,
        auto: 5, // Sets the time delay between automatic scrolling of the panel
        wrap: 'last',
        easing: "easeOutBack",
        initCallback: mycarousel_initCallback,
        // This tells jCarousel NOT to autobuild prev/next buttons
        buttonNextHTML: null,
        buttonPrevHTML: null
    });

});

