if( source == 'vimeo' )
url: 'http://www.vimeo.com/api/v2/video/' + videoid + '.json',
thumbnail = data.thumbnail_medium;
if( source == 'youtube')
thumbnail = 'http://i4.ytimg.com/vi/' + videoid + '/mqdefault.jpg';
// test result
For some reason, the "thumbnail" value is not preserved outside the ajax call, I suspect it's because I'm defining it wrongly. How would I go about doing it properly so that I could actually use the thumbnail value, please?