$(document).ready(function() {
    $('#cycle').cycle({
		fx: 'scrollRight', // choose your transition type, ex: fade, scrollUp, shuffle, etc...
		timeout: 3500
	});
});

/* Menu controls */
$(document).ready(function() {
    $('div.w').center();
});

$(document).ready(function(){
	var nav = {
		container: $("div.n"),
		lists: $("div.n ul"),
		links: $("div.n ul li a:not([href])"),
		collapsible: $("div.n ul:not(:has(a.current))"),
		current: "div.n ul li a.current"
	}
	
	nav.collapsible.hide();
	$(nav.current).parents().show();
	$(nav.current).siblings("ul").show();
	nav.container.show();
	
	nav.links.click(function(){
		$(nav.current).siblings("ul").hide();
		$(this).addClass("current").siblings("ul").show();
	});
});

$(document).ready(function(){
	$("#drawer #show_hide").toggle(function(){
		$("#drawer #description").slideDown('slow');
		$(this).text("- Hide");
	}, function(){
		$("#drawer #description").slideUp('slow');
		$(this).text("+ Show");
	});
	
	$(".image").click(function() {
		var image = $(this).attr("rel");
		var title = $(this).attr("title");
		$('#image').hide();
		$('#image').fadeIn('slow');
		$('#image img').attr('src',image);
		return false;
	});
});

$(document).ready(function(){
	$("div.scrollable").scrollable();
});

$(document).ready(function(){
	$('#mycarousel').jcarousel({
		scroll: 1,
		wrap: 'circular',
		auto: 4
	});
});


    $(function () {
        // basic version is: $('div.demo marquee').marquee() - but we're doing some sexy extras
        
        $('#news-fp').marquee('pointer').mouseover(function () {
            $(this).trigger('stop');
        }).mouseout(function () {
            $(this).trigger('start');
        }).mousemove(function (event) {
            if ($(this).data('drag') == true) {
                this.scrollLeft = $(this).data('scrollX') + ($(this).data('x') - event.clientX);
            }
        }).mousedown(function (event) {
            $(this).data('drag', true).data('x', event.clientX).data('scrollX', this.scrollLeft);
        }).mouseup(function () {
            $(this).data('drag', false);
        });
    });
	

