$(function(){
	$('#ah-city-business h3').click(function(){
		$(this).next().slideToggle(1000);
                return false;
	});
        
	$('#ah-city-about-show a:first').click(function(){ //alert('first');

		$('#ah-city-about-txt-hidden').slideUp(1500,function(){
			$('#ah-city-about-show a:first').css('display','none');
			$('#ah-city-about-show a:last').css('display','inline');
		});

                return false;
	});
	$('#ah-city-about-show a:last').click(function(){ //alert('last');

		$('#ah-city-about-txt-hidden').slideDown(1500,function(){
			$('#ah-city-about-show a:last').css('display','none');
			$('#ah-city-about-show a:first').css('display','inline');
		});

                return false;
	});

	$('#ah-main-slider').jqFancyTransitions({
		position: 'curtain' ,
		width:1255,
		height:186, //270,
		position: 'curtain', // top, bottom, alternate, curtain
		direction:'right' //left, right, alternate, random, fountain, fountainAlternate
	});
  $("#ah-search-form input").focus(function(){$(this).val("");});
/*
	var kol=$("#ah-main-slider img").length;
	var i=kol;
	function sliderShow(){
		i--; if(i<0) i=kol-1;
		if(i==0){
			$("#ah-main-slider img").eq(kol-1).fadeIn(500,function(){$("#ah-main-slider img").show();});
		}
		else{
			$("#ah-main-slider img").eq(i).fadeOut(500);
		}
		$("#info").text("i="+i);
	}
	var tmr=setInterval(sliderShow,5000);
*/
//---------clock------------
  setInterval( function() {
    var seconds = new Date().getSeconds();
    var sdegree = seconds * 6;
    var srotate = "rotate(" + sdegree + "deg)";
    $("#sec").css({"-moz-transform" : srotate, "-webkit-transform" : srotate});
    },
    1000
  );
  setInterval( function() {
    var hours = new Date().getHours();
    var mins = new Date().getMinutes();
    var hdegree = hours * 30 + (mins / 2);
    var hrotate = "rotate(" + hdegree + "deg)";
    $("#hour").css({"-moz-transform" : hrotate, "-webkit-transform" : hrotate});
    }, 
    1000 
  );
  setInterval( function() {
    var mins = new Date().getMinutes();
    var mdegree = mins * 6;
    var mrotate = "rotate(" + mdegree + "deg)";
    $("#min").css({"-moz-transform" : mrotate, "-webkit-transform" : mrotate});
    }, 
    1000 
  );
});
