	$(document).ready(function () {
		setupNav();

		updateLinks();
		addMouseOver();
		toggler();

		$("input[type='text']").setupFormField();
		$("textarea").setupFormField();
		$('form.validate').setupValidation();

		$('#accordion').setupAccordion();

		setupEqualHeights();

		if ($('.lock').length && $.cookie('revisit')) {
			unlockContent();
		}
		
		checkForLayers();

		if ($('#pageNav').length > 0) {
			$.address.init(function(event) {
				return; 
			}).change(function(event) {
				// console.log("change: "+$.address.value());
				handleURLChange($.address.value())
			});
		}
	});


	setupNav = function() {

		$("#mainNav > li > ul").hide();
		nav_animating = false;
		
		$("#mainNav > li").hover(
			function () {		
				animateNav($(this), "expand");
			}, function () {
				animateNav($(this), "collapse");
			}
		)
	}
	animateNav = function(el, direction) {
		if ( direction == "expand" ) {
			if (!nav_animating) {
				if ($(el).find('ul').length) { nav_animating = true }
				if(typeof document.body.style.maxHeight === "undefined") {
					$("#mainNav > li > ul").hide();
					$("#mainNav > li").css('background-position', '0 0');
					$(el).css('background-position', '0 -20px').find('ul').show();
					nav_animating = false;
				} else {
					$("#mainNav > li > ul").hide();
					$("#mainNav > li").css('background-position', '0 0');
					$(el).css('background-position', '0 -20px').find('ul').slideDown(200, function() {nav_animating = false});
				}
			}
		} else {
			if (!nav_animating) {
				if ($(el).find('ul').length) { nav_animating = true }
				if(typeof document.body.style.maxHeight === "undefined") {
					$(el).css('background-position', '0 0').find('ul').hide();
					nav_animating = false;
				} else {
					$(el).css('background-position', '0 0').find('ul').slideUp(0, function() {nav_animating = false});
				}
			}
		}
	}

	checkForLayers = function() {
		if (jQuery.url.param("open")) {
			var urlParam = jQuery.url.param("open");

			if (urlParam.substring(0,3) == 'vid') {
				tb_show(null,'/video.php?vid='+urlParam.substring(3)+'&height=415&width=684&TB_iframe=true',false);	
			}
			else {
				switch(urlParam) {
					case "1": // contact us
						tb_show(null,'/forms/leadform.php?src=1&type=contact&height=700&width=484&TB_iframe=true',false);
						break;
					
					case "2": // subscribe
						tb_show(null,'/forms/leadform.php?src=4&type=newsletter&height=700&width=484&TB_iframe=true',false);
						break;
						
					case "3": // payerview methodology
						tb_show(null,'/our-services/payerview-methodology.php?height=2000&width=813&TB_iframe=true',false);
						break;		
					
					case "4": // payerview disclaimer
						tb_show(null,'/our-services/payerview-disclaimer.php?height=700&width=813&TB_iframe=true',false);
						break;		
	
					case "5": // tech requirements
						tb_show(null,'/our-services/technology-requirements.php?height=2000&width=813&TB_iframe=true',false);
						break;		
	
					case "6": // FAQ - Implementation
						tb_show(null,'/our-services/faq-implementation.php?height=2000&width=813&TB_iframe=true',false);
						break;		
	
					case "7": // FAQ - Utilization
						tb_show(null,'/our-services/faq-utilization.php?height=2000&width=813&TB_iframe=true',false);
						break;		
	
					case "8": // FAQ - Security
						tb_show(null,'/our-services/faq-security.php?height=2000&width=813&TB_iframe=true',false);
						break;		
	
					case "9": // Locations
						tb_show(null,'/our-company/locations.php?loc=watertown&height=2000&width=813&TB_iframe=true',false);
						break;		
	
					case "10": // Awards
						tb_show(null,'/our-company/awards.php?height=1100&width=484&TB_iframe=true',false);
						break;		
	
					case "11": // Partner Request Form
						tb_show(null,'/forms/partnerRequestForm.php?height=1200&width=484&TB_iframe=true',false);
						break;	
	
					case "12": // Flywheel ReminderCall Offer
						tb_show(null,'/forms/leadform.php?src=55&height=800&width=484&TB_iframe=true',false);
						break;	
						
					case "13": // EHR whitepaper
						tb_show(null,'/forms/leadform.php?src=44&type=gateway&height=700&width=484&TB_iframe=true',false);
						break;
					
					case "14": // Revenue erosion whitepaper
						tb_show(null,'/forms/leadform.php?src=34&type=gateway&height=700&width=484&TB_iframe=true',false);
						break;
					
					case "15": // Network effect whitepaper
						tb_show(null,'/forms/leadform.php?src=51&type=gateway&height=700&width=484&TB_iframe=true',false);
						break;
					
					case "16": // Payerview whitepaper
						tb_show(null,'/forms/leadform.php?src=53&type=gateway&height=700&width=484&TB_iframe=true',false);
						break;

					case "17": // VPG Form
						tb_show(null,'/forms/leadform.php?src=57&type=vpg&height=700&width=484&TB_iframe=true',false);
						break;

					case "18": // epocrates
						tb_show(null,'/forms/leadform.php?src=58&type=contact&height=700&width=484&TB_iframe=true',false);
						break;
						
					case "19": // hitech guarantee
						tb_show(null,'/our-company/hitech-guarantee.php?height=1300&width=724&TB_iframe=true',false);
						break;
						
					case "20": // clinicals demo
						loadDemoReg('48');
						break;
					
					case "21": // collector demo
						loadDemoReg('47');
						break;					

					case "22": // sitemap
						tb_show(null,'/sitemap.php?height=650&width=484&TB_iframe=true',false);
						break;

					case "23": // schedule a meeting 
						tb_show(null,'/crm/meeting_layer.php?height=650&width=484&TB_iframe=true',false);
						break;

					case "24": // share your specialty
						tb_show(null,'/crm/specialty_layer.php?height=650&width=484&TB_iframe=true',false);
						break;

					case "25": // Patient Workflow Whitepaper
						tb_show(null,'/forms/leadform.php?src=61&type=gateway&height=700&width=484&TB_iframe=true',false);
						break;
				}
			}
		}
		
		// if the layer's been opened directly, then redirect to its default location
		if (typeof layerID != 'undefined') {
			if (layerID != 0 && !self.parent.tb_remove) {
				window.location.href = layerDefaultPage + '?open=' + layerID;
			}
		}
	}
	

	updateLinks = function() {
		// Format any external URLs to go through the exit interstitial
		$("a[rel='ext']").formatExternalURL();
		
		// Set the target of any links that should open in a new window
		$("a[rel='new']").attr('target','_blank');

		// Links in layers should open in the parent
		$("a[rel='top']").click(
			function() {
				self.parent.location = $(this).attr('href');
				self.parent.tb_remove();
			}
		);
		$("a[rel='layerNarrow']").click(
			function() {
				self.parent.sizeThickboxToContact();
				window.location.href = $(this).attr('href');
			}
		);
		$("a[rel='layerWide']").click(
			function() {
				self.parent.sizeThickboxToWide();
				window.location.href = $(this).attr('href');
			}
		);
		$("a[rel='layerDemo']").click(
			function() {
				if ($.cookie('revisit') || $.cookie('dfex')) {
					switch($(this).attr('name')) {
						case "47": // collector
							var vidID = "9";
							break;
		
						case "48": // clinicals
							var vidID = "10";
							break;
							
						case "56": // communicator
							var vidID = "25";
							break;
					}
		
					self.parent.sizeThickboxToDemo();		
					window.location.href = '/video.php?vid='+vidID;
				}
				// if no, then show the form
				else {	
					switch($(this).attr('name')) {
						case "47": // collector
							var srcID = "49";
							break;
		
						case "48": // clinicals
							var srcID = "50";
							break;

						case "56": // communicator
							var srcID = "74";
							break;

					}
					
					window.location.href = '/forms/leadform.php?src='+srcID+'&type=demo';
				}
			}
		);
		$("a[rel='scroll']").click(
			function() {
				console.log('scroll');
			}
	   );
		

		// Any element that has the class .clickable, watch for click and take user to first href's URL.
		$(".clickable").click(
			function () {
				$thisHref = $(this).find('a:first');

				if ($thisHref.attr('name')) {
					s=s_gi(s_account);
					s.tl($thisHref,'o', $thisHref.attr('name'));
				}

				if ($(this).attr('id') == 'softwareDemoCallout') {
					var srcID = $(this).find('a:first').attr('rel');
					loadDemoReg(srcID.toString());
				}
				else { 
					if ($(this).find('a:first').hasClass('thickbox')) {
						tb_show(null,$thisHref.attr('href'),false);					
						return false;
					}
					else {
						switch($thisHref.attr('rel')) {
							case "ext":
								tb_show(null,$thisHref.attr('href'),false);
								return false;
								break;
								
							case "new":
								window.open($thisHref.attr('href'));
								return false;
								break;
								
							case "playVideo":
								$thisHref.click();
								return false;
								break;
								
							default:
								document.location = $thisHref.attr('href');		
								break;
						}
					}
				}
			}
		);

		$("#button_print").click(function() { window.print(); });
		$("#button_printAll").click(function() { window.print(); });
	}

	setupEqualHeights = function() {
		if ($('#container > .colgroup > div').length && $('.pageContent_wider').length == 0) {
			itemstoresize = $('#container > .colgroup > div:not(.noresize)');
			if (itemstoresize.length == 3) {
				$(itemstoresize).height("auto").css("overflow", "auto").equalHeights(0);	
			} else {
				$(itemstoresize).height("auto").css("overflow", "auto").equalHeights(13);	
			}
		}
		if ($('.col > .colgroup > div').length && $('.pageContent_wider').length == 0) {
			$('.col > .colgroup > div').height("auto").css("overflow", "auto").equalHeights(13);
		}
	}

	addMouseOver = function() {
		// Format any external URLs to go through the exit interstitial
		$(".mouseout").hover(
			function () {
				$(this).removeClass('mouseout').addClass('mouseover');
			}, 
			function () {
				$(this).removeClass('mouseover').addClass('mouseout');
			}
		);
	
	}

	toggler = function() {
		// Format any external URLs to go through the exit interstitial
		$(".toggle_trigger").click(
			function() {
				//$.scrollTo($('#pageNavContainer'));
				
				$(".toggle_trigger").removeClass('active');
				$(this).addClass('active');
				clicked = $(".toggle_trigger").index(this);

				changeBodyContent(clicked, $(this).attr('id'));

				return false;
			}							 
		);
	}


	changeBodyContent = function(indexVal, sectionID) {
		// only scroll if the page nav container is off the screen
		if ($('#pageNavContainer').position().top < $(window).scrollTop()) {
			$.scrollTo($('#pageNavContainer').position().top - 50, 0);
		}
		
		$('.toggle_content').hide();
		$('.toggle_content:eq(' + indexVal + ')').show();				
		setupEqualHeights();

		var bodyName = $('body').attr('id');
			bodyName = bodyName.replace('svcs','');
			bodyName = bodyName.replace('Athena','athena');
		
		var pageName = sectionID;
			pageName = pageName.replace('pageNav_', '');
			pageName = pageName.replace(/-/g, ' ');
			pageName = bodyName + ': ' + pageName; 
			
		reTrack(pageName,'Our Services');
	}



	var title = document.title;

	handleURLChange = function(pathString) { 

		var sectionID = pathString.replace('/','');

		if (sectionID.length == 0) {
			sectionID = 'Overview';	
		}

		// clear all items
		$(".toggle_trigger").removeClass('active');
		
		// make correct item active
		$('#pageNav_'+sectionID).addClass('active');
	
		// show body content
		clicked = $(".toggle_trigger").index($('#pageNav_'+sectionID));
		
		changeBodyContent(clicked, 'pageNav_'+sectionID);
		
		$.address.title([title] + " :: " + sectionID.replace(/-/g, ' '));

	}

	formatTitle = function(titleAppend) {
		// get the current title
		var currentTitle = $('title').html();
		// append the section to the end
		return currentTitle + ' :: ' + titleAppend.replace('/','').replace(/-/g, ' ');
	}
	
/*
	toggle = function(selectedSection) { 
		$.scrollTo($('#pageNavContainer'));

		$(".toggle_trigger").removeClass('active');
		clicked = $(".toggle_trigger").index($(selectedSection));

changeBodyContent(clicked, selectedSection);

		$('.toggle_trigger:eq(' + clicked + ')').addClass('active');
		$('.toggle_content').hide();
		$('.toggle_content:eq(' + clicked + ')').show();
		setupEqualHeights();
		
		var bodyName = $('body').attr('id');
			bodyName = bodyName.replace('svcs','');
			bodyName = bodyName.replace('Athena','athena');
		
		var pageName = $('.toggle_trigger:eq(' + clicked + ')').attr('id');
			pageName = pageName.replace('pageNav_', '');
			pageName = pageName.replace(/-/g, ' ');
			pageName = bodyName + ': ' + pageName; 

		reTrack(pageName,'Our Services');	

	}
*/
	reTrack = function(trackPageName, trackChannel) {
		s.pageName = trackPageName;
		s.channel = trackChannel;
		s.t();
	}
	
	
	unlockContent = function() {
		$('.canUnlock a').each(function(i) {
			var newHref = '/_doc/' + $(this).attr('rel');
			$(this).removeClass('thickbox').attr('href',newHref);
			
			$(this).unbind("click");
			$(this).click(function() {
				window.open($(this).attr('href'));
				return false;
		   	});
			
		});	
		
		$('.canUnlock li.lock').removeClass('lock').addClass('pdf');
		
		// call Flash to unlock content
		if ($('#athenaVideoPlayer').length > 0) {
			document.getElementById('athenaVideoPlayer').handleSuccessfulReistration();
		}
	}
	


	jQuery.fn.setupFormField = function(theField) {
		return this.each(function() { 

			// Save original value
			// $(this).attr('originalValue',$(this).val());
			
			// Add focus action (selecting field)
			$(this).focus(function() {
				if ($(this).val() == $(this).attr('title')) {
					$(this).val('');
				}
				else {
					$(this).select();
				}
			});
			
			// Add blur action (moving off of field)
			$(this).blur(function() {
				if ($(this).val() == '') {
					$(this).val($(this).attr('title'));
				}					  
			});
	
		});
	};	

	jQuery.fn.setupPasswordField = function(theField) {
		return this.each(function() { 

			// Add focus action (selecting field)
			$(this).focus(function() {
				$(this).addClass('hidepasswordlabel');
			});
			
			// Add blur action (moving off of field)
			$(this).blur(function() {
				if ($(this).val().length == 0) {
					$(this).removeClass('hidepasswordlabel');
				}					  
			});
	
		});
	};	

	jQuery.fn.formatExternalURL = function() {
		return this.each(function() { 
			 
			// rewrite URL to go through the exit page
			var currentHref = $(this).attr('href');
			$(this).attr('href', '/exit.php?u=' + encodeURI(currentHref) + '&TB_iframe=true&height=360&width=484');
			
		});
	};	

	jQuery.fn.setupAccordion = function(el) {
		if(typeof document.body.style.maxHeight === "undefined") { // if IE6
			$(el).find('li h3 a').click(function() {
				if (!$(this).parent().parent().hasClass('expanded')) { 
					$(this).parent().parent().siblings().removeClass('expanded');
					$(this).parent().parent().addClass('expanded');
				} else {
					$(this).parent().parent().removeClass('expanded');
				};
				
				// if this is a page, not a layer, then run equalheights
				if ($('.layer').length == 0) {
					setupEqualHeights();
				}
				
				return false;
			});

		} else { // if NOT IE6
			$(el).find('li h3 a').click(function() {
				if (!$(this).parent().parent().hasClass('expanded')) { 
					$(this).parent().parent().siblings().removeClass('expanded').find('.panel_body').hide(); // mcs
					$(this).parent().parent().addClass('expanded').find('.panel_body').hide().fadeIn(400).slideDown(400); // mcs
				} else {
					$(this).parent().parent().removeClass('expanded').find('.panel_body').hide(); // mcs
				};
				
				// if this is a page, not a layer, then run equalheights
				if ($('.layer').length == 0) {
					setupEqualHeights();
				}
				
				return false;
			});
		}
	};	
	/*
	jQuery.fn.setupAccordion = function(el) {
		$(el).find('li h3 a').click(function() {
			if (!$(this).parent().parent().hasClass('expanded')) { 
				$(this).parent().parent().siblings().removeClass('expanded');
				$(this).parent().parent().addClass('expanded');
			} else {
				$(this).parent().parent().removeClass('expanded');
			};
			
			// if this is a page, not a layer, then run equalheights
			if ($('.layer').length == 0) {
				setupEqualHeights();
			}
			
			return false;
		});
	};
	*/

	accordionExpandAll = function() {
		if(typeof document.body.style.maxHeight === "undefined") { // if IE6
			$('#accordion li h3 a').each(function() {
				$(this).parent().parent().addClass('expanded');
			});
		} 
		else { // if NOT IE6
			$('#accordion li h3 a').each(function() {
				$(this).parent().parent().addClass('expanded').find('.panel_body').hide().fadeIn(400).slideDown(400); // mcs
			});
		}

		// if this is a page, not a layer, then run equalheights
		if ($('.layer').length == 0) {
			setupEqualHeights();
		}

		return false;
	}
	
	launchPayerViewDisclaimer = function() {
		tb_show(null,'/our-services/payerview-disclaimer.php?loc=entities&height=700&width=813&TB_iframe=true',false);
	}

	jQuery.fn.setupValidation = function() {

		// only clear validation notices if there's no server error
		if (!($('.validation_notice').hasClass('server_notice'))) {
			$(".validation_notice").hide();
			$(".validation_notice li").hide();
		}
											   
		this.submit(function() { 

			var errors = new Array();
			
		
		
			$("input, select, textarea").removeClass("invalid");

			/*
			// passwords
			// check to see if pass1 and pass2 are long enough, then make sure they match 
			if (($("#password1").length > 0) && ($("#password2").length > 0)) {
				if ( ($("#password1").val().length < 4) || ($("#password2").val().length < 4) || ($("#password1").val() != $("#password2").val()) ) {
					
				errors.push("password");
				$("#password1").addClass("invalid");				
				$("#password2").addClass("invalid");
	
				}
			}
			*/
			
			// all other required form elements
			$(".required").each(function() {
				// detect if it's been modified
				if ( $(this).attr("title") == $(this).val() || $(this).val() == "") {
					// alert(this.id);
					// it hasn't, so show it's related LI
					errors.push(this.id);
					$(this).addClass("invalid");				
				}
			});

			// does it have one @
			if ($(".email").length) {
				if ($(".email").val().split("@").length == 2 ) {
					
					// does it have at least one dot in the 2nd half
					if ($(".email").val().split("@")[1].split(".").length > 1 ) {
						
						//we're ok folks!
						
					} else {
						// alert("no dot");
						errors.push("email");
						$(".email").addClass("invalid");					
					}
				} else {
					// alert("not the right number of @'s in the address");
					errors.push("email");
					$(".email").addClass("invalid");					
				}
			}


			if ( errors.length > 0 ) {
				drawErrors(errors);
				return false;
			} else {
				// disable button
				if ($('button#submit').length > 0) {
					$('button#submit').attr('disabled','disabled');
					$('button#submit span').html('Please wait');
				}
				// exit
				return true;
			}
		});
	};	
	
	
	stopVideo = function() {
		if ($('#athenaVideoPlayer').length > 0) {
			try {
				getFlashMovie("athenaVideoPlayer").stopVideo();
			} catch (err) {
				
			}
		}
	}
	
	function getFlashMovie(movieName) {
		if (navigator.appName.indexOf("Microsoft") != -1) {             
			return window[movieName];         
		} 
		else {             
			return document[movieName];         
		}     
	}     
	
	
	drawErrors = function(errors) {
		var notice = "";
		notice += "	<div class=\"validation_inside\">";
		notice += "		<h3>Please correct the following errors:</h3>";
		// notice += "<p>" + errors + "</p>";
		notice += "		<ul class=\"traditional\">";
		
		// lead form
		( jQuery.inArray("first_name", errors) >= 0 ) ? 
			notice += "<li><strong>First Name</strong> is a required field.</li>" : null ; 
		( jQuery.inArray("last_name", errors) >= 0 ) ?	
			notice += "<li><strong>Last Name</strong> is a required field.</li>" : null ; 
		( jQuery.inArray("company_name", errors) >= 0 ) ? 
			notice += "<li><strong>Practice Name</strong> is a required field.</li>" : null ; 
		( jQuery.inArray("numberOfDocs", errors) >= 0 ) ? 
			notice += "<li><strong>Number of physicians in your practice</strong> is a required field.</li>" : null ; 
		( jQuery.inArray("phone", errors) >= 0 ) ? 
			notice += "<li><strong>Phone</strong> is a required field.</li>" : null ; 
		( jQuery.inArray("state", errors) >= 0 ) ? 
			notice += "<li><strong>State</strong> is a required field.</li>" : null ; 
		( jQuery.inArray("job_title", errors) >= 0 ) ? 
			notice += "<li><strong>Job Title</strong> is a required field.</li>" : null ; 
		( jQuery.inArray("email", errors) >= 0 ) ? 
			notice += "<li><strong>Email</strong> is a required field.</li>" : null ; 

		// partner request form fields
		( jQuery.inArray("org_name", errors) >= 0 ) ? 
			notice += "<li><strong>Organization Name</strong> is a required field.</li>" : null ; 
		( jQuery.inArray("website", errors) >= 0 ) ? 
			notice += "<li><strong>Website URL</strong> is a required field.</li>" : null ; 
		( jQuery.inArray("address", errors) >= 0 ) ? 
			notice += "<li><strong>Address</strong> is a required field.</li>" : null ; 
		( jQuery.inArray("city", errors) >= 0 ) ? 
			notice += "<li><strong>City</strong> is a required field.</li>" : null ; 
		( jQuery.inArray("zip", errors) >= 0 ) ? 
			notice += "<li><strong>ZIP</strong> is a required field.</li>" : null ; 
		( jQuery.inArray("bizphone", errors) >= 0 ) ? 
			notice += "<li><strong>Business Phone #</strong> is a required field.</li>" : null ; 
		( jQuery.inArray("employees", errors) >= 0 ) ? 
			notice += "<li><strong># of Employees</strong> is a required field.</li>" : null ; 
		( jQuery.inArray("focus", errors) >= 0 ) ? 
			notice += "<li><strong>Primary Business Focus</strong> is a required field.</li>" : null ; 
		( jQuery.inArray("sales", errors) >= 0 ) ? 
			notice += "<li><strong>Annual Sales</strong> is a required field.</li>" : null ; 
		( jQuery.inArray("metro_coverage", errors) >= 0 ) ? 
			notice += "<li><strong>Primary Territory/Metropolitan Area</strong> is a required field.</li>" : null ; 
		( jQuery.inArray("interest", errors) >= 0 ) ? 
			notice += "<li>Please explain your interest in partnering with athenahealth.</li>" : null ; 
		( jQuery.inArray("unsubscribe", errors) >= 0 ) ? 
			notice += "<li>Please select at least one type of email that you would like to receive.</li>" : null ; 

		notice += "		</ul>";
		notice += "	</div>";
		
		if ($('.validation_notice').length) {
			$('.validation_notice').html(notice).show();
		}
		
	};	

	/*
	homePromoCalloutLink1 = function() {
		s.tl(this,'o','Cook Childrens Video');
		tb_show(null,'/video.php?vid=14&height=415&width=684&TB_iframe=true',false);	
	}
	*/
	homePromoCalloutLink2 = function() {
		s.tl(this,'o','Federal Stimulus Dollars Guaranteed - Learn More');
		tb_show(null,'/our-company/hitech-guarantee.php?height=1300&width=724&TB_iframe=true',false);	
	}

	setCookie = function(cookievalue) {
		//NEED TO SET COOKIE... ALSO NEEDS TO KNOW IF IT'S ALREADY 
		//SET SO AS NOT TO RESET IT ... 30 DAYS SINCE FIRST SET
		// $.cookie(cookievalue, 'true', { path: '/' });
		$.cookie(cookievalue, 'true', { expires: 30, path: '/' });		
	}
	
	getCookie = function(cookievalue) {
		//NEED TO RETURN TRUE OR FALSE
		if($.cookie(cookievalue) == null) {
			return false;
		}
		else {
			return true;
		}
	}


	sizeThickboxToDemo = function() {
		$.scrollTo({ top:0, left:0 });
		$('#TB_window').css({marginLeft: '-432px',width: '865px', marginTop: '0pt', position: 'absolute', top: '25px', display: 'block'});
		$('#TB_iframeContent').css({width: '864px', height: '552px'});
	}
	sizeThickboxToContact = function() { // 484 x 700
		$.scrollTo({ top:0, left:0 });
		$('#TB_window').css({marginLeft: '-257px',width: '514px', marginTop: '0px', position: 'absolute', top: '25px', display: 'block'});
		$('#TB_iframeContent').css({width: '513px', height: '712px'});
	}
	sizeThickboxToWide = function() {
		$.scrollTo({ top:0, left:0 });
		$('#TB_window').css({marginLeft: '-419px',width: '838px', marginTop: '0px', position: 'absolute', top: '25px', display: 'block'});
		$('#TB_iframeContent').css({width: '837px', height: '2007px'});
	}	
	sizeThickboxToHitech = function() {
		$.scrollTo({ top:0, left:0 });
		$('#TB_window').css({marginLeft: '-377px',width: '754px', marginTop: '0px', position: 'absolute', top: '25px', display: 'block'});
		$('#TB_iframeContent').css({width: '753px', height: '1312px'});
	}	
	resizeThickboxHeight = function(newHeight) {
		$.scrollTo({ top:0, left:0 });
		$('#TB_window').css({marginTop: '0px', position: 'absolute', top: '25px', display: 'block'});
		$('#TB_iframeContent').height(newHeight);
	}
