//=====================================================//
var LoadReadyLocal = {
    product: function(){
        $(function() {
            //initialize tabs
            $('#tabs').tabs();
                
            $('.ui-tabs .ui-widget-header h6').addClass('nocufon');
            $('#tabs ul.ui-tabs-nav li:last').livequery(function() {
                $(this).css('border-right', '1px solid #D3D3D3');
            });
            
        });
    }
    
};

LoadReady = $.extend(LoadReady, LoadReadyLocal);


$(function() {
    
    Cufon.replace('h1') ('h2') ('h3') ('h4') ('h5') ('#topnav') ('.consultation');

    Cufon.replace('h6:not(.nocufon)');

    Cufon.replace('.sf-menu li a', {
    	hover: true
    });

    Cufon.replace('.vlist li a', {
    	hover: true
    });

    Cufon.replace('.chooseByType a', {
    	hover: true
    });

    //$('.page_margins').css('min-height', $('body').height() + 37 + 'px');
    
    $(".sf-menu li:first-child a").css('padding-left', 0);


    //$('.latestNews ul, .ui-tabs .ui-tabs-panel').jScrollPane();

    $('ul.contentHistory a.zoom').click(function(e){
        e.preventDefault();
        var link = $(this);
        var parent = $(this).closest('li');
        $('.desc', parent).slideToggle('slow', function() {
            $(link).toggleClass('ic-minus');
        });
    });

    $('ul.contentHistory li:last').css('border-bottom', 0);

    $('table.siteSearchResult tr:nth-child(even)').css({'background-color': '#EEF2F8'});

    $('#footer .links a').click(function(e){
        e.preventDefault();
        Util.openDialogForLink.call(this, '', 600, 400);
    });

    $('table.tblChooseByType tr:nth-child(even)').css({'background-color': '#EEF2F8'});
    $('table.tblChooseByType tr td:nth-child(2)').css({'width': '125px', 'text-align': 'center'});
    $('table.tblChooseByType').prev().css({'margin': '0'});

	$(".newsticker-jcarousellite").jCarouselLite({
		vertical: true,
		hoverPause:true,
		visible: 5,
		auto:500,
		speed:3000
	});

    //$(".newsticker-jcarousellite li").css('height', 'auto');
    $("a[title]").css({'color' : '#eb511a'}).tooltip();
});

$(document).ready(function(){ 
    $("ul.sf-menu").superfish({ 
         pathClass:  'current'
        ,autoArrows: false 
        ,dropShadows: false 
    }); 
}); 
