function windowShade(Id, expandedContent, slides){			
	var cssSectionId = "#" + Id;
	var linkClass = ".expand-" + Id;
	var expandedClass = cssSectionId + " .expanded";
	$(cssSectionId + " .thumbnails").click(function(){
	});
	var section;
	var thumbsShowing;
	var expanded;
	var containerHeight;
	$(linkClass).click(function(e){	
		if ( thumbsShowing ) {
			thumbsShowing.appendTo(cssSectionId);
			$(thumbsShowing).fadeIn(1000);
			$(expandedClass).slideUp(1000, function(){
				$(linkClass).text('Expand ' + Id);
				$(expandedClass).remove();
				thumbsShowing = null;
			});
		}else{
			//capture container height to prevent collapse when thumbs are removed
			containerHeight = $(cssSectionId).css('height');
			$(cssSectionId).css("min-height", containerHeight);
			$(cssSectionId + " .thumbnails").fadeOut(600, function(){
				thumbsShowing = $(cssSectionId + " .thumbnails").detach();
				//need to get the height of the enclosing div 
				//and apply it temporarily so the div doesn't collapse prior to adding the new content
				$(cssSectionId).append(expandedContent);						
				$(".thumbnails").css('min-height', containerHeight);
				$(linkClass).text('Collapse ' + Id);
				$(expandedClass).hide().slideDown(800);
				//enable slider plugin
				if (slides != null){
					for (var i = 0; i < slides.length; i++){
						startbxSlider(slides[i]);
					}
				}
			});
		}
	});
}

function startbxSlider(slides){
	$(slides).bxSlider({
	 	alignment: 'horizontal',        // 'horizontal', 'vertical' - direction in which slides will move
		controls: true,                 // determines if default 'next'/'prev' controls are displayed
		speed: 500,                     // amount of time slide transition lasts (in milliseconds)
		pager: true,                    // determines if a numeric pager is displayed (1 2 3 4...)
		pager_short: false,             // determines if a 'short' numeric pager is displayed (1/4)
		pager_short_separator: ' / ',   // text to be used to separate the short pager
		margin: 70,                      // if 'horizontal', applies a right margin to each slide, if 'vertical' a
			                             // bottom margin is applied. example: margin: 50
		next_text: 'next',              // text to be displayed for the 'next' control
		next_image: 'http://s89068.gridserver.com/wordpress/wp-content/themes/ransomredesign/js/arrowright.png',                 // image to be used for the 'next' control
		
		prev_text: 'previous',              // text to be displayed for the 'prev' control
		prev_image: 'http://s89068.gridserver.com/wordpress/wp-content/themes/ransomredesign/js/arrowleft.png',                 // image to be used for the 'prev' control
		auto: false,                    // determines if slides will move automatically
		wrapper_class: 'slides1_wrap'  // class name to be used for the outer wrapper of the slideshow
	});
}
