//var $j = jQuery.noConflict();

$(document).ready(function(){

	var sp = 200;

	$('li.page_item').mouseenter(function (){
		toggleQuickMenu(this)
	});
	$('.feature-btn').mouseenter(function (){
		toggleQuickMenu(this)
	});

	function toggleQuickMenu (target) {
		if ($(target).hasClass('page-item-23')) {
			$('.the-features').slideUp(sp);
			$('.shop').slideDown(sp);
			$('.active-feature-indicator').fadeOut();
		} else {
			$('.the-features').slideDown(sp);
			$('.shop').slideUp(sp);
			$('.active-feature-indicator').fadeIn();
		}
	}

	$('.feature-btn').click(function (){
	
		$('.feature').slideUp(sp);
		$('.feature-bg').fadeOut();


		$('.shop').slideUp(sp);
		$('.the-features').slideDown(sp);
	
		switch ($(this).attr('id')) {
			case "feature-btn-1" :
				$('.feature-1').slideDown(sp);
				$('#feature-bg-1').stop().fadeIn();
				break;
			case "feature-btn-2" :
				$('.feature-2').slideDown(sp);
				$('#feature-bg-2').stop().fadeIn();
				break;
			case "feature-btn-3" :
				$('.feature-3').slideDown(sp);
				$('#feature-bg-3').stop().fadeIn();
				break;
		}
		$('.feature-btn').removeClass('active-feature-button')
		$(this).addClass('active-feature-button')
		$('.active-feature-indicator').show().html($(this).html());
	});

	if($('#foxyshop_container').length > 0){
		$('li.page_item.page-item-23').addClass('current_page_item');
	}
	
	
	$('.foxyshop_quantity').change(function() {
		// var quantity = $('.foxyshop_quantity option:selected').text()
		// 		var price = $('.foxyshop_currentprice').text();
		// 		price = price.substring(1);
		//alert(quantity + " "+ price);
		//alert(quantity * price)
		//$('.foxyshop_price').text(quantity * price);
	});
	
	
});





















