// JavaScript Document
$(document).ready(function(){
	$('h1').flash(
        { 
            src: 'swf/context_reprise.swf', 
            flashvars: { 
                css: [
                    '* { color:#EB3D00; }',
                ].join(' ')
            },
			wmode: "transparent"
        },
		
        { version: 7 },
        function(htmlOptions) {
            htmlOptions.flashvars.txt = this.innerHTML;
            this.innerHTML = '<div>'+this.innerHTML+'</div>';
            var $alt = $(this.firstChild);
            htmlOptions.height = 37;
            htmlOptions.width = 400;
            $alt.addClass('alt');
            $(this)
                .prepend($.fn.flash.transform(htmlOptions));						
        }
    );
	
	$('h2').flash(
        { 
            src: 'swf/context_reprise.swf', 
            flashvars: { 
                css: [
                    '* { color:#EB3D00; }',
                ].join(' ')
            },
			wmode: "transparent"
        },
		
        { version: 7 },
        function(htmlOptions) {
            htmlOptions.flashvars.txt = this.innerHTML;
            this.innerHTML = '<div>'+this.innerHTML+'</div>';
            var $alt = $(this.firstChild);
            htmlOptions.height = 30;
            htmlOptions.width = 600;
            $alt.addClass('alt');
            $(this)
                .prepend($.fn.flash.transform(htmlOptions));						
        }
    );
	
	$('h3').flash(
        { 
            src: 'swf/context_reprise.swf', 
            flashvars: { 
                css: [
                    '* { color:#EB3D00; }',
                ].join(' ')
            },
			wmode: "transparent"
        },
		
        { version: 7 },
        function(htmlOptions) {
            htmlOptions.flashvars.txt = this.innerHTML;
            this.innerHTML = '<div>'+this.innerHTML+'</div>';
            var $alt = $(this.firstChild);
            htmlOptions.height = 30;
            htmlOptions.width = 600;
            $alt.addClass('alt');
            $(this)
                .prepend($.fn.flash.transform(htmlOptions));						
        }
    );
	
	$('h4').flash(
        { 
            src: 'swf/context_reprise.swf', 
            flashvars: { 
                css: [
                    '* { color:#EB3D00; text-align:center; }',
                ].join(' ')
            },
			wmode: "transparent"
        },
		
        { version: 7 },
        function(htmlOptions) {
            htmlOptions.flashvars.txt = this.innerHTML;
            this.innerHTML = '<div>'+this.innerHTML+'</div>';
            var $alt = $(this.firstChild);
            htmlOptions.height = 30;
            htmlOptions.width = 950;
            $alt.addClass('alt');
            $(this)
                .prepend($.fn.flash.transform(htmlOptions));						
        }
    );
	
});

// Destaques Home
$(function(){		   
	$("#cycleExclusivosCondo .jCarouselLite").jCarouselLite({
		btnNext: "#cycleExclusivosCondo .next",
		btnPrev: "#cycleExclusivosCondo .prev",
		//auto: 3500,
		speed: 800,
		visible: 4,
		pause: 1
	});
	
	$("#cycleExclusivosCasas .jCarouselLite").jCarouselLite({
		btnNext: "#cycleExclusivosCasas .next",
		btnPrev: "#cycleExclusivosCasas .prev",
		//auto: 3500,
		speed: 800,
		visible: 4,
		pause: 1
	});
	
	$("#cycleExclusivosAp .jCarouselLite").jCarouselLite({
		btnNext: "#cycleExclusivosAp .next",
		btnPrev: "#cycleExclusivosAp .prev",
		//auto: 3500,
		speed: 800,
		visible: 4,
		pause: 1
	});
	
	$("#cycleLancamentos .jCarouselLite").jCarouselLite({
		//btnNext: "#cycleExclusivosAP .next",
		//btnPrev: "#cycleExclusivosAP .prev",
		auto: 5500,
		speed: 800,
		visible: 4,
		pause: 1
	});
});

$(document).ready(function(){
	$("#cycleLancamentos a").fadeTo("slow", 1.5); // This sets the opacity of the thumbs to fade down to 30% when the page loads
	$("#cycleLancamentos a").hover(function(){
		$(this).fadeTo("slow", 0.0); // This should set the opacity to 100% on hover
	},function(){
		$(this).fadeTo("slow", 1.5); // This should set the opacity back to 30% on mouseout
	});
});


