$(document).ready(function() {
	/// Hide extra info initially
	$('.specs_details').hide();
	$('.extra_features').hide();
	$('.amps_box').hide();
	
	/// Disable <a> tag from no-manual class
	$('.no_manual').hover(function() {
		$(this).parent().removeAttr('href');
		$(this).css('border', 'none');	// Remove hover behavior
	});	
	
	/// Show-Hide Specs of Woofers
	$('.prod_more').click(function(e) {
		e.preventDefault();
		var $features = $('.specs_details');
		if ($(this).text() == '+ more') {
			$features.hide();
			$('.prod_more').text('+ more');
			$(this).parent().parent().next().show();
			$(this).text('- hide');
		} else if ($(this).text() == '- hide') {
			$(this).parent().parent().next().hide();
			$(this).text('+ more');
		}
		var $obj = $(this).parent().parent().children();
		var offset = $obj.offset();
		var offsetTop = offset.top -25;
		$.scrollTo(offsetTop + 'px', 800, {easing: 'easeOutQuart'}); // Scroll to the picture (source - http://flesler.blogspot.com/2007/10/jqueryscrollto.html)
	});
	
	/// Show-Hide Specs of Components/Fullranges & Amps
	$('.more_features').click(function(e) {
		e.preventDefault();
		var $features = $('.extra_features');
		if ($(this).text() == '+ more') {
			$features.hide();
			$('.more_features').text('+ more');
			$(this).next().show();
			$(this).text('- hide');
		} else if ($(this).text() == '- hide') {
			$(this).next().hide();
			$(this).text('+ more');
		}
		var $obj = $(this).parent().parent().children();
		var offset = $obj.offset();
		var offsetTop = offset.top -25;
		$.scrollTo(offsetTop + 'px', 800, {easing: 'easeOutQuart'}); // Scroll to the picture (source - http://flesler.blogspot.com/2007/10/jqueryscrollto.html)
	});
	
	/// Lightbox
	//$('a.lightbox').lightBox();
	
	/// Fancybox
	$('a.fancybox').fancybox({
		'transitionIn': 'elastic',
		'transitionOut': 'elastic',
		'speedIn' : 400,
		'speedOut': 300
	});
	
	/// Gallery Hover
	$('.gallery').hover(function() {
		var pic = $(this).parent().attr('href');
		var strHtml = '<img src="' + pic + '" alt="" />';
		$('#gallery_box').html(strHtml);
	});

	/// Toggle Amps Section
	$('.toggle_amps').toggle(function() {
		$(this).next().next().show();
	}, function() {
		$(this).next().next().hide();
	});
	
	

	// /// Accordion effect on left navigation
	// 	$('#acc').accordion( {
	// 			event: 'click',
	// 	});
	// 	// Icon changer
	// 	$('.acc_header').click(function() {
	// 		$(this).siblings().find('span.acc_icon').removeClass('active');
	// 		$(this).find('span.acc_icon').addClass('active');
	// 		$(this).siblings('.acc_header').removeClass('active');
	// 		$(this).addClass('active');
	// 	});

});



			
			

