function setCookie(c_name,value,expiredays) {
var exdate=new Date();
exdate.setDate(exdate.getDate()+expiredays);
document.cookie=c_name+ "=" +escape(value)+
((expiredays==null) ? "" : ";expires="+exdate.toGMTString());
}
function getCookie(c_name) {
	if (document.cookie.length>0) {
		c_start=document.cookie.indexOf(c_name + "=");
		if (c_start!=-1) { 
			c_start=c_start + c_name.length+1; 
			c_end=document.cookie.indexOf(";",c_start);
			if (c_end==-1) c_end=document.cookie.length;
			return unescape(document.cookie.substring(c_start,c_end));
		} 
	}
	return "";
}

$(document).ready(function() {
	$(function () {
	  $('.clearthis').each(function () {
		$(this).focus(function () {
			if( this.value == this.defaultValue ) {
				this.value = "";
			}
		}).blur(function() {
			if( !this.value.length ) {
				this.value = this.defaultValue;
			}
		});
	
	  });
	});

	$(function () {
		$(".designboard").click(function () {
			$("#designboard-dropdown").html("<iframe src='/designBoard.asp' class='designboard' frameborder='0' border='0'></iframe>");
			$("#designboard-dropdown").show("slow");
			$("#designboard-close").show("slow");
		return false;
		});
	});

	$(function () {
		$("#panel-loading").click(function () {
			$("#panel-loading").fadeOut("fast");
		return false;
		});
	});

	$(function () {
		$(".hide-designboard").click(function () {
			$("#designboard-dropdown").hide("slow");
			$("#designboard-close").hide("slow");
		return false;
		});
	});
	
	$(function() { 
		$('.moreProdPics').parent().css("border","solid 2px white");
		$('.moreProdPics:first').parent().css("border","solid 2px red");
		$("#picTitle").html($('.moreProdPics:first').attr("alt"));
		$('.moreProdPics').hover(function() {
			$("#prodPic").parent().attr("href",$(this).attr("src"));
			$("#prodPic").attr('src', $(this).attr("src"));
			$("#picTitle").html($(this).attr("alt"));
			$('.moreProdPics').parent().css("border","solid 2px white");
			$(this).parent().css("border","solid 2px red");
		}); 
	});
	
});


