//var $J = jQuery.noConflict();
jQuery(document).ready(function(){

    $(".corner").corner('10px');
	$(".b_corner").corner('bottom 20px');
	
    $(".menu_left li:last").css({border: "none"});
    
    //odinakovaya vysota blokov v kataloge
    $(window).load(function(){
        $(".float_block:even").each(function(){
            if ($(this).next().hasClass("float_block"))
            {
                if ($(this).height() < $(this).next().height())
                {
                    $(this).height($(this).next().height());
                }
                else
                {
                    $(this).next().height($(this).height());
                }
            }
        });
    });
	
	$('#ContactsLayout .ctrl img').click(function(){
		 if ($.browser.msie) {
            $('#ContactsLayout').hide();
        } else {
            $('#ContactsLayout').fadeOut(500);
        }
	});
    
    retooltip();
});

retooltip = function( obj )
{
    if ( !obj )
    {
        obj = '.tooltip';
    }
    $(obj).tooltip(
    {
        track: true, 
        delay: 0, 
        showURL: false, 
        showBody: " - ", 
        extraClass: "pretty", 
        fixPNG: true,
        left: -120,
        fade: 250,
        opacity: 1,
        bodyHandler: function() 
        {
            var _id = $(this).attr('id').substring( 'tooltip_img_'.length );
            return $('#tooltip_img_message_' + _id).html();
        }
    });
}
