added flipswitch demo and fixed mouseup bug