// JavaScript Document
$(document).ready( function() {
		
		
	// Get Date / Time (Starts)
		var currentDateTime = new Date();
		
		// Date Starts
		var day 	= currentDateTime.getDay()
		var date 	= currentDateTime.getDate()		
 	  var month = currentDateTime.getMonth()
 	  var year 	= currentDateTime.getFullYear()


		var months_names = new Array("Ιανουαρίου", "Φεβρουαρίου", "Μαρτίου",
		"Απριλίου", "Μαίου", "Ιουνίου", "Ιουλίου", "Άυγούστου", "Σεπτεμβρίου",
		"Οκτωβρίου", "Νοεμβρίου", "Δεκεμβρίου");

		var day_names = new Array("Κυριακή" , "Δευτέρα", "Τρίτη", "Τετάρτη",
		"Πέμπτη", "Παρασκευή", "Σάββατο" );

		$('#date').html(day_names[day]+' '+date+' '+months_names[month]);
		// Date Ends

		// Time Starts
		var hours = currentDateTime.getHours()
		var minutes = currentDateTime.getMinutes()
	
		var suffix = "πμ";
		if (hours >= 12) {
		suffix = "μμ";
		hours = hours - 12;
		}
		if (hours == 0) {
		hours = 12;
		}
	
		if (minutes < 10)
		minutes = "0" + minutes
		

		$('#time').html(hours+':'+minutes+suffix);
		// Time Ends		
	// Get Date / Time (Ends)		
		
		
		
			
	$("#edit-submitted-askfree-comments").bind("click", function(){													
		$('#edit-submitted-askfree-comments').attr("value", ""); 
	});
														
														
<!--template javascript for carousel (starts) -->
	jQuery(document).ready(function() {
			jQuery('#mycarousel').jcarousel();
	});
		jQuery(document).ready(function() {
			jQuery('#mycarousel2').jcarousel();
	});
<!--template javascript for carousel (ends) -->


<!----------news rotator js (starts) ----------->
$(document).ready(function() {	

	//Show Banner
	$(".main_image .desc").show(); //Show Banner
	$(".main_image .block").animate({ opacity: 0.85 }, 1 ); //Set Opacity

	//Click and Hover events for thumbnail list
	$(".image_thumb ul li:first").addClass('active'); 
	$(".image_thumb ul li").click(function(){ 
		//Set Variables
		var imgAlt = $(this).find('img').attr("alt"); //Get Alt Tag of Image
		var imgTitle = $(this).find('a').attr("href"); //Get Main Image URL
		var imgDesc = $(this).find('.block').html(); 	//Get HTML of block
		var imgDescHeight = $(".main_image").find('.block').height();	//Calculate height of block	
		
		if ($(this).is(".active")) {  //If it's already active, then...
			return false; // Don't click through
		} else {
			//Animate the Teaser				
			$(".main_image .block").animate({ opacity: 0, marginBottom: -imgDescHeight }, 250 , function() {
				$(".main_image .block").html(imgDesc).animate({ opacity: 0.85,	marginBottom: "0" }, 250 );
				$(".main_image img").attr({ src: imgTitle , alt: imgAlt});
			});
		}
		
		$(".image_thumb ul li").removeClass('active'); //Remove class of 'active' on all lists
		$(this).addClass('active');  //add class of 'active' on this list only
		return false;
		
	}) .hover(function(){
		$(this).addClass('hover');
		}, function() {
		$(this).removeClass('hover');
	});
			
	//Toggle Teaser
	$("a.collapse").click(function(){
		$(".main_image .block").slideToggle();
		$("a.collapse").toggleClass("show");
	});
	
});//Close Function
<!--news rotator js (ends) -->


<!--template javascript for scrollable div -->
	    var attributes = { 
	        scroll: { to: [0, 200] } 
	    }; 
<!--template javascript for scrollable div (ends) -->



});


function doSearch()
{
	var inputsearch  = document.getElementById("inputsearch");
	location.href = "/search/node/"+inputsearch.value;
}
function doClickEmpty(id)
{
	document.getElementById(id).value='';
}









