var accordion = function(toggleEl, accEl) {
    toggleEl.click(function() {
        accEl.slideToggle(function() { });
        return false;
    });
}

	var J = jQuery.noConflict();
	J(document).ready(function(){
		J("ul.sf-menu").supersubs({
            minWidth:    12, maxWidth:    27,extraWidth:  1 
		}).superfish({animation: {height:'show'},delay: 400,speed: 500});
		J('.buttonCustomize').click(
			function () {
				J(this).next().animate({width: 'toggle'});
		});

		J('#alt-menu-button').click(
			function () {
				J('#alt-menu-container').animate({
  height: 'toggle'}, "slow");
		});
		J('#slideshow').after('<table style="width:575px"><tr><td id="navImgContainer"><button class="prevNavImg"></button><div id="navImgContent"><ul id="navImg">').cycle({ 
		    fx:     'fade', 
		    speed:       200, 
		    timeout:     0, 
		    pager:  '#navImg', 
		    pause: 1,
		    /*agerEvent: 'mouseover',
		    pauseOnPagerHover: true,*/
				 
		    // callback fn that creates a thumbnail to use as pager anchor 
		    pagerAnchorBuilder: function(idx, slide) {
		        /*return '<li class="'+ slide.alt +'"><a href="javascript:void(0)"><span>'+ slide.alt +'</span></a></li>'; */
		        return '<li><a href="javascript:void(0)"><img src="' + slide.src + '" width="85" /></a></li>'; 
		    } 
		});
		J('#navImgContent').after('<button class="nextNavImg"></button>');
		J("#product-tabber .tx-rwyamahaspecs-pi1").accordion({ 
			header: "h3",
			autoHeight: false
		});
		
		J("#other-product-link-container").jCarouselLite({
			btnNext: '.next',
			btnPrev: '.prev',
			speed:2500,
			delay:1000,
		    visible:4,
		    scroll:4,
			easing: "easeInOutBack"
		});
		J("#navImgContainer").jCarouselLite({
			btnNext: '.nextNavImg',
			btnPrev: '.prevNavImg',
			speed:2500,
			delay:1000,
			circular: false,
		    visible:5
		});
		J('#other-product-button').click(
			function () {
				J('#other-product-link').animate({
  height: 'toggle'}, "slow");;
		});

   });