There are a few OpenLayers examples in the OSM wiki which might be of interest. I’m not sure of the code quality of those examples though…
http://wiki.openstreetmap.org/wiki/OpenLayers_Simple_Example http://wiki.openstreetmap.org/wiki/Openlayers_POI_layer_example http://wiki.openstreetmap.org/wiki/OpenLayers_Dynamic_POI