' } //Only display thmbnails of 4 most recent catches (1 large, 3 small). if (i <= 3) { var photoSrc = 'http://farm' + item.farm + '.static.flickr.com/' + item.server + '/' + item.id + '_' + item.secret + '_' + size + '.jpg' //Each thumbnail links to that photo's Flickr page. var flickrPage = 'http://flickr.com/photos/' + item.owner + '/' + item.id + '/'; // Each thumbnail has a big tooltip, with tags formatted appropriately. var formattedTags = item.tags.replace(/\s/g, "
"); formattedTags = formattedTags.replace(/cat/, "cat: "); formattedTags = formattedTags.replace(/loc/, "location: "); formattedTags = formattedTags.replace(/victim/, "victim: "); formattedTags = formattedTags.replace(/status/, "status: "); formattedTags = formattedTags.replace(/floor/, " floor"); formattedTags = formattedTags.replace(/toy/, " toy"); //Append the built html to one varable for adding to page shortly photohtml += '
"; }; // Replace existing HTML with new version. $('#types-dragged').html(victimsHtml); // ### BUILD STATUS PIE CHART ### // Build a theme for chart colours. var wtcdicharttheme = { colors: ['#C66800', '#D3C70B', '#DD3D0B', '#D30729', '#DDA70B' ], marker_color: '#000000', font_color: '#000000', background_colors: ['#ffffff', '#ffffff'] }; // Create a new chart object, include css id of canvas // where chart will be drawn. var g = new Bluff.Pie('status', '275x250'); // Set a theme and stuff. g.set_theme(wtcdicharttheme); // No title, as this exists via the raw page HTML. g.title = ''; g.legend_font_size = "50px"; g.marker_font_size = "20px"; // Build a regex string to match tags beginning "status: ". var statRe = /^s[a-z]+:\s([a-z\s]+)/ // Match regex to tags and return an object with tag // names and number of occurences. var statCounts = tagsArr.countVals(statRe); // For each status. for (var i in statCounts) { // Add data to the chart g.data([i], [statCounts[i]]); }; // Draw the chart. g.draw(); // ### BUILD LOCATION LIST ### // Build a regex that matches tags beginning "loc: " var locRe = /^l[a-z]+:\s([a-z\s]+)/ // Match regex to tags and return an object with // tag names and number of occurences. var locCounts = tagsArr.countVals(locRe); var locatHtml = ""; // For each location. for (var i in locCounts) { var strippedTag = [i].toString().replace(/\W/g, ""); // Add a line of html with the location and the //number of times victims found in that location. locatHtml += "" + [i] + " (" + locCounts[i] + ")
"; }; // Replace existing html with newly built information. $('#locations').html(locatHtml); // ### BUILD CAT LIST ### // Build a regex that maches tags beginning "cat: ". var catRe = /^c[a-z]+:\s([a-z_\s]+)/ //Match regex to find number of catches each cat has made var catCounts = tagsArr.countVals(catRe); // For each cat. for (var i in catCounts) { var strippedTag = [i].toString().replace(/\W/g, ""); // Insert number of catches to div titled "(catname)-catch" $('#' + [i] + '-catch').html( "" + catCounts[i] + ""); }; } }); // Insert total dragged onto page. $('#total-dragged').html(data.photos.total); // Insert photos onto page. $('#latest-catches').html(photohtml); // Add tooltips to the images from Flickr. $('img').each(function() { $(this).qtip({ style: { name: 'wtcdin' }, position: { target: 'mouse', adjust: { x: 8, y: 10 } } }) }); }); }); ``` **UPDATE 1:** I contacted the domain name company, their advice was basically "don't use [JavaScript][4]". Still can't see why it would work under one domain name and not another... Could it be to do with the fact that they "forward" the domain by means of a frame? [1]: http://en.wikipedia.org/wiki/Ajax_%28programming%29 [2]: https://stackoverflow.com/posts/2021190/ [3]: http://en.wikipedia.org/wiki/Firebug_%28Firefox_extension%29 [4]: http://en.wikipedia.org/wiki/JavaScript