The junction box that has the wires ,is that the box up in the ceiling?And you have two switches . Are they together in a twin box in the wall or at two seperate locations?well the black(fan power) should go to the black in the celing box and the red should go to the Blue wire (lite power leg).
It would make it very simple if you had a Meter or a pigtail test lite. and check the power when the switches are on and off.Best to write down your findings when doing the sw. test.Post back for more help or if anyone can give there two cents.Good luck.and Happy holidays!