Replace == operator and conditions reorganized

Long description:
* replaced == operator with equality operator;
* conditions reorganized in order to have more clear code.
Merge branch 'F_FixZoomJs'