/* <![CDATA[ */
function blankTargetFix(){
  if(!document.getElementsByTagName){
    return;
  }

  var anchors = document.getElementsByTagName("a");

  for(var i = 0; i < anchors.length; i++){
    var anchor = anchors[i];

    if(anchor.getAttribute("href") && anchor.getAttribute("rel") == "external"){
      anchor.target = "_blank";
    }
  }
}
//Datepicker
  $(document).ready(function() {
    $("#datepicker").datepicker();
  });

//simpleWeather - -- - - -- 
	$(function() {
			$.simpleWeather({
							
				zipcode: '20525',
				//location: 'Washington, DC US 20525, USA',
				unit: 'f',
				success: function(weather) {
					$("#weather").append('<h2>'+weather.city+', '+weather.region+'</h2>');
					$("#weather").append('<p><strong>Today\'s High</strong>: '+weather.high+'&deg; '+weather.units.temp+' - <br class="clear"<strong>Today\'s Low</strong>: '+weather.low+'&deg; '+weather.units.temp+'</p>');
					$("#weather").append('<p><strong>Current Temp</strong>: '+weather.temp+'&deg; '+weather.units.temp+'</p>');
			
					$("#weather").append('<p><strong>Wind</strong>: '+weather.wind.direction+' '+weather.wind.speed+' '+weather.units.speed+' <strong>Wind Chill</strong>: '+weather.wind.chill+'</p>');
					$("#weather").append('<p><strong>Currently</strong>: '+weather.currently+' - <strong>Forecast</strong>: '+weather.forecast+'</p>');
					$("#weather").append('<p><img src="'+weather.image+'"></p><br class="clear"');
					$("#weather").append('<p><strong>Humidity</strong>: '+weather.humidity+' <strong>Pressure</strong>: '+weather.pressure+' <strong>Rising</strong>: '+weather.rising+' <strong>Visibility</strong>: '+weather.visibility+'</p>');
					$("#weather").append('<p><strong>Sunrise</strong>: '+weather.sunrise+' - <strong>Sunset</strong>: '+weather.sunset+'</p>');
					
					$("#weather").append('<p><a href="'+weather.link+'">View forecast at Yahoo! Weather</a></p>');
				},
				error: function(error) {
					$("#weather").html('<p>'+error+'</p>');
				}
			});
			
			$.simpleWeather({
				zipcode: '20006',
				//location: 'New York City, New York',
				unit: 'f',
				success: function(weather) {
					$("#weather2").append('<h2>'+weather.city+', '+weather.region+'</h2>');
					$("#weather2").append('<img style="float:left;" width="125px" src="'+weather.image+'">');
					$("#weather2").append('<p>'+weather.temp+'&deg; '+weather.units.temp+'<br /><span>'+weather.currently+'</span></p>');
					$("#weather2").append('<a href="'+weather.link+'">View Forecast &raquo;</a>');
				},
				error: function(error) {
					$("#weather2").html('<p>'+error+'</p>');
				}
			});
		});

/* ]]> */
