// Read a page's GET URL variables and return them as an associative array. function getUrlVars() { var vars = [], hash; var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&'); for(var i = 0; i < hashes.length; i++) { hash = hashes[i].split('='); vars.push(hash[0]); vars[hash[0]] = hash[1]; } return vars; } $(document).ready(function(){ $('.attachment .view-images-all .views-row').each(function(){ var myLink = $(this).find('.views-field-field-image-image-fid-1 .field-content').html(); $(this).wrap(''); var myTitle = $(this).find('.views-field-title .field-content').html(); var eventLink = $(this).find('.views-field-title-1 span').html(); var imageBody = $(this).find('.views-field-body .field-content').html(); myTitle = '