/* this snippet of code determines:
	a. which gender/age group the page is on
	b. whether or not we are looking at a filter page

if the following conditions are met, then a banner based on the gender/age will be injected into the DOM */

jQuery(document).ready(function() {

 /*breadcrumbs title tell what gender/age section we're in*/
 var sitesection = jQuery("div#breadcrumbs-box div span").eq(2).text();
 /*console.log(sitesection);*/
 
 /* Banner copy */
 var infantGirls = '<div class="section-banner" id="sb-infant-girls"><div class="section-banner-inner"><h3>INFANT GIRLS</h3><p>Keep your special one warm with jackets, wool dress coats, snowsuits and more from our infant girls outerwear collection.</p></div></div>';
 var toddlerGirls = '<div class="section-banner" id="sb-toddler-girls"><div class="section-banner-inner"><h3>TODDLER GIRLS</h3><p>Protect your little girl from the cold with our outerwear collection of fashionable and functional jackets, coats, snow pants &amp; bibs and more for toddler girls.</p></div></div>';
 var kidGirls = '<div class="section-banner" id="sb-girls"><div class="section-banner-inner"><h3>GIRLS</h3><p>Your little one will be ready for the brisk and chilly fall weather with our new outerwear collection, featuring fashionable girls jackets, coats, wool dress coats and more.</p></div></div>';
 var infantBoys = '<div class="section-banner" id="sb-infant-boys"><div class="section-banner-inner"><h3>INFANT BOYS</h3><p>Take your little guy outside in the cool or cold with one of our durable and warm jackets or snowsuits for infant boys.</p></div></div>';
 var toddlerBoys = '<div class="section-banner" id="sb-toddler-boys"><div class="section-banner-inner"><h3>TODDLER BOYS</h3><p>Your little guy will be ready to explore the outdoors and brave the elements with durable jackets, snowsuits, and snow pants &amp; bibs from our outerwear collection for toddler boys.</p></div></div>';
 var kidBoys = '<div class="section-banner" id="sb-boys"><div class="section-banner-inner"><h3>BOYS</h3><p>Get your big guy ready for the outdoors with our outerwear collection of durable and comfortable jackets, snowsuits, and snow pants &amp; bibs for boys.</p></div></div>';
 
 
if (jQuery(".selectedFilter").length) /*there will be an element with a selectedFilter class once we're in a filtered page*/
{
	switch(sitesection)
	{
		case 'Infant Girls':
			/* prepend HTML to the right column */
			jQuery("#right-column").prepend(infantGirls);
			break;
		
		case 'Toddler Girls':
			jQuery("#right-column").prepend(toddlerGirls);
			break;

		case 'Girls':
			jQuery("#right-column").prepend(kidGirls);
			break;

		case 'Infant Boys':
			jQuery("#right-column").prepend(infantBoys);
			break;

		case 'Toddler Boys':
			jQuery("#right-column").prepend(toddlerBoys);
			break;

		case 'Boys':
			jQuery("#right-column").prepend(kidBoys);
			break;

		default:
			/*console.log("section not found");*/
			break;
	}
}
		
		/* keep black arrow on when hovering subnav */
		
		jQuery("#mainmenu ul li ul").hover(function(){
				jQuery(this).siblings('a').css('background','url(/images/fall11/nav-arrow.gif) no-repeat center 40px');
		}, function(){
				jQuery(this).siblings('a').css('background','');
		});
		
		
		/* add footer background after rendered page */
		
		//jQuery("body#bodyBG").css("background","url(/images/fall11/fall-bg.gif) repeat-x bottom");


});
