// We only want these styles applied when javascript is enabled
			$('div.navigation').css({'width' : '300px', 'float' : 'left'});
			$('div.content').css('display', 'block');

			// Initially set opacity on thumbs and add
			// additional styling for hover effect on thumbs
			var onMouseOutOpacity = 0.3;
			$('#thumbs ul.thumbs li').css('opacity', onMouseOutOpacity)
				.hover(
					function () {
						$(this).not('.selected').fadeTo('fast', 1.0);
					}, 
					function () {
						$(this).not('.selected').fadeTo('fast', onMouseOutOpacity);
					}
				);

			$(document).ready(function() {
				// Initialize Advanced Galleriffic Gallery
				var galleryAdv = $('#gallery').galleriffic('#thumbs', {
					delay:                  3000,
					numThumbs:              12,
					preloadAhead:           10,
					enableTopPager:         true,
					enableBottomPager:      true,
					imageContainerSel:      '#slideshow',
					controlsContainerSel:   '#controls',
					captionContainerSel:    '#caption',
					loadingContainerSel:    '#loading',
					renderSSControls:       true,
					renderNavControls:      true,
					playLinkText:           'play slideshow',
					pauseLinkText:          'pause slideshow',
					prevLinkText:           '',
					nextLinkText:           '',
					nextPageLinkText:       '',
					prevPageLinkText:       '',
					enableHistory:          true,
					autoStart:              true,
					onChange:               function(prevIndex, nextIndex) {
						$('#thumbs ul.thumbs').children()
							.eq(prevIndex).fadeTo('slow', onMouseOutOpacity).end()
							.eq(nextIndex).fadeTo('slow', 1.0);
					},
					onTransitionOut:        function(callback) {
						$('#caption').fadeOut('slow');
						$('#slideshow').fadeOut('slow', callback);
					},
					onTransitionIn:         function() {
						$('#slideshow, #caption').fadeIn('slow');
					},
					onPageTransitionOut:    function(callback) {
						$('#thumbs ul.thumbs').fadeOut('slow', callback);
					},
					onPageTransitionIn:     function() {
						$('#thumbs ul.thumbs').fadeIn('slow');
					}
				});
			});