$(document).ready(function() {
	//Set up tabs and subtabs
	$("#tabs").tabs();
	$("#subtabs").tabs();
	
	//Hide documentation file links
	$('.product_documents_file').hide();
	
	//Action upon clicking on document type
	$('.product_documents_type').click(function(e) {
		var docArray = $(this).nextUntil('.product_documents_type');
		if(docArray.length > 1) {
			e.preventDefault();
			docArray.toggle('blind', 500);
		}
	});
	
	/* Remnant from Network Services - Sliding specifications table for product families
	var tableLength = $('tr.hdg:first').find('td').length;
	var tableActive = 1;
	var modelNames = new Array;
	var modelInc = 0;

	//Collect Model Names from first table row
	$('tr.hdg:first').find('td').each(function() {
		modelNames[modelInc] = $(this).children('span').html();
		modelInc++;
	});
	
	function renewLinks() {
		if(tableActive >= tableLength-4) { 
			$('a#specs-next').hide(); 
		}
		else { 
			$('a#specs-next').show(); 
		}
		
		if(tableActive <= 1) { 
			$('a#specs-prev').hide(); 
		}
		else { 
			$('a#specs-prev').show(); 
		}
				
		if(tableActive + 7 >= tableLength) {
			$('a#specs-next').html(modelNames[tableLength-4] + ' - ' + modelNames[tableLength-1] + ' Specifications');
		}
		else {
			$('a#specs-next').html(modelNames[tableActive+4] + ' - ' + modelNames[tableActive+7] + ' Specifications');
		}
		
		if(tableActive - 4 <= 1) {
			$('a#specs-prev').html(modelNames[1] + ' - ' + modelNames[4] + ' Specifications');
		}
		else {
			$('a#specs-prev').html(modelNames[tableActive-4] + ' - ' + modelNames[tableActive-1] + ' Specifications');
		}
	}
			
	//Initialize - only show first 5 rows
	renewLinks();
	$('table#specs-table').find('tr').each(function() {
		$('td', this).slice(5).hide();
	});
			
	//Show next four models but stop if approaching end of list
	$('a#specs-next').click(function(e) {
		e.preventDefault;
		if(tableActive + 4 > tableLength - 4) { tableActive = tableLength - 4; }else { tableActive += 4; }
			
		$('table#specs-table').find('tr').each(function() {
			$('td', this).slice(1).hide();
			$('td', this).slice(tableActive, tableActive+4).show();
		});
		renewLinks();
	});
	
	//Show previous four models but stop if approaching beginning of list
	$('a#specs-prev').click(function(e) {
		e.preventDefault;
		if(tableActive - 4 < 1) { tableActive = 1; }else { tableActive -= 4; }
			
		$('table#specs-table').find('tr').each(
			function() {
				$('td', this).slice(1).hide();
				$('td', this).slice(tableActive, tableActive+4).show();
			});
		renewLinks();
	});
*/
});
