Greetings all,please check this code: http://jsfiddle.net/RZpbK/1558/

now what i understand from :

if (!$target.hasClass('active') && $other.length > 0)
is that:
...