Define "for a long time." It was under the control of the Muslim Ottoman Empire until the late 19th century. It was under Austrian control until the First World War. Then it was a part of Yugoslavia. Yugoslavia had a secular (socialist) government since the end of the WWII and until the breakup. During the breakup wars, even Osama bin Laden (or his closest co-workers) received the passport from the new Muslim government (1). al-Qaeda was active there then, and the foreign "freedom" (Muslim) fighters came there just like they recently came to Syria. The current government tries to limit the influence of these, but Bosnia still has some "Mujahideen training camps" according to the recent reports.
BTW, Gaddafi was also secular compared to what followed:
http://africanleadership.co.uk/blog/?p=8161
That's what complex is: one word like "secular" isn't enough to understand what's going on, especially over any non-trivial time period or the area involving different nations.
> What's "tradition" here?
Under the Muslim control, which lasted for centuries, sadly, no woman was able not to wear a headscarf in the presence of the rulers. Non-believing men weren't able to do anything lucrative or have any real governing function. Once the Muslims have lost the control, the "tradition" was able to change. But there are the real forces pressing backwards even as we speak.
1) https://en.wikipedia.org/wiki/Militant_activity_of_Osama_bin...