
jQuery().ready(function() {

    // SelectableList control: Select first item initially
    jQuery.each(jQuery('.SelectableList').find('.SelectableItem:first'), function() {
        jQuery(this).addClass('SelectableItem_Selected')
        //jQuery(this).parent().parent().find('.SelectableListCurrentItem').html(jQuery(this).html());
    });


    // SelectableList control: change style on hovering
    jQuery('.SelectableItem').mouseover(function() {
        jQuery(this).parent().parent().find('.SelectableItem_Selected').removeClass("SelectableItem_Selected");
        jQuery(this).addClass("SelectableItem_Selected");
    });

    // SelectableList control: execute an action on click 
    jQuery('.SelectableItem').click(function() {
        jQuery(this).parent().parent().find('.SelectableListCurrentItem').html(jQuery(this).html());
        eval(jQuery(this).find('.SelectableItemAction').text());
    });

});
