//tabs
$(function() {
	$('.slide_top, .slide_fot').tabs({ fxFade: true, fxSpeed: 'fast' });
});

//ie
function tratarError(){return true}window.onerror=tratarError;


//tooltip
$(document).ready(function(){	
	$("a").easyTooltip();
});

//idioma
        $(document).ready(function() {
            $(".dropdown img.flag").addClass("flagvisibility");

            $(".dropdown dt a").click(function() {
                $(".dropdown dd ul").toggle();
            });
                        
            $(".dropdown dd ul li a").click(function() {
                var text = $(this).html();
                $(".dropdown dt a span").html(text);
                $(".dropdown dd ul").hide();
                $("#result").html("Selected value is: " + getSelectedValue("sample"));
            });
                        
            function getSelectedValue(id) {
                return $("#" + id).find("dt a span.value").html();
            }

            $(document).bind('click', function(e) {
                var $clicked = $(e.target);
                if (! $clicked.parents().hasClass("dropdown"))
                    $(".dropdown dd ul").hide();
            });


            $("#flagSwitcher").click(function() {
                $(".dropdown img.flag").toggleClass("flagvisibility");
            });
        });
		
//lightbox
$(document).ready(function(){var a=$("#fancy_overlay").css("background-color")||"#2c2c2c";$("a.zoom").fancybox({padding:12,overlayOpacity:0.2,overlayColor:a,zoomSpeedIn:500,zoomSpeedOut:500,callbackOnShow:modalStart});});function modalStart(){$("#fancy_inner").addClass("rounded");roundCorners()}function roundCorners(){$(".rounded, .ui-corner-all").css({"-moz-border-radius":"4px","-webkit-border-radius":"4px","border-radius":"4px"})}