$(document).ready(function() {
	$(".editable").editable("/saveme.cfm", { 
		indicator : "<img src='/images/loader.gif' alt='Loading...' />",
		tooltip   : "Click to edit...",
		style  : "display: block",
		submit  : "OK",
		cancel    : "Cancel"
	});
	$('input.dater').datepicker();
	$('input.timer').timepicker();
	
    $('.wymeditor').wymeditor();
	$('input.simple_color').simpleColor({
			cellWidth: 9,
			cellHeight: 9,
			border: '1px solid #333333',
			buttonClass: 'text',
			defaultColor: '#ffffff'
	});
	$('.jqttip').tooltip({
		delay: 0,
		showURL: false
	});
	
	$('#emailusDiv').dialog({
		autoOpen: false,					 
		modal:true,
		height: 300,
		width: 500,
		title: "Email Us",
		buttons: {
			'Ok': function() { $(this).dialog('close');return true;}
		}
	});
	
	/*
	$(":file").jqUploader({
			background:           "FFFFDF",
			barColor:             "FFDD00",
			src:    '/images/jqUploader.swf',
			maxFileSize:      '104857600', //100 MB, 50MB=52428800
			//allowedExt:           "*.*; *.jpg; *.jpeg; *.png",
			//allowedExtDescr:      "what you want",
			params:               {quality:'low'},
			validFileMessage:     'Click upload to attach file to project.',
			endMessage:           'and don\'t you come back ;)',
			hideSubmit:           true,
			endHtml:             '&lt;strong style="text-decoration:underline"&gt;Upload finished!'
	});
	
	$("#emailusDiv").hide();
	var xOffset = 0;
	var yOffset = 10;
	var hide = false; 
	$("#emailusLink, #emailusDiv").hover(
		function(e){
			if (hide) clearTimeout(hide); 
			$("#emailusDiv")
				.css("top",(e.pageY - xOffset) + "px")
				.css("left",(e.pageX + yOffset) + "px")
				.show();
		}, 
		function() {
		 hide = setTimeout(function() {
             $("#emailusDiv").hide();
         }, 250); 
	 	}
	); */
	
});
