﻿// JScript File

$(document).ready(function() {
 //Calendar 1
 ShowCalendar1 =function(){
                    $("#events > ul > li:first").addClass("active");
					$("#events > ul > li:last").addClass("last");
					$("#events > ul > li:odd").addClass("odd");
					
				    //for the divs
					$("#events > div").hide();
					$("#events > div:first").show();
					
					//tab actions
					var menu=$("#events > ul").find("li")
					var daylist = $("#events > .Testing")
					$("#events > .Testing").hide();
					$("#events > .Testing:eq(0)").addClass("shown")
					$("#events > .Testing:eq(0)").animate({"opacity":"show"},{"duration":"slow"});
					
					menu.each(function(i){
					   $(this).mousedown(function(){
					        $("#events > ul > li").removeClass("active");
							$("#events > ul > li:odd").addClass("odd");
							$(this).removeClass("odd");
							$(this).addClass("active");
						
        		            $("#events > .Testing").hide();
        		            //$("#events > div[name=Testing]").find(".shown").slideUp("normal").removeClass("shown");
        		            $("#events > .Testing").find(".shown").show()
         		            //$("#events > div[name=Testing]:eq("+i+")").slideDown("normal").addClass("shown");
         		            $("#events > .Testing:eq("+i+")").show()
             		        
         		            //$("#events > div[name=Testing]:eq("+i+")").animate({"opacity":"show"},{"duration":"slow"});
					   });
					});
   };// Calendar1 End
 
 // Eservices Start  
 ShowEServices =function(){
 var menu=$("#eservices > ul").find("li")
 var eservicesdetails=$("#eservices > .eservicescontent")
 
 eservicesdetails.hide()
 $("#eservices > .eservicescontent:eq(0)").show()
 menu.each(function(i)
 {
   $(this).mousedown(function()
   {
      menu.each(function(i)
      {
        $(this).removeClass();
        $(this).addClass("tabs");
      });
      
      $("#eservices > ul > li:first").addClass("first")
      $(this).addClass("tabs active");
      
       eservicesdetails.hide()
       $("#eservices > .eservicescontent:eq("+i+")").css("background", "url(" + apath + "_resources/" + LangCulture + "/_images/eservices/eservice" + i + ".jpg)");//.removeClass("content-area");
       $("#eservices > .eservicescontent:eq("+i+")").animate({"opacity":"show"},{"duration":"slow"});//.show()//
      
   });
   
 });
 }; // Eservices End
 
  //Latest Events Start 
 ShowLatestEventsTitles=function(){
   var eventsImages=$("#news > ul > li")
   var evensimagesTitles=$("#news > ul > li > p")
   evensimagesTitles.hide()
   
   eventsImages.each(function(i){
     $(this).hover(function(){evensimagesTitles.eq(i).animate({"opacity":"show"},{"duration":"slow"});}
                   ,
                  function(){ evensimagesTitles.eq(i).animate({"opacity":"hide"},{"duration":"slow"});});
     });
 };
 //Latest Events End 
 
 ShowLatestEventsTitles();
 ShowEServices();
 ShowCalendar1();
 
});
 


// Onload 
//$(window).load(function () 
//{
// $('.calender:first').each(function()
// {
//	calender();
//	$(window).resize(function()
//	{
//		moveto = $(". > ol").find(".clickedday").position();
//		var markercorrection = $(".mark");
//		markercorrection.css({left:moveto.left, display:"block"});
//	});
//})
//});
