//
// BEGIN functions for changing the search field to use Safari's 'search' type

var DEF_VAL = "Search Stomp Tokyo"; // Default Value
var isSafari = ((parseInt(navigator.productSub)>=20020000) && (navigator.vendor.indexOf("Apple Computer")!=-1));

$(document).ready(
	function() {
	
		var SearchField = document.getElementById("SearchField");
		
		if (isSafari) {
		
			$("#SearchField").attr("type","search");
			$("#SearchField").attr("autosave","stomptokyo.com");
			$("#SearchField").attr("results","10");
			$("#SearchField").attr("placeholder",DEF_VAL);
			
		} else {
		
			if (SearchField.value == '') {
				SearchField.value = DEF_VAL;
			}
			
			$("#SearchField").focus(function() {
				$("#SearchField").attr("value","");
			});
			
			$("#SearchField").blur(function() {
				if (SearchField.value == '') {
					$("#SearchField").attr("value",DEF_VAL);
				}
			});
			
		}
	}
)

// END functions for changing the search field to use Safari's 'search' type
//


//
// BEGIN adding rounded edges to right column modules
$(document).ready(
	function() {
		$("div.ColumnRightModule").prepend("<div class=\"ColumnRightModuleTop\"></div>");
		$("div.ColumnRightModule").append("<div class=\"ColumnRightModuleBot\"></div>");
	}
)
// END adding rounded edges to right column modules
//


//
// BEGIN adding captions to review images
$(document).ready(
	function() {
		$("img.ReviewImage").each(function(i) {
			var CurrImgSrc = this.getAttribute("src");
			var CurrImgAlt = this.getAttribute("alt");
			if (CurrImgAlt != '') {
				$(this).wrap("<div class=\"ReviewImage\"></div>");
				$(this).after("<span>"+CurrImgAlt+"</span>");
			}
		})
	}
)
// END adding captions to review images
//
