// Preload Images
jQuery.preloadImages = function()
{
  for(var i = 0; i<arguments.length; i++)
  {
	jQuery("<img>").attr("src", arguments[i]);
  }
}
//$.preloadImages("http://nina-images.solestruck.com/newimages/shop_banner.jpg");

// JavaScript Document

function clearDefault(el) {
  if (el.defaultValue==el.value) el.value = ""
}

// JavaScript Document
 	$(document).ready(function(){

// Sub Nav Active
			
	 $(function(){
	   var path = location.pathname.substring(1);
	   if ( path )
		 $('#subNav a[@href$="' + path + '"]').attr('class', 'subActive');
	 });
	 
// 	Shop Landing Page

	$('#bannerWrapper').hide();
	$('#bannerWrapper').fadeIn();
	$('.shoecolorname').hide();


	$("#hot").hover(function(){ 
		$("div#hot_feature").siblings('div:visible').hide();
		$("#hot_breadcrumb").siblings().hide();
		$("div#hot_feature").fadeIn("normal"); 		
		$("#hot_breadcrumb").fadeIn("normal"); 
	}, function(){
	});
	
	$("#special").hover(function(){ 
		$("div#special_feature").siblings('div:visible').hide();
		$("#special_breadcrumb").siblings().hide();
		$("div#special_feature").fadeIn("normal"); 		
		$("#special_breadcrumb").fadeIn("normal"); 
	}, function(){
	});
	
	$("#sexy").hover(function(){ 
		$("div#sexy_feature").siblings('div:visible').hide();
		$("#sexy_breadcrumb").siblings().hide();
		$("div#sexy_feature").fadeIn("normal"); 		
		$("#sexy_breadcrumb").fadeIn("normal"); 
	}, function(){
	});
	
	$("#boots").hover(function(){ 
		$("div#boots_feature").siblings('div:visible').hide();
		$("#boots_breadcrumb").siblings().hide();
		$("div#boots_feature").fadeIn("normal"); 		
		$("#boots_breadcrumb").fadeIn("normal"); 
	}, function(){
	});
	
	$("#dolls").hover(function(){ 
		$("div#dolls_feature").siblings('div:visible').hide();
		$("#dolls_breadcrumb").siblings().hide();
		$("div#dolls_feature").fadeIn("normal"); 		
		$("#dolls_breadcrumb").fadeIn("normal"); 
	}, function(){
	});
	
	$("#dyeable").hover(function(){ 
		$("div#dyeable_feature").siblings('div:visible').hide();
		$("#dyeable_breadcrumb").siblings().hide();
		$("div#dyeable_feature").fadeIn("normal"); 		
		$("#dyeable_breadcrumb").fadeIn("normal"); 
	}, function(){
	});
		
	$("#handbags").hover(function(){ 
		$("div#handbags_feature").siblings('div:visible').hide();
		$("#handbags_breadcrumb").siblings().hide();
		$("div#handbags_feature").fadeIn("normal"); 		
		$("#handbags_breadcrumb").fadeIn("normal"); 
	}, function(){
	});
	
	
	 $(".productThumb> a").hover(function () {
$(this).next().css({ "text-decoration":"underline" });
}, function(){
$(this).next().css({ "text-decoration":"none" });
return false
});
	
// As Seen In MouseOvers

	$('div.popupWrapper').hover(function() {
		$(this).children('.shoeBubble').fadeIn('fast');
		return false
		}, function(){
		$(this).children('.shoeBubble').fadeOut('fast');
	});

//Product Angle Gallery MouseOvers

	$('#views').addClass('active');
	$('#colorWrapper').hide();
	$('#black').hide();
	$('#silver').hide();
	$('div.productGallery> div').hide();
	$('#gold').fadeIn();
	$('#gold> .defaultAngle').fadeIn();

	$('div.productGallery> a').hover(function() {
		$(this).siblings('div:visible').hide();
		$(this).next().fadeIn();
		return false
		}, function(){
	});
	
	$('div.colorGallery> a').hover(function() {
		$(this).siblings('div:visible').hide();
		$(this).next().fadeIn('fast');
		return false
		}, function(){
	});
	
	$('div.zoomGallery> div').hide();
	$('div.zoomGallery> .defaultAngle').fadeIn();
	$('div.zoomGallery> a').hover(function() {
		$(this).siblings('div:visible').hide();
		$(this).next().fadeIn('fast');
		return false
		}, function(){
	});

	
//Product Gallery Views Nav
	
	$("#views").click(function(){ 
		$('#colorWrapper').hide();
		$('.shoecolorname').hide();
		$('.shoename').show();
		$('#galleryWrapper').fadeIn();
		$('#colors').removeClass('active');
		$(this).addClass('active');
		return false
	}, function(){
	});

//Product Gallery Colors Nav		
/*		
	$("#colors").click(function(){
	
		$('#galleryWrapper').hide();
		$('.shoename').hide();
		$('.shoecolorname').show();
		$('#colorWrapper').fadeIn();
		$('.colorGallery> div').hide();		
		$('.colorGallery> div:first').fadeIn();
		$('#views').removeClass('active');
		$(this).addClass('active');
		return false
	}, function(){
	});
	
	*/
$("#colors").click(function(){

$('#galleryWrapper').hide();
$('.shoename').hide();
$('.shoecolorname').show();
$('#colorWrapper').fadeIn();
$('.colorGallery').fadeIn();
$('.colorGallery> div').hide();
$('.colorGallery> div:first').fadeIn();
$('#views').removeClass('active');
$(this).addClass('active');
return false
}, function(){
});
	
	
	
	
	
// Controlling Color Picker
	$(".colorGallery> a").click(function(){	
		$('#colors').removeClass('active');
		$('#views').addClass('active');
	}, function(){
	});
	
	$(".colorGallery> a").click(function(){		
		$('#colorWrapper').hide();
		$('.shoecolorname').hide();
		$('.shoename').show();
		$('#galleryWrapper').fadeIn();
		$('#gold').fadeIn();
	}, function(){
	});
	
	
	$('#goldThumb').click(function() {
		$('#colorWrapper').hide();
		$('#galleryWrapper').fadeIn();
		$('#gold').fadeIn();
		$('#black').hide();
		$('#silver').hide();
	});
	
	function changegallery() {
		$('#colorWrapper').hide();
		$('#galleryWrapper').fadeIn();
		$('#gold').fadeIn();
		
	}
	
	$('#goldThumb').click(function() {
		$('#colorWrapper').hide();
		$('#galleryWrapper').fadeIn();
		$('#gold').fadeIn();
		$('#black').hide();
		$('#silver').hide();
	});
	$('#blackThumb').click(function() {
		$('#colorWrapper').hide();
		$('#galleryWrapper').fadeIn();
		$('#black').fadeIn();
		$('#gold').hide();
		$('#silver').hide();
	});
	$('#silverThumb').click(function() {
		$('#colorWrapper').hide();
		$('#galleryWrapper').fadeIn();
		$('#silver').fadeIn();
		$('#gold').hide();
		$('#black').hide();
	});	

// About Page Slider

	$("div#slider1").slideView()

});



	
