$(function() {

		//$('.citylist').hide();
		//$("'citylist").click(function(){

		//});


	var a1;
    var onAutocompleteSelect = function(value, data) {
	  document.location.href = data;
      //$('#selection').html('<img src="\/global\/flags\/small\/' + data + '.png" alt="" \/> ' + value);
      //alert(data);
    }

    var options = {
      serviceUrl: '/autocomplete.asp',
      width: 300,
      delimiter: /(,|;)\s*/,
      onSelect: onAutocompleteSelect,
      deferRequestBy: 0, //miliseconds
      params: { country: 'Yes' },
      noCache: true //set to true, to disable caching
    };

    a1 = $('#query').autocomplete(options);




		$('#tc2').hide();
		var htmlStr = $('#tc2').html();
		//$('#t-menu2').click(function () {
		//	$('#tc2-cnt').html(htmlStr);
		//	return false;
		//});
		//$('#t-menu1').click(function () {
		 // $('#tc2-cnt').html('');
		//	return false;
		//});
		//$('#t-lnk2').click(function () {
		//	$('#tc2-cnt').html(htmlStr);
		//	return false;
		//});
				$(".weatherbox-fullday").each(function(index) {
			var tmpId = $(this).attr('id');
			$('#' + tmpId + '_nav').mouseenter(function(){
				_gaq.push(['_trackEvent', 'Weather Box', 'WB: Show', tmpId]);
				//Hide all
				$(".weatherbox-fullday").hide();
				//Show current
				$('#' + tmpId).show();
				//$('#' + tmpId).slideDown('fast');
			});
			$('#' + tmpId).mouseleave(function(){
				$('#' + tmpId).hide();
				//$('#' + tmpId).slideUp('fast');
			});
		}).hide();



		var wdates = $('select#wdates').selectToUISlider({
			sliderOptions: {
				slide: function(e,ui) {
				//change: function(e,ui) {
					readMap(ui.value);						
					$(this).find('.ui-slider-tooltip .ttContent').text($('select#wdates option').eq(ui.values[0]).text());
				}
			}

		}).hide();
		var wdates2 = $('select#wdates2').selectToUISlider({
			sliderOptions: {
				slide: function(e,ui) {
					//alert(ui.value);
					readMapLocal(ui.value);
					$(this).find('.ui-slider-tooltip .ttContent').text($('select#wdates2 option').eq(ui.values[0]).text());
				}
			}

		}).hide();





});


  function submitsearch(aObj){
	//alert(aObj);
	//return false;
  }
