var MIN_HEIGHT = 660;
var MIN_WIDTH = 1350;
var COLGATE_HEADFOOT = 120;
var currentFooter="";
var expURL="";


var j = jQuery.noConflict();

j(document).ready(function() {
	
	expURL = window.location.href;
	
	
	/*j(window).resize(function() {
		if(j(window).height() > MIN_HEIGHT + COLGATE_HEADFOOT){
			j("#flashcontent").css("height", j(window).height() - COLGATE_HEADFOOT);
            //j("html").css("overflow","hidden");
		}else{
			j("#flashcontent").css("height", MIN_HEIGHT);
            j("html").css("overflow","scroll");
		}
	});*/
	

	swfobject.embedSWF("/Palmolive/BR/HomePage/swf/main.swf", "flashcontent", "100%", "660", "9.0.124", "expressInstall.swf", flashvars, params, attributes);
	//resizeWindow();
	
	showFooter(currentFooter);
});

function resizeWindow(){
	//Execute resize first time.
	j(window).resize();
}

function updateWindowHeight(value){
    //MIN_HEIGHT = value;
    //resizeWindow();
}

function showFooter(option){
	
	hideFooter(currentFooter);
	
	switch(option){
		case "home":
			j("#footerHome").fadeIn("slow");
		break;
		case "hair":
			j("#footerHair").fadeIn("slow");
		break;
		case "body":
			j("#footerBody").fadeIn("slow");
		break;
		case "honey_home":
			j("#asteriscos").fadeIn("slow");
		break;
		case "honey_hair":
			j("#HairHoney #asteriscos_hair").fadeIn("slow");
			j("#contHaircare").fadeIn("slow");
		break;
		case "honey_body":
			j("#BodyHoney #asteriscos_body").fadeIn("slow");
			j("#contBodycare").fadeIn("slow");
		break;						
		default:
			hideFooter("");
		break;					
	}
	
	j('html, body').animate({scrollTop:0}, 'slow');
	resizeWindow();
	
}

function hideFooter(option){
	switch(option){
		case "home":
			j("#footerHome").fadeOut("slow");
		break;
		case "hair":
			j("#footerHair").fadeOut("slow");
		break;
		case "body":
			j("#footerBody").fadeOut("slow");
		break;
		case "honey_home":
			j("#asteriscos").fadeOut("slow");
		break;
		case "honey_hair":
			j("#contHaircare").fadeOut("slow");
		break;
		case "honey_body":
			j("#contBodycare").fadeOut("slow");
		break;			
		default:
			j("#footerHome").fadeOut("slow");
			j("#footerHair").fadeOut("slow");
			j("#footerBody").fadeOut("slow");
			j("#asteriscos").fadeOut("slow");
			j("#contHaircare").fadeOut("slow");
			j("#contBodycare").fadeOut("slow");
			j("#BodyHoney #asteriscos_body").fadeOut("slow");
			j("#HairHoney #asteriscos_hair").fadeOut("slow");
		break;
	}						
	resizeWindow();
}
	
function changeExpColor(color){
	j("#flashcontent").css("background-color", color);
}

function getExpValue(){
	return expURL;
}	

