$(function() {  
    $(".focus-slidetabs").tabs(".focus-div > div", {
        rotate: true,                    
        fadeOutSpeed: 1000,
        fadeInSpeed: 1000,
        event:'mouseover'
    }).slideshow({
        autoplay: false
    }); 
    $(".news-scrollable .scrollable").scrollable({
        circular: true,  
        speed: 999
    }).navigator().autoscroll({
        interval: 10000
    });
    $(".header-wrapper .mainnav ul.parent li").hover(function(){
        $(this).find('ul').css("display", "block");
    });
    
    $(".header-wrapper .mainnav ul.parent li").mouseleave(function(){
        $(this).find('ul').css("display", "none");
    });
   	
    $('.flash-object').each(function() {
        $this 		= $(this);
        var swfpath = $this.find('div:first').attr('class');
        var id 		= $this.attr('id');
        var width 	= parseInt($this.css('width'));
        var height 	= parseInt($this.css('height'));

        var so = new SWFObject(swfpath, "sotester", width, height, "9", "#FFFFFF");
        so.addParam("scale", "noscale");
        so.write(id);
    });
    
    $(".galeria .scrollable").scrollable({
        circular: true,
        speed: 2500
    }).navigator().autoscroll({
        interval: 10000
    }); 
    $(".galeria").hover(
        function () {
            $(".galeria .browse").show();
            $(".galeria .browse").show();
        },
        function () {
            $(".galeria .browse").hide();
            $(".galeria .browse").hide();
        }
        );

    // te avoid conflict in any below line, you must use "jQuery" insted of "$" jquery sintax
    jQuery.noConflict();
    jQuery( ".subnav-container" ).tabs({
        event: "mouseover"
    });
    
    /* MERKETING BOX */
    jQuery('.TimoutSlider').each(function() {
        $(this).cycle({
            fx: 'fade', 
            timeoutFn: calculateTimeout
        });                
    });
    
    
        
});

