jQuery(document).ready(function() {
	

	jQuery("dfn").click(function () {
		var spanChildren = $(this).children('span');
		if(spanChildren.length > 0){
			$(spanChildren).remove(); 
		} else {
			$(this).append('<span class="dfn"><span class="infoWindow"><span class="infoWindowContent"><span class="title">' + $(this).text() + '</span><span class="text">' + $(this).attr("title") + '</span></span></span></span>');
		}
	});

	
	
	jQuery('#global').click( function(){
		$(this).siblings('#globalContent').toggle();
//		$flag_modal.dialog('open');
		$(this).toggleClass('open');
	});

	jQuery('.boxShadow .close').click( function(){
		jQuery(this).parents('.boxShadow').hide();
		//$('#global').removeClass('open');
		return false;
	});
	



});

jQuery.fn.clearInput = function() {
	return this.focus(function() {
		if( this.value == this.defaultValue ) {
			this.value = "";
		}
	}).blur(function() {
		if( !this.value.length ) {
			this.value = this.defaultValue;
		}
	});
};



