Hmm i see now how I should incorporate it into the code I have in my php file! I'll let you know if i get it to work!
Turns out I just had to add:
<?php echo ( wp_get_attachment_url( $single_gallery_attachment->ID, 'thumbnail' )); ?>
as data-thumb= to my script!
Thanks for your help agusmu!