$(document).ready(function(){
$('#tabs div').hide(); // Hide all divs
$('#tabs div:first').show(); // Show the first div
$('#tabs ul li:first').addClass('active'); // Set the class of the first link to active
$('#tabs ul li a').click(function(){ //When any link is clicked
$('#tabs ul li').removeClass('active'); // Remove active class from all links
$(this).parent().addClass('active'); //Set clicked link class to active
var currentTab = $(this).attr('href'); // Set variable currentTab to value of href attribute of clicked link

$('#tabs div:visible').fadeOut("slow",function(){ //fade out visible div
$(currentTab).fadeIn("slow") //fade in target div
});

return false;
});

// BOARDROOMT

$('#tabsB div').hide(); // Hide all divs
$('#tabsB div:first').show(); // Show the first div
$('#tabsB ul li:first').addClass('active'); // Set the class of the first link to active
$('#tabsB ul li a').click(function(){ //When any link is clicked
$('#tabsB ul li').removeClass('active'); // Remove active class from all links
$(this).parent().addClass('active'); //Set clicked link class to active
var currentTab = $(this).attr('href'); // Set variable currentTab to value of href attribute of clicked link

$('#tabsB div:visible').fadeOut("slow",function(){ //fade out visible div
$(currentTab).fadeIn("slow") //fade in target div
});

return false;
});

// LAMINATES

$('#tabsL div').hide(); // Hide all divs
$('#tabsL div:first').show(); // Show the first div
$('#tabsL ul li:first').addClass('active'); // Set the class of the first link to active
$('#tabsL ul li a').click(function(){ //When any link is clicked
$('#tabsL ul li').removeClass('active'); // Remove active class from all links
$(this).parent().addClass('active'); //Set clicked link class to active
var currentTab = $(this).attr('href'); // Set variable currentTab to value of href attribute of clicked link

$('#tabsL div:visible').fadeOut("slow",function(){ //fade out visible div
$(currentTab).fadeIn("slow") //fade in target div
});

return false;
});

// SEATING

$('#tabsS div').hide(); // Hide all divs
$('#tabsS div:first').show(); // Show the first div
$('#tabsS ul li:first').addClass('active'); // Set the class of the first link to active
$('#tabsS ul li a').click(function(){ //When any link is clicked
$('#tabsS ul li').removeClass('active'); // Remove active class from all links
$(this).parent().addClass('active'); //Set clicked link class to active
var currentTab = $(this).attr('href'); // Set variable currentTab to value of href attribute of clicked link

$('#tabsS div:visible').fadeOut("slow",function(){ //fade out visible div
$(currentTab).fadeIn("slow") //fade in target div
});

return false;
});

// ACCESSORIES

$('#tabsA div').hide(); // Hide all divs
$('#tabsA div:first').show(); // Show the first div
$('#tabsA ul li:first').addClass('active'); // Set the class of the first link to active
$('#tabsA ul li a').click(function(){ //When any link is clicked
$('#tabsA ul li').removeClass('active'); // Remove active class from all links
$(this).parent().addClass('active'); //Set clicked link class to active
var currentTab = $(this).attr('href'); // Set variable currentTab to value of href attribute of clicked link

$('#tabsA div:visible').fadeOut("slow",function(){ //fade out visible div
$(currentTab).fadeIn("slow") //fade in target div
});

return false;
});


});
