var $jQ = jQuery.noConflict();

jQuery(document).ready(function () {
    var widthfill=0;
    var widthnav_secundario=0;
    var widthnav_secundario_li=0;

    if(jQuery('.style_f1 #nav_secundario')){
        widthnav_secundario=jQuery('.style_f1 #nav_secundario').outerWidth();
        jQuery('.style_f1 #nav_secundario li').not('.tofill').each(
                        function(){
                                widthnav_secundario_li+=jQuery(this).outerWidth(true);
                        }
                );
        if(jQuery.browser.msie && jQuery.browser.version == 7)
                widthnav_secundario_li+=30; //Separacion logo
        else if(jQuery.browser.msie && jQuery.browser.version == 6)
                widthnav_secundario_li+=jQuery('.style_f1 #nav_secundario li.sf1_link a').outerWidth(true)+60;
        jQuery('.style_f1 #nav_secundario .tofill').css('width', ((widthnav_secundario -widthnav_secundario_li)));
    }

    widthfill=0;
    widthnav_secundario=0;
    widthnav_secundario_li=0;

    if(jQuery('.style_futbol #nav_secundario')){
        widthnav_secundario=jQuery('.style_futbol #nav_secundario').outerWidth();
        jQuery('.style_futbol #nav_secundario li').not('.tofill').each(
                        function(){
                                widthnav_secundario_li+=jQuery(this).outerWidth(true);
                        }
                );
        if(jQuery.browser.msie && jQuery.browser.version <= 6 ) widthnav_secundario_li+=10;
        jQuery('.style_futbol #nav_secundario .tofill').css('width', (widthnav_secundario-widthnav_secundario_li));
    }

    widthfill=0;
    widthnav_secundario=0;
    widthnav_secundario_li=0;

    if(jQuery('.style_sd #nav_secundario')){
        widthnav_secundario=jQuery('.style_sd #nav_secundario').outerWidth();
        jQuery('.style_sd #nav_secundario li').not('.tofill').each(
                        function(){
                                widthnav_secundario_li+=jQuery(this).outerWidth();
                        }
                );
        jQuery('.style_sd #nav_secundario .tofill').css('width', ((widthnav_secundario -widthnav_secundario_li)/2));
    }
    
    //--- BUENAFUENTE ---
    widthfill=0;
    widthnav_secundario=0;
    widthnav_secundario_li=0;

    if(jQuery('.style_buenafuente #nav_secundario')){
        widthnav_secundario=jQuery('.body_videos_buenafuente #nav_secundario').outerWidth();
        jQuery('.body_videos_buenafuente #nav_secundario li').not('.tofill').each(
                        function(){
                                widthnav_secundario_li+=jQuery(this).outerWidth(true);
                        }
                );
                //widthnav_secundario_li+=jQuery('.style_futbol #nav_secundario li.sfutbol_link a').outerWidth();

        if(jQuery.browser.msie && jQuery.browser.version <= 6 ) widthnav_secundario_li+=10;
        jQuery('.body_videos_buenafuente #nav_secundario .tofill').css('width', (widthnav_secundario-widthnav_secundario_li));
    }
    
    //--- SLQH ---
    widthfill=0;
    widthnav_secundario=0;
    widthnav_secundario_li=0;

    if(jQuery('.style_slqh #nav_secundario')){
        widthnav_secundario=jQuery('.body_videos_slqh #nav_secundario').outerWidth();
        jQuery('.body_videos_slqh #nav_secundario li').not('.tofill').each(
                        function(){
                                widthnav_secundario_li+=jQuery(this).outerWidth(true);
                        }
                );
                //widthnav_secundario_li+=jQuery('.style_futbol #nav_secundario li.sfutbol_link a').outerWidth();

        if(jQuery.browser.msie && jQuery.browser.version <= 6 ) widthnav_secundario_li+=10;
        jQuery('.body_videos_slqh #nav_secundario .tofill').css('width', (widthnav_secundario-widthnav_secundario_li));
    }
    
    //--- EL INTERMEDIO ---
    widthfill=0;
    widthnav_secundario=0;
    widthnav_secundario_li=0;

    if(jQuery('.style_elintermedio #nav_secundario')){
        widthnav_secundario=jQuery('.body_videos_elintermedio #nav_secundario').outerWidth();
        jQuery('.body_videos_elintermedio #nav_secundario li').not('.tofill').each(
                        function(){
                                widthnav_secundario_li+=jQuery(this).outerWidth(true);
                        }
                );
                //widthnav_secundario_li+=jQuery('.style_futbol #nav_secundario li.sfutbol_link a').outerWidth();

        if(jQuery.browser.msie && jQuery.browser.version <= 6 ) widthnav_secundario_li+=10;
        jQuery('.body_videos_elintermedio #nav_secundario .tofill').css('width', (widthnav_secundario-widthnav_secundario_li));
    }
    
    //--- QVMT ---
    widthfill=0;
    widthnav_secundario=0;
    widthnav_secundario_li=0;

    if(jQuery('.style_qvmt #nav_secundario')){
        widthnav_secundario=jQuery('.body_videos_qvmt #nav_secundario').outerWidth();
        jQuery('.body_videos_qvmt #nav_secundario li').not('.tofill').each(
                        function(){
                                widthnav_secundario_li+=jQuery(this).outerWidth(true);
                        }
                );
                //widthnav_secundario_li+=jQuery('.style_futbol #nav_secundario li.sfutbol_link a').outerWidth();

        if(jQuery.browser.msie && jQuery.browser.version <= 6 ) widthnav_secundario_li+=10;
        jQuery('.body_videos_qvmt #nav_secundario .tofill').css('width', (widthnav_secundario-widthnav_secundario_li));
    }
    
    //--- SALVADOS ---
    widthfill=0;
    widthnav_secundario=0;
    widthnav_secundario_li=0;

    if(jQuery('.style_salvados #nav_secundario')){
        widthnav_secundario=jQuery('.body_videos_salvados #nav_secundario').outerWidth();
        jQuery('.body_videos_salvados #nav_secundario li').not('.tofill').each(
                        function(){
                                widthnav_secundario_li+=jQuery(this).outerWidth(true);
                        }
                );
                //widthnav_secundario_li+=jQuery('.style_futbol #nav_secundario li.sfutbol_link a').outerWidth();

        if(jQuery.browser.msie && jQuery.browser.version <= 6 ) widthnav_secundario_li+=10;
        jQuery('.body_videos_salvados #nav_secundario .tofill').css('width', (widthnav_secundario-widthnav_secundario_li));
    }
    
    //--- LA TIRA ---
    widthfill=0;
    widthnav_secundario=0;
    widthnav_secundario_li=0;

    if(jQuery('.style_latira #nav_secundario')){
        widthnav_secundario=jQuery('.body_videos_latira #nav_secundario').outerWidth();
        jQuery('.body_videos_salvados #nav_secundario li').not('.tofill').each(
                        function(){
                                widthnav_secundario_li+=jQuery(this).outerWidth(true);
                        }
                );
                //widthnav_secundario_li+=jQuery('.style_futbol #nav_secundario li.sfutbol_link a').outerWidth();

        if(jQuery.browser.msie && jQuery.browser.version <= 6 ) widthnav_secundario_li+=10;
        jQuery('.body_videos_latira #nav_secundario .tofill').css('width', (widthnav_secundario-widthnav_secundario_li));
    }
    
    //--- MAITENA ---
    widthfill=0;
    widthnav_secundario=0;
    widthnav_secundario_li=0;

    if(jQuery('.style_maitena #nav_secundario')){
        widthnav_secundario=jQuery('.body_videos_maitena #nav_secundario').outerWidth();
        jQuery('.body_videos_salvados #nav_secundario li').not('.tofill').each(
                        function(){
                                widthnav_secundario_li+=jQuery(this).outerWidth(true);
                        }
                );
                //widthnav_secundario_li+=jQuery('.style_futbol #nav_secundario li.sfutbol_link a').outerWidth();

        if(jQuery.browser.msie && jQuery.browser.version <= 6 ) widthnav_secundario_li+=10;
        jQuery('.body_videos_maitena #nav_secundario .tofill').css('width', (widthnav_secundario-widthnav_secundario_li));
    }

	//--- CINE ---
    
    widthfill=0;
    widthnav_secundario=0;
    widthnav_secundario_li=0;

    if(jQuery('.style_cine #nav_secundario')){
        widthnav_secundario=jQuery('.body_videos_cine #nav_secundario').outerWidth();
        jQuery('.body_videos_cine #nav_secundario li').not('.tofill').each(
                        function(){
                                widthnav_secundario_li+=jQuery(this).outerWidth(true);
                        }
                );
                //widthnav_secundario_li+=jQuery('.style_futbol #nav_secundario li.sfutbol_link a').outerWidth();

        if(jQuery.browser.msie && jQuery.browser.version <= 6 ) widthnav_secundario_li+=10;
        jQuery('.body_videos_cine #nav_secundario .tofill').css('width', (widthnav_secundario-widthnav_secundario_li));
    }
	
    /*TOOLTIP*/
    // modify global settings
    $jQ.extend($jQ.fn.Tooltip.defaults, {
            track: true,
            delay: 2,
            showURL: false,
            showBody: " - "
    });
    $jQ('.smm .anadir').Tooltip();
    /*TOOLTIP*/

});
