function FoldedCorner(){
	this.init();
}

FoldedCorner.prototype.init = function(){
//	$("body").append(
//		this.outImage = $("<div class='foldedcorner'><img src='"+siteroot+"images/topcorner.png'/></div>")//.hover(this.mouseOver, this.mouseOut)
//	);
//	$("body").append(
//		this.overImage = $("<img src='"+siteroot+"images/topcorner_open.png' class='foldedcorner' usemap='#foldedcorner'/>")//.hover(this.mouseOver, this.mouseOut).hide()
//	);

	if($("body .foldedcorner span").length > 0){
		$("body .foldedcorner .opened").parent().hide();
		$("body .foldedcorner .closed").parent().show().css('display','inline-block');
		$("body .foldedcorner").hover(this.mouseOverPngfixed, this.mouseOutPngfixed);
	} else {
		$("body .foldedcorner .opened").hide();
		$("body .foldedcorner .closed").show();
		$("body .foldedcorner").hover(this.mouseOver, this.mouseOut);
	//	$('map').hover(this.mouseOver, this.mouseOut);
	}
}

FoldedCorner.prototype.mouseOver = function(){
	$("body .foldedcorner .closed").hide();
	$("body .foldedcorner .opened").show();
}

FoldedCorner.prototype.mouseOut = function(){
	$("body .foldedcorner .opened").hide();
	$("body .foldedcorner .closed").show();
}

FoldedCorner.prototype.mouseOverPngfixed = function(){
	$("body .foldedcorner .closed").parent().hide();
	$("body .foldedcorner .opened").parent().show().css('display','inline-block');
}

FoldedCorner.prototype.mouseOutPngfixed = function(){
	$("body .foldedcorner .opened").parent().hide();
	$("body .foldedcorner .closed").parent().show().css('display','inline-block');
}

