var inputPlaceholder = function(event, el, className){
    event = event || window.event;
    el = el || this;
    className = className || 'placeholder';

    if (el.defaultValue == '') return false;

    if (event){
        if (event.type == 'focus' && el.value == el.defaultValue){
        el.value = '';
        }
        else if (event.type == 'blur' && el.value == ''){
        el.value = el.defaultValue;
        }
    }

    if (el.value == el.defaultValue){
        $(el).addClass(className);
    }
    else {
        $(el).removeClass(className);
    }
}


$(document).ready(function()
{
    if($.browser.msie){
        $('a').focus(function(){
            $(this).blur();
        });

    if($.browser.version == '6.0' && $('DL.tabs DT I.l').length > 0){
            $('DL.tabs DT I.l').each(function(){
                w = $(this).parent().width();
                $(this).css('width',w);
            });
        }
    }

    $('input.placeholder').focus(inputPlaceholder);
    $('input.placeholder').blur(inputPlaceholder);
    $('input.placeholder').change(inputPlaceholder);
    $('input.placeholder').each(inputPlaceholder);

    $('dl.tabs dt').click(function(){
        $(this)
            .siblings().removeClass('selected').end()
            .next('dd').andSelf().addClass('selected');
    });

    if($('table.zebra').length > 0){
        $('table.zebra').each(function(){
            $(this).find('tr:even').addClass('even');
            $(this).find('tr:odd').addClass('odd');
        });
    }
});
