jQuery(document).ready(function($) {
		   $('#div_slide').jqFancyTransitions({ width: 892, height: 215, effect: 'curtain', delay: 9000, direction: 'fountainAlternate' }); 
		   // wave, zipper, curtain 
		   // direction: 'fountainAlternate', // left, right, alternate, random, fountain, fountainAlternate
		   /* mdata = new Date();
		   switch(mdata.getMonth()) {
				case 0 : mes = "01"; break;
				case 1 : mes = "02"; break;
				case 2 : mes = "03"; break;
				case 3 : mes = "04"; break;
				case 4 : mes = "05"; break;
				case 5 : mes = "06"; break;
				case 6 : mes = "07"; break;
				case 7 : mes = "08"; break;
				case 8 : mes = "09"; break;
				case 9 : mes = "10"; break;
				case 10 : mes = "11"; break;
				case 11 : mes = "12"; break;
			}
			$("#div_data").html(mdata.getDate()+"/"+mes+"/"+mdata.getFullYear()+". Bem vindo!"); */

			if($('div.content').length ){
			// 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.67;
				$('#thumbs ul.thumbs li').opacityrollover({
					mouseOutOpacity:   onMouseOutOpacity,
					mouseOverOpacity:  1.0,
					fadeSpeed:         'fast',
					exemptionSelector: '.selected'
				});
				
				// Initialize Advanced Galleriffic Gallery
				var gallery = $('#thumbs').galleriffic({
					delay:                     8000,
					numThumbs:                 18,
					preloadAhead:              10,
					enableTopPager:            true,
					enableBottomPager:         true,
					maxPagesToShow:            7,
					imageContainerSel:         '#slideshow',
					controlsContainerSel:      '#controls',
					captionContainerSel:       '#caption',
					loadingContainerSel:       '#loading',
					renderSSControls:          true,
					renderNavControls:         true,
					playLinkText:              'Iniciar Slideshow',
					pauseLinkText:             'Pausar Slideshow',
					prevLinkText:              '&lsaquo; Anterior',
					nextLinkText:              'Próximo &rsaquo;',
					nextPageLinkText:          'Próximo &rsaquo;',
					prevPageLinkText:          '&lsaquo; Anterior',
					enableHistory:             false,
					autoStart:                 false,
					syncTransitions:           true,
					defaultTransitionDuration: 1000,
					onSlideChange:             function(prevIndex, nextIndex) {
						// 'this' refers to the gallery, which is an extension of $('#thumbs')
						this.find('ul.thumbs').children()
							.eq(prevIndex).fadeTo('fast', onMouseOutOpacity).end()
							.eq(nextIndex).fadeTo('fast', 1.0);
					},
					onPageTransitionOut:       function(callback) {
						this.fadeTo('fast', 0.0, callback);
					},
					onPageTransitionIn:        function() {
						this.fadeTo('fast', 1.0);
					}
				});
			}
});
