thumbnail border calculated with jQuery