How to detect collison of two elements in java script.. Please give me solution..

i used kinatic js to draw group of rectangles and a circle. now i got to know is circle is colliding the rectangle when i move..

please give me solution