// clear fields script
function clearText(field){

    if (field.defaultValue == field.value) field.value = '';
    else if (field.value == '') field.value = field.defaultValue;

}

function myfunk(){
}

// Sitemap effect
SSS_faq = {
	init : function() {
		$('div.sitemap .subcategories').not(':first').slideToggle('slow');
		$('div.sitemap .categories').click(function() { SSS_faq.toggle(this) });
	},
	
	toggle : function(elt) {
		$(elt).toggleClass('active');
		$(elt).siblings('.subcategories').slideToggle('slow');
	}
}

$(document).ready(function() {
	var $sendBtn = $(".send");
	var $favBtn = $(".fav");
	var $rateBtn = $(".rate");
	var $timeBtn = $(".time");
	var $printBtn = $(".print");
	
	var $sendTool = $("#sendT");
	var $favTool = $("#favT");
	
	$sendTool.hide();
	$favTool.hide();
	
	$sendBtn.click(
		function () {
			for (i=0; i<=4; i++){
				if ($(".toolBar div:eq(" + i + ")").is (':visible')) {
					$(".toolBar div:eq(" + i +")").fadeOut('slow');
				}
			}
			$sendTool.fadeIn('slow');
			$sendBtn.css('background-image','url(/nova/_gfx/send_on.gif)');
		});
	
	$favBtn.click(
		function () {
			for (i=0; i<=4; i++){
				if ($(".toolBar div:eq(" + i + ")").is (':visible')) {
					$(".toolBar div:eq(" + i +")").fadeOut('slow');
				}
			}
			$favTool.fadeIn('slow');
			$favBtn.css('background-image','url(/nova/_gfx/fav_on.gif)');
		});
	
		/*for (i=0; i<=4; i++){
				$Button = $('.toolBox a:eq('+ i +')');
				
				if ($(".tooltip").is (':hidden')) {
					$(".tooltip").fadeIn('slow');
				} else {
					$(".tooltip").fadeOut('slow');
				}
			}*/
		
	//$('.dateFrommiles').datepicker($.extend({numberOfMonths: 2, duration: '', showOn: 'both', buttonImageOnly: true, buttonImage: '_gfx/date_ico.gif', dateFormat: 'dd/mm/yy'}, $.datepick.regional['el'])); 
});