/* TIRA A BORDA DOS FLASHS
Copyright 2006 Adobe Systems, Inc. All rights reserved.
Versão compacta, alterada por Renato Herculano
	- src, width e height são obrigatórios
	- os demais parametros são opcionais
*/
function flash(src, width, height, id, flashVars, wmode, menu, scale){
	var ret = GetArgumentos(src, width, height, id, flashVars, wmode, menu, scale);
	var str = '<object ';
	for (var i in ret.objAttrs)
		str += i + '="' + ret.objAttrs[i] + '" ';
		str += '>';
	for (var i in ret.params)
		str += '<param name="' + i + '" value="' + ret.params[i] + '" /> ';
		str += '</object>';
	document.write(str);
}


function GetArgumentos(src, w, h, id, flashVars, wmode, menu, scale){
	var ret = new Object();
	ret.params = new Object();
	ret.objAttrs = new Object();

	ret.objAttrs['data'] = ret.params["movie"] = src;
	ret.objAttrs['width'] = w;
	ret.objAttrs['height'] = h;
	ret.params['quality'] = 'high';
	ret.objAttrs['type'] = 'application/x-shockwave-flash';
	ret.params['menu'] = 'false';
	
	if(id) ret.objAttrs['id'] = id;
	
	if(flashVars) ret.params['flashVars'] = flashVars;
	
	ret.params['wmode'] = (wmode)? wmode : 'transparent';
	ret.params['scale'] = (scale)? scale : 'exactfit';
	ret.params['menu'] = (menu)? menu : 'false';
	
	return ret;
}

$(function(){
	pastas = location.pathname.split("/")[1];
	var indice = 0;
	var menu = $("#menuNegocios li img");
	var marcado = false;
	var imgOver;
	/*$(menu).each(function(){
		this.urlNormal = $(this).attr("src");
		this.urlOver = this.urlNormal.substring(0, this.urlNormal.lastIndexOf("."))+ "_over.gif";
		this.indice = indice++;
		this.titulo = $(this).attr("src");
	});*/

	for(var i = 0; i < menu.length; i++){
		
		if(pastas == $(menu[i]).attr("name"))
			$(menu[i]).attr("src", $(menu[i]).attr('src').substring(0,$(menu[i]).attr('src').lastIndexOf('.')) + '_over.gif'); 
	}
	
	/*$(menu).hover(
		function(){
			if($(menu[this.indice]).attr("name") != pastas)
				$(menu[this.indice]).attr("src", this.urlOver);
	},
		function(){
			if($(menu[this.indice]).attr("name") != pastas)
				$(menu[this.indice]).attr("src", this.urlNormal);
		}	
	);*/
})	