Assuming you are using static menu items, you could just make custom css classes for your top and bottom items. By default, I would have your submenu have the basic css so it matches the middle items. Then define new classes (i.e. li.firstitem, li.lastitem) and apply the background images there.