// JavaScript Document
function mycarousel_initCallback(carousel) {
    jQuery('.jcarousel-control a').bind('click', function() {
        carousel.scroll(jQuery.jcarousel.intval(jQuery(this).text()));
        return false;
    });

    jQuery('.jcarousel-scroll select').bind('change', function() {
        carousel.options.scroll = jQuery.jcarousel.intval(this.options[this.selectedIndex].value);
        return false;
    });

    jQuery('#mycarousel-next').bind('click', function() {
        carousel.next();
        return false;
    });

    jQuery('#mycarousel-prev').bind('click', function() {
        carousel.prev();
        return false;
    });
}
jQuery(document).ready(function() {
	jQuery('#mycarousel0').jcarousel({
        scroll: 1,
		animation: 1000
    });							
    jQuery('#mycarousel1').jcarousel({
        scroll: 1,
		animation: 1000
    });
	jQuery('#mycarousel2').jcarousel({
        scroll: 1,
		animation: 1000	
    });
	jQuery('#mycarousel3').jcarousel({
        scroll: 1,
		animation: 1000
    });
	jQuery('#mycarousel4').jcarousel({
        scroll: 1,
		animation: 1000
    });
	jQuery('#mycarousel5').jcarousel({
        scroll: 1,
		animation: 1000
    });
	jQuery('#mycarousel6').jcarousel({
        scroll: 1,
		animation: 1000
    });
	jQuery('#mycarousel7').jcarousel({
        scroll: 1,
		animation: 1000
    });
	jQuery('#mycarousel8').jcarousel({
        scroll: 1,
		animation: 1000
    });
	jQuery('#mycarousel9').jcarousel({
        scroll: 1,
		animation: 1000
    });
	jQuery('#mycarousel10').jcarousel({
        scroll: 1,
		animation: 1000
    });
	jQuery('#mycarousel11').jcarousel({
        scroll: 1,
		animation: 1000
    });
	jQuery('#mycarousel12').jcarousel({
        scroll: 1,
		animation: 1000
    });
	jQuery('#mycarousel13').jcarousel({
        scroll: 1,
		animation: 1000
    });
	jQuery('#mycarousel14').jcarousel({
        scroll: 1,
		animation: 1000
    });
	jQuery('#mycarousel15').jcarousel({
        scroll: 1,
		animation: 1000
    });
	jQuery('#mycarousel16').jcarousel({
        scroll: 1,
		animation: 1000
    });
	jQuery('#mycarousel17').jcarousel({
        scroll: 1,
		animation: 1000
    });
	jQuery('#mycarousel18').jcarousel({
        scroll: 1,
		animation: 1000
    });
	jQuery('#mycarousel19').jcarousel({
        scroll: 1,
		animation: 1000
    });
	jQuery('#mycarousel20').jcarousel({
        scroll: 1,
		animation: 1000
    });
});

jQuery(document).ready(function() {
								
	// Hides all product nav carousels							
	
    $('.productNav').hide();
		
	// Adds arrow class to first brand on page load
	
    $('.leftNav_RightButton:first').addClass('arrow');
	
	// loads correct carousel for each brand, hides all others
	
	$('.leftNav_RightButton').click(function(){
		$(this).addClass('arrow');
		$(this).siblings().removeClass('arrow');
	 });
	
	$('body#SL_home #productNav_brand1').show();		
    $('body#SL_home .productSection').load('stairlifts/i_SL_generalInfo.html', function(){
		$f('productPlayer', 'swf/flowplayer-3.1.3.swf', {
		    clip: {
				autoPlay: true,
				scaling: 'orig'
			},
			plugins: {
  				controls: {
					timeBgColor: '#d2a564',
					sliderColor: '#663300',
					bufferGradient: 'none',
					backgroundGradient: 'none',
					borderRadius: '0px',
					bufferColor: '#ffffff',
					sliderGradient: 'none',
					progressGradient: 'medium',
					durationColor: '#ffffff',
					progressColor: '#d2a564',
					backgroundColor: '#ffffff',
					tooltipTextColor: '#ffffff',
					tooltipColor: '#663300',
					volumeSliderGradient: 'none',
					volumeSliderColor: '#663300',
					buttonOverColor: '#663300',
					timeColor: '#663300',
					buttonColor: '#d2a564',
					height: 24,
					opacity: 1.0,
				    autoHide: true,
					fullscreen: false,
					time: false,
					volume: false
		  	 }
			}, 
			canvas: {
				backgroundColor: '#ffffff',
				backgroundGradient: 'none'
				
			}
		});
	 });
	
	$('body#SL_curved #productNav_brand0').show();
  	$('body#SL_curved .productSection').load('stairlifts/i_SL_Curved.html');
	
	$('body#SL_highweight #productNav_brand0').show();
    $('body#SL_highweight .productSection').load('stairlifts/i_SL_HighWeight.html');
	
	$('body#SL_outside #productNav_brand0').show();
    $('body#SL_outside .productSection').load('stairlifts/i_SL_Outside.html');
	
	$('body#SL_rent .productSection').load('stairlifts/i_SL_Rent.html');
	
	$('body#SL_renttobuy .productSection').load('stairlifts/i_SL_Renttobuy.html');
	
	$('body#SL_straight #productNav_brand11').show();
    $('body#SL_straight .productSection').load('stairlifts/i_SL_straight.html');
	
	$('body#SL_used .productSection').load('stairlifts/i_SL_Used.html');
	
	$('body#SL_viewall #productNav_brand11').show();
    $('body#SL_viewall .productSection').load('stairlifts/i_SL_ViewAll.html');
	
	$('.product1').click(function(){
	    $('#productNav_brand1').show();
		$('#productNav_brand1').siblings().hide();
	});
	$('.product2').click(function(){
	    $('#productNav_brand2').show();
		$('#productNav_brand2').siblings().hide();
	});
	$('.product3').click(function(){
	    $('#productNav_brand3').show();
		$('#productNav_brand3').siblings().hide();
	});
	$('.product4').click(function(){
	    $('#productNav_brand4').show();
		$('#productNav_brand4').siblings().hide();
	});
	$('.product5').click(function(){
	    $('#productNav_brand5').show();
		$('#productNav_brand5').siblings().hide();
	});
	$('.product6').click(function(){
	    $('#productNav_brand6').show();
		$('#productNav_brand6').siblings().hide();
	});
	$('.product7').click(function(){
	    $('#productNav_brand7').show();
		$('#productNav_brand7').siblings().hide();
	});
	$('.product8').click(function(){
	    $('#productNav_brand8').show();
		$('#productNav_brand8').siblings().hide();
	});
	$('.product9').click(function(){
	    $('#productNav_brand9').show();
		$('#productNav_brand9').siblings().hide();
	});
	$('.product10').click(function(){
	    $('#productNav_brand10').show();
		$('#productNav_brand10').siblings().hide();
	});
	$('.product11').click(function(){
	    $('#productNav_brand11').show();
		$('#productNav_brand11').siblings().hide();
	});
	$('.product12').click(function(){
	    $('#productNav_brand12').show();
		$('#productNav_brand12').siblings().hide();
	});
	$('.product13').click(function(){
	    $('#productNav_brand13').show();
		$('#productNav_brand13').siblings().hide();
	});
	$('.product14').click(function(){
	    $('#productNav_brand14').show();
		$('#productNav_brand14').siblings().hide();
	});
	$('.product15').click(function(){
	    $('#productNav_brand15').show();
		$('#productNav_brand15').siblings().hide();
	});
	$('.product16').click(function(){
	    $('#productNav_brand16').show();
		$('#productNav_brand16').siblings().hide();
	});
	$('.product17').click(function(){
	    $('#productNav_brand17').show();
		$('#productNav_brand17').siblings().hide();
	});
	$('.product18').click(function(){
	    $('#productNav_brand18').show();
		$('#productNav_brand18').siblings().hide();
	});
	$('.product19').click(function(){
	    $('#productNav_brand19').show();
		$('#productNav_brand19').siblings().hide();
	});
	$('.product20').click(function(){
	    $('#productNav_brand20').show();
		$('#productNav_brand20').siblings().hide();
	});
	
	$('#Sterling950').click(function(){
	  	$('.productSection').load('stairlifts/i_SL_Sterling_Sterling950.html');				 
	});
	$('#Sterling1000').click(function(){
	  	$('.productSection').load('stairlifts/i_SL_Sterling_Sterling1000.html');				 
	});
	$('#StairGlide').click(function(){
	  	$('.productSection').load('stairlifts/i_SL_Thyssen_StairGlide.html');			 
	});
	$('#CitiaStandard').click(function(){
	  	$('.productSection').load('stairlifts/i_SL_Thyssen_CitiaStandard.html');			 
	});
	$('#CitiaSilver').click(function(){
	  	$('.productSection').load('stairlifts/i_SL_Thyssen_CitiaSilver.html');			 
	});
	$('#FlowII').click(function(){
	  	$('.productSection').load('stairlifts/i_SL_Thyssen_FlowII.html');		 
	});
	$('#Excel').click(function(){
	  	$('.productSection').load('stairlifts/i_SL_Thyssen_Excel.html');		 
	});
	$('#BrunoLT').click(function(){
	  	$('.productSection').load('stairlifts/i_SL_Bruno_ElectraRideLT.html');		 
	});
	$('#BrunoElite').click(function(){
	  	$('.productSection').load('stairlifts/i_SL_Bruno_ElectraRideElite.html');	 
	});
	$('#BrunoIII').click(function(){
	  	$('.productSection').load('stairlifts/i_SL_Bruno_ElectraRideIII.html');	 
	});
	$('#SummitAmeriglide').click(function(){
	  	$('.productSection').load('stairlifts/i_SL_Summit_SummitAmeriglide.html');		 
	});
	$('#SummitMax').click(function(){
	  	$('.productSection').load('stairlifts/i_SL_Summit_SummitMax.html');		 
	});
	$('#SavariaB07').click(function(){
	  	$('.productSection').load('stairlifts/i_SL_SavariaConcord_B07StairChair.html');	 
	});
	$('#Acorn').click(function(){
	  	$('.productSection').load('stairlifts/i_SL_Acorn_SuperGlide120.html'); 
	});
	$('#Pinnacle').click(function(){
	  	$('.productSection').load('stairlifts/i_SL_Pinnacle.html'); 
	});
	
    // Loads outside html file when you click on product located on carousel. li id same as html page name.
    
	// BRAND: Sterling
	
	
	$('li#va_SL_Sterling_Sterling950').click(function(){
		$('.productSection').load('stairlifts/i_SL_Sterling_Sterling950.html');
	});
	$('li#va_SL_Sterling_Sterling950Plus').click(function(){
		$('.productSection').load('stairlifts/i_SL_Sterling_Sterling950Plus.html');
	});
	$('li#va_SL_Sterling_Sterling1000').click(function(){
		$('.productSection').load('stairlifts/i_SL_Sterling_Sterling1000.html');
	});
	$('li#va_SL_Sterling_Sterling2000').click(function(){
		$('.productSection').load('stairlifts/i_SL_Sterling_Sterling2000.html');
	});
	
	$('li#i_SL_Sterling_Sterling950').click(function(){
		$('.productSection').load('stairlifts/i_SL_Sterling_Sterling950.html');
	});
	$('li#i_SL_Sterling_Sterling950Plus').click(function(){
		$('.productSection').load('stairlifts/i_SL_Sterling_Sterling950Plus.html');
	});
	$('li#i_SL_Sterling_Sterling1000').click(function(){
		$('.productSection').load('stairlifts/i_SL_Sterling_Sterling1000.html');
	});
	$('li#i_SL_Sterling_Sterling2000').click(function(){
		$('.productSection').load('stairlifts/i_SL_Sterling_Sterling2000.html');
	});
	
	
	// BRAND: Thyssen
	
	$('li#va_SL_Thyssen_StairGlide').click(function(){
		$('.productSection').load('stairlifts/i_SL_Thyssen_StairGlide.html');
	});
	$('li#va_SL_Thyssen_CitiaStandard').click(function(){
		$('.productSection').load('stairlifts/i_SL_Thyssen_CitiaStandard.html');
	});
	$('li#va_SL_Thyssen_CitiaStandardPlus').click(function(){
		$('.productSection').load('stairlifts/i_SL_Thyssen_CitiaStandardPlus.html');
	});
	$('li#va_SL_Thyssen_CitiaSelect').click(function(){
		$('.productSection').load('stairlifts/i_SL_Thyssen_CitiaSelect.html');
	});
	$('li#va_SL_Thyssen_CitiaExcel').click(function(){
		$('.productSection').load('stairlifts/i_SL_Thyssen_CitiaExcel.html');
	});
	$('li#va_SL_Thyssen_CitiaSilver').click(function(){
		$('.productSection').load('stairlifts/i_SL_Thyssen_CitiaSilver.html');
	});
	$('li#va_SL_Thyssen_CitiaStar').click(function(){
		$('.productSection').load('stairlifts/i_SL_Thyssen_CitiaStar.html');
	});
	$('li#va_SL_Thyssen_FlowII').click(function(){
		$('.productSection').load('stairlifts/i_SL_Thyssen_FlowII.html');
	});
	$('li#va_SL_Thyssen_Excel').click(function(){
		$('.productSection').load('stairlifts/i_SL_Thyssen_Excel.html');
	});
	
	$('li#i_SL_Thyssen_StairGlide').click(function(){
		$('.productSection').load('stairlifts/i_SL_Thyssen_StairGlide.html');
	});
	$('li#i_SL_Thyssen_StairGlide_2').click(function(){
		$('.productSection').load('stairlifts/i_SL_Thyssen_StairGlide_2.html');
	});
	$('li#i_SL_Thyssen_StairGlide_3').click(function(){
		$('.productSection').load('stairlifts/i_SL_Thyssen_StairGlide_3.html');
	});
	$('li#i_SL_Thyssen_StairGlide_4').click(function(){
		$('.productSection').load('stairlifts/i_SL_Thyssen_StairGlide_4.html');
	});
	$('li#i_SL_Thyssen_CitiaStandard').click(function(){
		$('.productSection').load('stairlifts/i_SL_Thyssen_CitiaStandard.html');
	});
	$('li#i_SL_Thyssen_CitiaStandardPlus').click(function(){
		$('.productSection').load('stairlifts/i_SL_Thyssen_CitiaStandardPlus.html');
	});
	$('li#i_SL_Thyssen_CitiaSelect').click(function(){
		$('.productSection').load('stairlifts/i_SL_Thyssen_CitiaSelect.html');
	});
	$('li#i_SL_Thyssen_CitiaExcel').click(function(){
		$('.productSection').load('stairlifts/i_SL_Thyssen_CitiaExcel.html');
	});
	$('li#i_SL_Thyssen_CitiaSilver').click(function(){
		$('.productSection').load('stairlifts/i_SL_Thyssen_CitiaSilver.html');
	});
	$('li#i_SL_Thyssen_CitiaStar').click(function(){
		$('.productSection').load('stairlifts/i_SL_Thyssen_CitiaStar.html');
	});
	$('li#i_SL_Thyssen_FlowII').click(function(){
		$('.productSection').load('stairlifts/i_SL_Thyssen_FlowII.html');
	});
	$('li#i_SL_Thyssen_Excel').click(function(){
		$('.productSection').load('stairlifts/i_SL_Thyssen_Excel.html');
	});
	$('li#i_SL_Thyssen_Excel_2').click(function(){
		$('.productSection').load('stairlifts/i_SL_Thyssen_Excel_2.html');
	});
	$('li#i_SL_Thyssen_Excel_3').click(function(){
		$('.productSection').load('stairlifts/i_SL_Thyssen_Excel_3.html');
	});
	$('li#i_SL_Thyssen_Excel_4').click(function(){
		$('.productSection').load('stairlifts/i_SL_Thyssen_Excel_4.html');
	});
	
	// BRAND: Bruno
	
	$('li#va_SL_Bruno_ElectraRideLT').click(function(){
		$('.productSection').load('stairlifts/i_SL_Bruno_ElectraRideLT.html');
	});
	$('li#va_SL_Bruno_ElectraRideII').click(function(){
		$('.productSection').load('stairlifts/i_SL_Bruno_ElectraRideII.html');
	});
	$('li#va_SL_Bruno_ElectraRideElite').click(function(){
		$('.productSection').load('stairlifts/i_SL_Bruno_ElectraRideElite.html');
	});
	$('li#va_SL_Bruno_ElectraRideIII').click(function(){
		$('.productSection').load('stairlifts/i_SL_Bruno_ElectraRideIII.html');
	});
	
	$('li#i_SL_Bruno_ElectraRideLT').click(function(){
		$('.productSection').load('stairlifts/i_SL_Bruno_ElectraRideLT.html');
	});
	$('li#i_SL_Bruno_ElectraRideII').click(function(){
		$('.productSection').load('stairlifts/i_SL_Bruno_ElectraRideII.html');
	});
	$('li#i_SL_Bruno_ElectraRideElite').click(function(){
		$('.productSection').load('stairlifts/i_SL_Bruno_ElectraRideElite.html');
	});
	$('li#i_SL_Bruno_ElectraRideIII').click(function(){
		$('.productSection').load('stairlifts/i_SL_Bruno_ElectraRideIII.html');
	});
	
	// BRAND: Summit Lifts
	
	$('li#va_SL_Summit_SummitAmeriglide').click(function(){
		$('.productSection').load('stairlifts/i_SL_Summit_SummitAmeriglide.html');
	});
	$('li#va_SL_Summit_SummitMax').click(function(){
		$('.productSection').load('stairlifts/i_SL_Summit_SummitMax.html');
	});
	
	$('li#i_SL_Summit_SummitAmeriglide').click(function(){
		$('.productSection').load('stairlifts/i_SL_Summit_SummitAmeriglide.html');
	});
	$('li#i_SL_Summit_SummitMax').click(function(){
		$('.productSection').load('stairlifts/i_SL_Summit_SummitMax.html');
	});
	
	// BRAND: Savaria/Concord
	
	$('li#va_SL_SavariaConcord_B07StairChair').click(function(){
		$('.productSection').load('stairlifts/i_SL_SavariaConcord_B07StairChair.html');
	});
	$('li#va_SL_SavariaConcord_StepSaverStairChair').click(function(){
		$('.productSection').load('stairlifts/i_SL_SavariaConcord_StepSaverStairChair.html');
	});
	
	$('li#i_SL_SavariaConcord_B07StairChair').click(function(){
		$('.productSection').load('stairlifts/i_SL_SavariaConcord_B07StairChair.html');
	});
	$('li#i_SL_SavariaConcord_StepSaverStairChair').click(function(){
		$('.productSection').load('stairlifts/i_SL_SavariaConcord_StepSaverStairChair.html');
	});
	
	// BRAND: Acorn 
	
	$('li#va_SL_Acorn_SuperGlide120').click(function(){
		$('.productSection').load('stairlifts/i_SL_Acorn_SuperGlide120.html');
	});
	
	$('li#i_SL_Acorn_SuperGlide120').click(function(){
		$('.productSection').load('stairlifts/i_SL_Acorn_SuperGlide120.html');
	});
	$('li#i_SL_Acorn_SuperGlide120_2').click(function(){
		$('.productSection').load('stairlifts/i_SL_Acorn_SuperGlide120_2.html');
	});
	$('li#i_SL_Acorn_SuperGlide120_3').click(function(){
		$('.productSection').load('stairlifts/i_SL_Acorn_SuperGlide120_3.html');
	});
	
	$('li#va_SL_Pinnacle').click(function(){
		$('.productSection').load('stairlifts/i_SL_Pinnacle.html');
	});
	$('li#i_SL_Pinnacle').click(function(){
		$('.productSection').load('stairlifts/i_SL_Pinnacle.html');
	});
	$('li#i_SL_Pinnacle_2').click(function(){
		$('.productSection').load('stairlifts/i_SL_Pinnacle_2.html');
	});
	$('li#i_SL_Pinnacle_3').click(function(){
		$('.productSection').load('stairlifts/i_SL_Pinnacle_3.html');
	});
	$('li#i_SL_Pinnacle_4').click(function(){
		$('.productSection').load('stairlifts/i_SL_Pinnacle_4.html');
	});
	
});
