// JavaScript Document
$(function() {
    // start slideshow
    $('#slideshow').cycle({
        fx:      'fade',
        timeout:  3000,
        before:   onBefore
    });
 
    // set totalSlideCount var;
    // we'll be adding slides beach3.jpg - beach8.jpg to the slideshow
    var totalSlideCount = 8;
    
    function onBefore(curr, next, opts) {
        // on the first pass, addSlide is undefined (plugin hasn't yet created the fn);
        // when we're finshed adding slides we'll null it out again
        if (!opts.addSlide)
            return;
 
        // on Before arguments:
        //  curr == DOM element for the slide that is currently being displayed
        //  next == DOM element for the slide that is about to be displayed
        //  opts == slideshow options
            
        var currentImageNum = parseInt(next.src.match(/slide(\d)/)[1]);
            
        if (currentImageNum == totalSlideCount) {
            // final slide in our slide slideshow is about to be displayed
            // so there are no more to fetch
            opts.addSlide = null;
            return;
        }
        
        // add our next slide
        opts.addSlide('<img src="imagens/destaques/slide'+(currentImageNum+1)+'.jpg" width="429" height="274" />');
    };
});
$(function() {
	$('a.lightbox').lightBox(); // Select all links with lightbox class
// This, or...
	
});

$(document).ready(function() {
	//Assign default value to form field #1
	$("#user").DefaultValue("E-mail");
	$("#pass").DefaultValue("Senha");
	$("#login").DefaultValue("Usuário");
	$("#senha").DefaultValue("Senha");
});

$(document).ready(function(){ 
	$(document).pngFix(); 
}); 


