$(document).ready(function()
{
    $(':submit, :reset, :button, :image').each(function () {
        var title = $(this).val();
        $(this).attr('title', title);
    });
    
    $('#logo p, #menu a, #menu b, h1, h2, h3, a.plink, em.em').each(function () {
        var title = $(this).text();
        $(this).attr('title', title);
    });
    
    $('tr th:last-child, tr td:last-child').addClass('last-child');
    
    $(':text').addClass('text');
    $(':password').addClass('password');
    $(':radio').addClass('radio');
    $(':checkbox').addClass('checkbox');
    $(':submit').addClass('butt submit');
    $(':reset').addClass('butt reset');
    $(':button').addClass('butt button');
    $(':image').addClass('butt image');
    
    $('a.new-window').click(function(){
        window.open(this.href);
        return false;
    });
    
    $('a.pop').click(function(){
        window.open(this.href,null,'width=540,height=350,top=250,left=400,screenX=400,screenY=250,titlebar=0,toolbar=0,location=0,status=1,menubar=0,scrollbars=1,resizable=0,fullscreen=0;');
        return false;
    });
    
    $('a.pop-s').click(function(){
        window.open(this.href,null,'width=364,height=338,top=250,left=500,screenX=500,screenY=250,titlebar=0,toolbar=0,location=0,status=1,menubar=0,scrollbars=0,resizable=0,fullscreen=0;');
        return false;
    });
    
    $("ul.conlist dt").click(function()
    {
        $(this).attr('worked', 1);

        $("dl dd").each(function () {
            if ($(this).prev().attr('worked')==1) {
                return;
            }
            $(this).animate(
            {
                height: 'hide',
                opacity: 'hide'
            },
            'fast');
        });

        $("+dd", this).animate(
        {
            height: 'toggle',
            opacity: 'toggle'
        },
        'fast');
        $(this).attr('worked', 0);
    });
    
    //$('ul').each(function () {
    //    for (var i = 0; i < $(this).children().size(); i++)
    //    {
    //        var n = i + 1;
    //        $(this).children().eq(i).addClass('item'+n);
    //    }
    //});
});