Just for another perspective on this and from a woman's eye view.....
I see situations where people are now apprehensive about interacting with people of the opposite sex in a work environment because they just don't know how other people will react and they want to avoid trouble. That's all well and good, but getting the job done in most workplaces means you have to build some kind of work relationship with your coworkers regardless of their gender. IME, being able to be personable in this process helps, and that means you have to get to know people in a little bit more personal way. Understand that "more personal" doesn't mean "intrusive," but it does mean to treat your coworkers like real people and not machines.
I've gone to a lot of work over the past few months to lose weight, and I hadn't seen a coworker from another office during that time. The surprise on his face was evident that I'd changed, but it took him three days and a happy hour to finally say, "I'd really like to pay you a compliment, but I'm unsure if it will offend you, so I don't know what to do." I don't think the workplace should be that scary.
IMHO - as long as the fun and joking doesn't result in anyone taking credit for anyone else's work, someone using a position of authority to exert undue influence for personal gain, pushing for things that make the workplace uncomfortable or hostile for any party, or anything non-consensual, illegal or immoral, then we're all grownups and we just need to behave in a manner that is appropriate for our age and surroundings. That said, these kinds of laws wouldn't exist if everyone out there was capable of following those guidelines. Carry on.