var flashvars = {};
var params = {};
    params.menu = "false";
    params.quality = "high";
    params.allowscriptaccess = "sameDomain";
    params.wmode = "transparent";    
var attributes = {};
    attributes.align = "middle";


swfobject.embedSWF("opera.swf", "opera", "70px", "20px", "8.0.0", false, flashvars, params, attributes);
swfobject.embedSWF("operaen.swf", "operaen", "70px", "20px", "8.0.0", false, flashvars, params, attributes);

var bottom=''+
	'<div class="sac">Design by <a href="http://www.sacsoluciones.com.ar" target="_blank">SAC Solutions</a></div> &copy; 2011<br />'+
	'Ciudad Autónoma de Buenos Aires <br />'+
	'Tel: (54 11) 4717-3444 info@cisitalia.com<br />';


$(document).ready(function(){
	
	$("#top").append("<div id='bannerg'></div>");
	$("#bannerg").animate({opacity:1},1000);
	
	$("#menu>ul li:last a").hover(function(){
		if(!$(this).parent().is(".active"))
		location.href=$(this).attr("href");
	});
	$("#bottom").html(bottom);
	$("#fplayer").click(function(){
		location.href="http://get.adobe.com/es/flashplayer/";
	});
	$("#menu li a").before("<span class='bullet'></span>");
	$("#menu li").not(".active").hover(function(){
		$(this).children(".bullet").fadeTo("normal",1);
	},function(){
		$(this).children(".bullet").fadeTo("normal",0);
	}
	);
	$(".button").hover(function(){
		$(this).stop().animate({marginTop:"5px"},100);
	},function(){
		$(this).stop().animate({marginTop:"0px"},100);
	}
	);
	
	
	var url=$(".language .default").attr("id")==null?"es":$(".language .default").attr("id")
	$(".language a").hover(function(){
		$(".language .flag").stop().html("<img src='img/"+$(this).attr("id")+".png' />").hide().fadeTo("slow",1);
	},function(){
		$(".language .flag").stop().hide().html("<img src='img/"+url+".png' />").fadeTo("slow",1);
	}
	);
	$(".language .flag").html("<img src='img/"+url+".png' />");
	
	$(".ltab a").click(function(){
		$(".ltab a").removeClass("current");
		$(this).addClass("current");
		$(".contenedor > div").hide();
		$(".contenedor ."+$(this).attr("id")).fadeIn("fast");
		return false;
	});
	$(".products").delegate("img","mouseover mouseout",function(event){
		if (event.type == 'mouseover') { 
			$(this).stop().animate({'opacity':'0.6'},200);
		}else{
			$(this).stop().animate({'opacity':'1'},200);
		}
	});
	
	
	
	
});
setInterval("animar()",300);
var flag=0;
function animar(){
	if(flag==0){
		$("a.light").fadeTo(100,1);
		flag=1;
	}
	else{
		$("a.light").fadeTo(100,0.2);
		flag=0;
	}
}
function play(){
	parent.fopera.location.href="opera.html";
}
function stop(){
	parent.fopera.location.href="stop.html";
}

