It's OK, I've managed to sort it out now. Rather than have the code inline in the page, I have added the map to another page which I am then pulling into fancybox via an iframe. It's actually worked out better as the page is now smaller in file size!