Qadaffi is quite a character. Does he have ties with Al Qaida? I don't know. As far as I know, Islamic fundamentalist define him as an "apostate" for his secularism.
Qadaffi is actually considered unbalanced and somewhat senile right now. Several world leaders have hinted at this. The press out of the middle east won't discuss it. He apparently runs the country...but his son and a small group of politicans make all the moves and they know their position. My guess is that he probably bankrolled the operation...while no one else in Libya knew what was going on. Most Libyans are sick and tired of the embargo, and won't Libya to become part of the money-making machine that they see in Egypt. Tourism and oil could easily put Libya back on the map. They were never much dedicated to Muslim values and its been a bumpy road over the past 20 years with Qadaffi.