/*
 * Created By:      Salman Riaz
 * Pre-Requiste:    JQuery
 * Created Date:    2010-05-03
 */

jQuery(function($) {
    if( jQuery.browser.msie ) {
        // $("div.toolbar").css("padding-top", "9px");
    }
    
    $("table.form > thead > tr").children("th").addClass('seperator');
    $("table.form > tbody > tr").children("th").addClass('seperator');
    $("table.form > tbody > tr").children("td").addClass('seperator');

    $('div#menu ul.navigation li')
    .css({
        backgroundPosition: "-20px 35px"
    })
    .mouseover(function(){
        $(this).children("a").css("color", "white");
        $(this).stop().animate({
            backgroundPosition:"(-20px 94px)"
        }, {
            duration:500
        });
    })
    .mouseout(function(){
        $(this).children("a").css("color", "#5C5C5C");
        $(this).stop().animate({
            backgroundPosition:"(40px 35px)"
        }, {
            duration:200,
            complete:function(){
                $(this).css({
                    backgroundPosition: "-20px 35px"
                })
            }
        });
    });

    $('div#hmenu ul.navigation li')
    .css( {
        backgroundPosition: "0px 0px"
    } )
    .mouseover(function(){
        $(this).children("a").css("color", "white");
        $(this).stop().animate({
            backgroundPosition:"(-300px 0px)"
        }, {
            duration:500
        });
    })
    .mouseout(function(){
        $(this).children("a").css("color", "#F0FFF0");
        $(this).stop().animate({
            backgroundPosition:"(0px 0px)"
        }, {
            duration:200
        });
    });
});

/* utility methods */
function isBlank( v ) {
    return $.trim(v) == '';
}
