jQuery(document).ready(function($) {
	
	$('#SideCategoryList').bcNav();
	$('#SideCategoryList h2').html('Shop <span class="White">Categories</span>');
	
	// remove items from layout // unused and undesired divs and panels in current theme
	// end
	
	// remove last list item to change a 5 product list to 4
		$('body.Product #SideProductRelated .ProductList li:nth-child(3)').hide('');
		$('body.Product #SideProductRelated .ProductList li:nth-child(4)').hide('');
		$('body.Product #SideProductRelated .ProductList li:nth-child(5)').hide('');
		
		$('body.Product #SideNewProducts .ProductList li:nth-child(2)').hide('');
		$('body.Product #SideNewProducts .ProductList li:nth-child(3)').hide('');
	
		$('#SideNewProducts .ProductList li:nth-child(4)').hide('');
		$('#SideNewProducts .ProductList li:nth-child(5)').hide('');
	// end
		
		var loc_href = window.location.pathname;
    		$('#Menu a').each(function () {
    		if (loc_href == $(this).attr('href')) {
        		$(this).addClass('activePageLink');
    		}
    		});
			
        var parts = window.location.pathname.split('/');
        if( parts && parts.length > 1) {
            basename = parts.join(" ");
            basename = basename.replace((/(%)|(.html)|(.php)|[(\d)]|(-)/g), "");
        }
        $("body").addClass(basename);
		
		$('body.InfantGirl #CategoryHeading h2').addClass("Infant");
		$('body.ToddlerGirl #CategoryHeading h2').addClass("Toddler");
		$('body.KidGirl #CategoryHeading h2').addClass("Kid");
		
		$('body.infantgirl #CategoryHeading h2').addClass("Infant");
		$('body.toddlergirl #CategoryHeading h2').addClass("Toddler");
		$('body.kidgirl #CategoryHeading h2').addClass("Kid");
	
		$('body.KidGirl #Menu li.Kid a').addClass('activePageLink');
		$('body.ToddlerGirl #Menu li.Toddler a').addClass('activePageLink');
		$('body.InfantGirl #Menu li.Infant a').addClass('activePageLink');
		
		$('body.kidgirl #Menu li.Kid a').addClass('activePageLink');
		$('body.toddlergirl #Menu li.Toddler a').addClass('activePageLink');
		$('body.infantgirl #Menu li.Infant a').addClass('activePageLink');
	
// CUSTOM AND OPTIONAL SCRIPTS // Enable only if needed
	
	// homepage slideshow // image/content cycler
	/*
		$('#HomeSlideshow').cycle({
			timeout:6000,
			fx:'fade' 
		});
	*/
	// end
	
	// Add Cladd to Each Menu Item for Individual Styling // image/content cycler
	/*
	$(document).ready(function () {
    $('#Menu > ul > li').each(function() {
        $(this).addClass(function() {
          return "nav-" + $(this).index();
        });
    });
	});
	*/
	// end
	
	// Hide first and last element in Product Breadcrumb //
	/*
	$(document).ready(function () {
		$('#ProductBreadcrumb ul li:first-child').hide();
    	$('#ProductBreadcrumb ul li:last-child').hide();
	});
	*/
	// end
	
	// BX slider // product slider
	/*	
		$('#HomeFeaturedSlider').bxSlider({
		displaySlideQty: 4,
		moveSlideQty: 4             
        });
	*/
		
	/*	$('#HomeNewSlider').bxSlider({
		displaySlideQty: 4,
		moveSlideQty: 4             
        });
	*/
	// end
	
	// paRSS plugin
	$("#rss").PaRSS(
		"http://www.preciousfeetboutique.com/rss.php?action=newblogs&type=rss",	// rss feed url (required)
		2,		// number of items (optional)
		"M jS g:i a",	// date format (optional)
		"image"         // display format (optional)
	);
	// end
	
});

