function flash(flash, w, h, label){
if (AC_FL_RunContent == 0) {
	alert("This page requires AC_RunActiveContent.js. In Flash, run \"Apply Active Content Update\" in the Commands menu to copy AC_RunActiveContent.js to the HTML output folder.");
	} else {
		AC_FL_RunContent(
		'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0',
		'width', w,
		'height', h,
		'src', 'flash/'+flash,
		'quality', 'high',
		'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
		'align', 'middle',
		'play', 'true',
		'loop', 'true',
		'scale', 'showall',
		'wmode', 'transparent',
		'devicefont', 'false',
		'id', flash,
		'name', flash,
		'menu', 'true',
		'allowScriptAccess','sameDomain',
		'movie', 'flash/'+flash,
		'salign', 't',
		'flashvars' ,'sessao_atual='+label+'&url=http://webcompany.serveftp.com/contech/web/flash/'
		); 
	}
}

/*-----------[ MENU TOPO ]---------------------*/

$(document).ready(function(){
	
	$(".header span.bt-idiomas").hover(
        function () {
			$(this).find('.sub-idiomas').show();
			$(this).addClass('active');
        },
        function () {
			$(this).find('.sub-idiomas').hide();
			$(this).removeClass('active');
    });
	
	$(".header li.bt-contech").hover(
        function () {
			$(this).find('.sub').show();
			$(this).addClass('active');
        },
        function () {
			$(this).find('.sub').hide();
			$(this).removeClass('active');
    });
		
	setInterval(function(){
		if(jQuery('body.home .box-home').last().is('.box-active') == true)
		{
			jQuery('.box-home').last().hide().removeClass('box-active');
			jQuery('.box-home').first().fadeIn(1500).addClass('box-active');
		}else{
		
			jQuery('.box-home').first().hide().removeClass('box-active');
			jQuery('.box-home').last().fadeIn(1500).addClass('box-active');
			
		}
		//jQuery('.box-active').fadeIn();
	}, 9000);
	
	setInterval(function(){
		if(jQuery('body.home .bg-home').last().is('.bg-home-active') == true)
		{
			jQuery('.bg-home').last().hide().removeClass('bg-home-active');
			jQuery('.bg-home').first().fadeIn(1500).addClass('bg-home-active');
		}else{
		
			jQuery('.bg-home').first().hide().removeClass('bg-home-active');
			jQuery('.bg-home').last().fadeIn(1500).addClass('bg-home-active');
			
		}
		//jQuery('.box-active').fadeIn();
	}, 9000); 
	
	
	
	$(".header .sub li a").last().css('borderBottom','none');
									
/*-----------[ MENU ACCORDION solucoes ]---------------------*/
	$('#menu ul').slideUp('slow');
	$('#menu h3, #menu h4').click(function(){
		$(this).next().slideToggle('slow').siblings('ul:visible').slideUp('slow');
		$(this).toggleClass('corrente').siblings('#menu h3, #menu h4').removeClass('corrente');
	});
	
/*-----------[ LIGHTBOX ]---------------------*/
 	$(function() {$('#gallery a').lightBox();});
 
/*-----------[ LIGHTBOX - HTML]---------------------*/ 
	$("a[rel^='prettyPhoto']").prettyPhoto();

/*-----------[ BOX EMBREVE]---------------------*/ 
	$('a#openEmbreve').click(function(){
		$('#embreve').slideDown('fast');
	});
	$('a#openEmbreve').mouseout(function(){
		$('#embreve').slideUp('fast');
	});
	$('a#openIdiomas').click(function(){
		$('#idiomas').slideDown('fast');
	});	
	$('a#openIdiomas').mouseout(function(){
		$('#idiomas').slideUp('fast');
	});


	$("#box-1,#box-2,#box-3,#box-4").hide();
	$("#box-1").show();			
	var index = 1;
	
	$("input.btnProximo").click(function(){	
		index++;
		if(index <= 4){	
			$("#box-1,#box-2,#box-3,#box-4").hide();	
			$("#box-"+index).show();							 
		}								
	});
	
	$("input.btnVoltar").click(function(){	
		index--;
		if(index >= 1){	
			$("#box-1,#box-2,#box-3,#box-4").hide();	
			$("#box-"+index).show();							 
		}	
	});
			
});
