// JavaScript Document
/*
$(function(){
	$('#case ul li a').hover(
		function(){
			$(this).fadeTo(300, 1.0);
		},
		function(){
			$(this).fadeTo(300, 1.0);
		}
	);
});

$(function() {
	$('#thumbnail li').click(function() {
		var index = $('#thumbnail li').index(this);
		$('#expansion li').css('display','none');
		$('#expansion li').eq(index).fadeIn('slow');
		$('#thumbnail li').removeClass('select');
		$(this).addClass('select')
	});
});
*/


$(function() {
	slider = $('#expansion').bxSlider({
		auto: true,
		pagerCustom: '#thumbnail',
/*
    onSlideAfter:function($slideElement, oldIndex, newIndex){
console.log($slideElement, oldIndex, newIndex);
	}
*/
	});
         $('#thumbnail').on('click',function(e){
var current = slider.getCurrentSlide();
console.log(current);
console.log(e);
slider.stopAuto();
         });

     var selectVal = $('.use-parent option:selected').val();
	//console.log(selectVal);
	if(selectVal == 'interior'){
		$('.interior').appendTo('.select');
	}else if(selectVal == 'exterior'){
		$('.exterior').appendTo('.select');
	}

$('.use-parent').click( function(){
     var selectVal = $(this).val();
	if(selectVal == 'interior'){
		$('.exterior').appendTo('#choices');
		$('.interior').appendTo('.select');
	}else if(selectVal == 'exterior'){
		$('.interior').appendTo('#choices');
		$('.exterior').appendTo('.select');
	}else{
		$('.interior').appendTo('#choices');
		$('.exterior').appendTo('#choices');
	}
//console.log(selectVal);
});



});



