
  
var $j = jQuery.noConflict(); 
	
$j(document).ready(function() {
		
		$j.ajax({
			url: 'getweather.php',
			type: 'post',
			data: {country: '33180'},
			dataType: 'json',
	 		success: function(data) {
	    	$j('div#weather_clock ul li.miami').html('Miami ' + data.temp[0] + '&deg;');
	  		}
		});
		$j.ajax({
			url: 'getweather.php',
			type: 'post',
			data: {country: 'Bogota'},
			dataType: 'json',
	 		success: function(data) {
	    	$j('div#weather_clock ul li.bogota').html('Bogota ' + data.temp[0] + '&deg;');
	  		}
		});

});

var currentTime = new Date()
  var hours = currentTime.getHours()
  var minutes = currentTime.getMinutes()

  var suffix = "AM";
  if (hours >= 12) {
  suffix = "PM";
  hours = hours - 12;
  }
  if (hours == 0) {
  hours = 12;
  }

  if (minutes < 10)
  minutes = "0" + minutes
  
$j(document).ready(function() {
	$j('div#weather_clock ul li.time').html("<b>" + hours + ":" + minutes + " " + suffix + "</b>");

	$j('#slider').cycle({ 
    	fx:     'scrollHorz',
		speed:  500, 
		timeout:  4000,
    	next:   'a.forward', 
    	prev:   'a.back',
    	pause: 1 
		
	});
	
	$j('ul li a.pause').click(function() { 
   		$j('#slider').cycle('pause');
   		return false;
	});
	$j('ul li a.play').click(function() { 
   		$j('#slider').cycle('resume');
   		return false;
	});	
});
	
