$( function () {
    $( "input.inputLabel" ).each( function ( i, e ) {
        e = $(e)
        if ( e.val() === e.attr('title') )
            e.val('').trigger('blur.ploneInputLabel');
    } );
    $( "textarea.inputLabel" ).focus( function () {
        if ( $( this ).val() == $( this ).attr( 'title' ) )
            $( this ).val( '' );
    } ).blur( function () {
        if ( $( this ).val() == '' )
            $( this ).val( $( this ).attr( 'title' ) );
    } ).blur();
    
    $( '#portal-globalnav > li > .dropdown' ).mouseenter( function () {
        $( this ).parent().addClass( 'hover' );
    } ).mouseleave( function () {
        $( this ).parent().removeClass( 'hover' );
    } );
    
    $( '.portaltype-formfolder select' ).easySelectBox();
} );

