			$.fn.clearForm = function() {
	            return this.each(function() {
	                var type = this.type, tag = this.tagName.toLowerCase();
	                if (tag == 'form')
	                    return $(':input', this).clearForm();
	                if (type == 'text' || type == 'password' || tag == 'textarea')
	                    this.value = '';
	                else if (type == 'checkbox' || type == 'radio')
	                    this.checked = false;
	                else if (tag == 'select')
	                    this.selectedIndex = 0;
	            });
			};	
			
			var sitefunctions = {
				textresize : function(){
					// show text resizing links
					$(".fontsize").show();
					var $cookie_name = "sitename-FontSize";
					var originalFontSize = $(".interiorcontent, .departmentinterior").css("font-size");
					// if exists load saved value, otherwise store it
					if($.cookie($cookie_name)) {
						var $getSize = $.cookie($cookie_name);
						$(".interiorcontent, .departmentinterior").css({fontSize : $getSize + ($getSize.indexOf("px")!=-1 ? "" : "px")}); // IE fix for double "pxpx" error
					} else {
						$.cookie($cookie_name, originalFontSize);
					}
					// reset link
					$(".resetFont").bind("click", function() {
						$(".interiorcontent, .departmentinterior").css("font-size", originalFontSize);
						$.cookie($cookie_name, originalFontSize, {expires: 7});
						return false;
					});
					// text "+" link
					$(".increaseFont").bind("click", function() {
						var currentFontSize = $(".interiorcontent, .departmentinterior").css("font-size");
						var currentFontSizeNum = parseFloat(currentFontSize, 10);
						var newFontSize = currentFontSizeNum*1.2;
						if (newFontSize < 16) {
							$(".interiorcontent, .departmentinterior").css("font-size", newFontSize);
							$.cookie($cookie_name, newFontSize, {expires: 7});
						}
						return false;	
					});
					$(".decreaseFont").bind("click", function() {
						  var currentFontSize = $(".interiorcontent, .departmentinterior").css("font-size");
						  var currentFontSizeNum = parseFloat(currentFontSize, 10);
						  var newFontSize = currentFontSizeNum*0.8;
						  if (newFontSize > 8) {
						    $(".interiorcontent, .departmentinterior").css("font-size", newFontSize);
						    $.cookie($cookie_name, newFontSize, {expires: 7});
						  }
						  return false;
					});
				}
			}
			
			function equalHeight(group) {
			    tallest = 0;
			    group.each(function() {
			        thisHeight = $(this).height();
			        if(thisHeight > tallest) {
			            tallest = thisHeight;
			        }
			    });
			    group.height(tallest);
			}

			$(document).ready(function() {
				
				equalHeight($('.hmecols'));
				//equalHeight($('.intcols'));
				
				$('.srchinptbkg input').css({
					'width': '154px',
					'height': '16px',
					'margin': '0',
					'padding': '0',
					'border': 'none',
					'display': 'block',
					'outline': '0',
					'background': 'none',
					'color': '#ffffff'
				}).focus(function () {
					if ($(this).attr("value") == "Search This Site")
						$(this).attr("value", "")
				}).blur(function () {
					if ($(this).attr("value") == "")
						$(this).attr("value", "Search This Site");
				});
				
				$("ul.sf-menu").superfish({
					animation: {
						height: 'show'
					},
					speed: 300,
					autoArrows: false,
					dropShadows: false
				}).find("ul").bgIframe();
				
				$(".carousel .jCarouselLite").jCarouselLite({
					btnNext: ".carousel a.next",
					btnPrev: ".carousel a.prev",
					mouseWheel: true,
					visible: 6,
					speed: 800
				});
				
				$(".stars-wrapper").stars({
					split: 4,
					oneVoteOnly: true
				});
				
				$(".pager li a span.starholder").stars({
					split: 4,
					disabled: true
				});
				
				$(".stars-wrapper2").stars({
					split: 4,
					disabled: true
				});
				
				$('.playerArea').cycle({ 
				    fx: 'turnDown', 
				    timeout: 0, 
				    pager: '.pager', 
				    pagerAnchorBuilder: function(idx, slide) { 
				        // return selector string for existing anchor 
				        return '.pager li:eq(' + idx + ') a'; 
				    } 
				});
				
				$('a.thickbox').thickbox({
					macFFBgHack: 'images/core/macFFBgHack.png',
					loadingImage: 'images/core/thickbox-loading.gif',
					height: 453,
					width: 592
				});
				
				$(".truncate").truncate({
			        max_length: 119,
					more: "View More",
					less: "View Less"
				});
				
				$(".truncate2").truncate({
			        max_length: 700,
					more: "View More",
					less: "View Less"
				});
				
				$("a.moreoptions").click(function () {
					if ($.browser.msie) {
						if ($(this).css("background-image").substring($(this).css("background-image").lastIndexOf("/") + 1, $(this).css("background-image").lastIndexOf(")") - 1) == "truncateless.gif") {
							$(this).css({
								"background-image": "url('/images/core/review/truncatemore.gif')"
							}).html("Less Share Options");
							
							var theHeight = $(".sharelnkarea div").height();
							
							$(".sharelnkarea").animate({
								'height': theHeight
							}, 1500);
						}
						else {
							$(this).css({
								"background-image": "url('/images/core/review/truncateless.gif')"
							}).html("More Share Options");
							
							$(".sharelnkarea").animate({
								'height': '24px'
							}, 1500);
						}
					}
					else {
						if ($(this).css("background-image").substring($(this).css("background-image").lastIndexOf("/") + 1, $(this).css("background-image").lastIndexOf(")")) == "truncateless.gif") {
							$(this).css({
								"background-image": "url('/images/core/review/truncatemore.gif')"
							}).html("Less Share Options");
							
							var theHeight = $(".sharelnkarea div").height();
							
							$(".sharelnkarea").animate({
								'height': theHeight
							}, 1500);
						}
						else {
							$(this).css({
								"background-image": "url('/images/core/review/truncateless.gif')"
							}).html("More Share Options");
							
							$(".sharelnkarea").animate({
								'height': '24px'
							}, 1500);
						}
					}
					
					return false;
				});
				
				$("a.morecomments").click(function () {
					if ($.browser.msie) {
						if ($(this).css("background-image").substring($(this).css("background-image").lastIndexOf("/") + 1, $(this).css("background-image").lastIndexOf(")") - 1) == "truncateless.gif") {
							$(this).css({
								"background-image": "url('/images/core/review/truncatemore.gif')"
							});
							
							var theHeight = $(".thecomments div").height();
							
							$(".thecomments").animate({
								'height': theHeight
							}, 1500);
						}
						else {
							$(this).css({
								"background-image": "url('/images/core/review/truncateless.gif')"
							});
							
							$(".thecomments").animate({
								'height': '350px'
							}, 1500);
						}
					}
					else {
						if ($(this).css("background-image").substring($(this).css("background-image").lastIndexOf("/") + 1, $(this).css("background-image").lastIndexOf(")")) == "truncateless.gif") {
							$(this).css({
								"background-image": "url('/images/core/review/truncatemore.gif')"
							});
							
							var theHeight = $(".thecomments div").height();
							
							$(".thecomments").animate({
								'height': theHeight
							}, 1500);
						}
						else {
							$(this).css({
								"background-image": "url('/images/core/review/truncateless.gif')"
							});
							
							$(".thecomments").animate({
								'height': '350px'
							}, 1500);
						}
					}
					
					return false;
				});

			});
