
jQuery(function($) {

    var IE8 = ($.browser.msie && $.browser.version === '8.0') || false;
    
    // apply .news-latest-act class to news item in latest is the current displaying in single    
    (function(){
        var curNewsTitle = $("div.news-single-title h1").text();

        $("ul.news-latest li").each(function() {
            if( $(this).children('h3').text() === curNewsTitle ) {
                $(this).addClass('news-latest-act');
            } else {
                $(this).has('news-latest-act').removeClass('news-latest-act');
            }
        });

		$("ul.news-latest").show(1);
    })();

    $( '#bb-hslider-bloc' ).css('visibility', 'visible');
    if( IE8 ) {
        $( '#bb-hslider' ).children('li').hide().fadeTo( 1000,1.00);
    } else {
        $( '#bb-hslider-bloc' ).hide().fadeTo( 1000, 1.00);
    }
    
    $( '#bb-hslider' ).bslide({
        width: 462,
        height: 214,
        horiz: true,
        fade: true,
        fadeCol: '#fff',
        autolink: 'bb-hslider-pager',
        duration:500,
        auto: 6000
    });
});

