/* <![CDATA[ */
// default text for search
var searchtext = "Search The Advertising Blog";
// when the DOM is ready
$(document).ready( function(){
	if (document.getElementById('searchform')) {
	var searchform = document.getElementById('searchform');
	// set the text in the email field to our default text
	searchform.s.value=searchtext;
	// if field is default text clear it out, otherwise leave it
	$('input#s').focus( function(){
		if(searchform.s.value==searchtext){
			searchform.s.value='';
		}
	});
	// if it is empty put the default text
	$('input#s').blur( function(){
		if(searchform.s.value==''){
			searchform.s.value=searchtext;
		}
	});
	// remove default text on submit
	$('form#searchform').submit( function(){
		if(searchform.s.value==searchtext){
			searchform.s.value='';
		}
	});
	}
	
});
/* ]]> */

/* use jquery to insert a 'print this' link inside every occurrence of class="printThis" */
function printThis() {
	$(".printThis").append('<a href="javascript:window.print();">Print this</a>');
}
/* end jquery print function */


/* functions to call when the page is loaded */
$(document).ready(function(){
  $('#geotrustExplanation').jqm(); // geotrust "what is this"
  //printThis(); // add print link inside anything with class="printThis"
  //window.focus();
  $('A[rel="external"]').click( function() {
        window.open( $(this).attr('href') );
        return false;
    });

});

/* end functions to call when the page is loaded */