bug fix for the javascript in product media. The ajax call broke a prototype function