	
	$(function(){
	
		//No More IE6!
		if ($.browser.msie)
		{
			if ($.browser.version == "6.0")
			{
				var div = $("<div />").css({
					"width"      : "100%",
					"text-align" : "center",
					"margin"     : "0px auto"
				}).prependTo("body");
				$("<div/>").css({
					"border" : "1px solid red",
					"background-color" : "#ffb2ac",
					"text-align"       : "center",
					"width"            : "75%",
					"font-weight"      : "bold",
					"padding"          : "5px 10px",
					"margin"           : "0px auto"
				}).html("NCEES is phasing out support for Internet Explorer 6. To view this page properly we recommend that you upgrade to a newer version of <a href='http://www.microsoft.com/windows/Internet-explorer/default.aspx' target='_blank'>Internet Explorer</a> or switch to a different browser.").prependTo(div);
			}
		}	
		
		var quickLinksTimer = null;
		
		$('#nav img, div.box .title ul img').bind('mouseover', function(){
			if (this.src.indexOf('-over') == -1) {
				this.src = this.src.replace(/(.*)\.(jpg|gif|png)$/i, "$1-over.$2");
				$(this).bind('mouseout', function(){
					this.src = this.src.replace(/(.*)-over\.(jpg|gif|png)$/i, "$1.$2")
				});
			}
		});
		
		$('#utilityHeader .quickLinks').bind('mouseover', function(){
			clearTimeout(quickLinksTimer);
			$('#utilityHeader .quickLinks ul').show();
		});
	
		$('#utilityHeader .quickLinks').bind('mouseout', function(){
			quickLinksTimer = setTimeout(function(){
				$('#utilityHeader .quickLinks ul').hide();
			}, 250);
		});
	
		$('div.sampleQuestion a[href="javascript:void(0);"]').bind('click', function(){
			$(this).parents('div.sampleQuestion').find('ul.answers li.correct').addClass('highlight');
		});
		
	});
	
	
		// this stuff is for the Main Graphic Rotator. jculver
		function initPhotos(){
			var k = 0;
			$('#largePhotoLink').attr('style', 'display: block');
			var photoInt = setInterval(function(){ nextPhoto(++k); }, 6000);
		}
		
		function nextPhoto(i){
			i = i % photosArray.length;
			$('#largePhoto').fadeTo('normal', 0, function(){
				
				$('#largePhoto').attr('src', 'images/' + photosArray[i]);
				
				$('#largePhotoLink').attr('href', linksArray[i]);
				
				if(linksArray[i]!=''){
					$('#largePhotoLink').attr('disabled', 'false');
				}else{
					$('#largePhotoLink').attr('disabled', 'true');
				}
				
			}).fadeTo('normal', 1);
		}
		
	$(document).ready(function(){
		
		$("a#emailPage").click(function(){
		
			// do not allow dupes.
			if(document.getElementById('emailWrapper')==null){
		
				var iframe = document.createElement('iframe');
				iframe.src = this.href;
				iframe.id = 'emailWrapper';
				iframe.style.border = 0;
				iframe.style.frameBorder = 0;
				iframe.frameBorder = 0;
				iframe.border = 0;
				document.body.appendChild(iframe);
			
			}
			
			// annd make sure that link doesn't go anywhere.
			return false;
			
		});
		
	});