/*******************************************************************************

	CSS on Sails Framework
	Title: Keystone Nano
	Author: XHTMLized (http://www.xhtmlized.com/)
	Date: July 2011

*******************************************************************************/


$(document).ready(function() {

	var keystone_JS = {
		
		init: function() {
			this.initIECorners();
			this.initFooterForm();
		},
		
		initIECorners: function() {
			 
			 try {
				 if (typeof DD_roundies !== undefined) {
				 	//DD_roundies.addRule('#navigation ul ul', '0 0 7px 7px');
				 	DD_roundies.addRule('#navigation', '10px');
				 	DD_roundies.addRule('.platform', '10px');
				 	DD_roundies.addRule('.platform h2', '10px 10px 0 0');
				 	//DD_roundies.addRule('#sidebar .feature a span', '0 0 10px 10px');				 	
				 }
			 } catch(e) {
			 
			 }
			 
		},
		
		initFooterForm: function() {
			$("#footer input[type='text'], #footer textarea").each(function () {
				$label = $("label[for='" + $(this).attr("id") + "']");
				$(this).val($label.text());				
				$(this).focus(function() {
					if ($(this).val() == $("label[for='" + $(this).attr("id") + "']").text()) {
						$(this).val("");
					}
				});
				$(this).blur(function () {
					if ($(this).val() == "") {
						$(this).val($("label[for='" + $(this).attr("id") + "']").text());
					}
				});
			})
		}
		
	}

	keystone_JS.init();
	
});

