$(document).ready(function(){

	// 'populate' input field plugin from: http://theandystratton.com/examples/jquery/populate/
	$.fn.populate = function ( user_options ) {
		var defaults = {}, settings = $.extend({}, defaults, user_options);
		this.each(function(){
			var $this = $(this);
			var title = this.title;
			var color = $this.css('color');
			if ( $this.val() == '' || $this.val() == title ) {
				$this.val(title);
				if ( settings.color != '' ) {
					$this.css('color', settings.color);
				}
			}
			$this.blur(function(){
				if ( $this.val() == '' ) {
					$this.val(title);
					if ( settings.color != '' ) {
						$this.css('color', settings.color);
					}
				}
			});
			$this.focus(function(){
				if ( $this.val() == title ) {
					$this.val('');
					$this.css('color', color);
				}
			});
				
		});
		return this;
	}
	// initialize the populate plugin
	$(".populate").populate({
		color: "#999"
	});


	// open external links in new window
	$("a[href*='http://']:not([href*='"+location.hostname+"'])").attr("target","_blank");
	// $("form[action*='http://']:not([href*='"+location.hostname+"'])").attr("target","_blank");
	$('targetBlank').attr("target","_blank");
	

	
});