$(document).ready(function()
{
	//adds event trigger to window
	window.addEvent=function(e,ev,f,c) 
	{
		if(e.addEventListener) {
			e.addEventListener(ev,f,c);
			}
			
				else if(e.attachEvent) {
					var r=e.attachEvent('on'+ev,f);return r;
					}
						else {e['on'+ev]=f;
						}
	};
 
	//call thickbox and show, replace the IDName inside the getELementById with the ID you want the url to automatically open
	function showBox() {
		var a = document.getElementById('srcsvy');
	    	var t = a.title || a.name || null;
    		var l = a.href || a.alt;
    		var g = a.rel || false;

     		var COOKIE_NAME = 'source-survey-page-cookie';
	     	$go = $.cookie(COOKIE_NAME);
     		
		if ($go == null) {
			$.cookie(COOKIE_NAME, 'iwashere', { path: '/', expires: 30 });
			 tb_show(t,l,g);
     		}
     			else {
     			
			}
 	}
	//on window load
	 window.addEvent(window, "load", showBox, false);
});			
		 		
