// JavaScript Document

//Code to run at page load
  $(function() {
	//Header Objects
	$('#ProfessorsChoiceLink').click(function(){
		newWin = window.open('http://www.ProfessorsChoice.com/','nPWin','width=1024,height=768,scrollbars,resizable,menubar,status,toolbar,location');
		newWin.focus();
	});
	
	$('#MyCartLink').click(function(){
		location.href='../cart.cfm';
	});	
			 
    //Set up navigation items
	$('#nav').droppy({speed: 100});
	$('#NavHome').click(function(){location.href = '../index.cfm';});
	$('#NavBrowseByCourse').click(function(){location.href = '../BrowseByCourse.cfm';});
	$('#NavNewReleases').click(function(){location.href = '../NewReleases.cfm';});	
	$('#NavFutureReleases').click(function(){location.href = '../FutureReleases.cfm';});	
	$('#NavAuthors').click(function(){location.href = '../Authors.cfm';});	
	$('#NavAboutUs').click(function(){location.href = '../AboutUs.cfm';});	
	$('#NavEditorialReview').click(function(){location.href = '../EditorialReview.cfm';});		
	$('#NavContactUs').click(function(){location.href = '../ContactUs.cfm';});		
	
	//View Online Catalog
	$('#DownloadCatalogLink').click(function(){
		newWin = window.open('http://www.AnselmAcademic.org/Flash/Catalog.cfm','nPWin','width=1024,height=768,scrollbars,resizable,menubar,status,toolbar,location');
		newWin.focus();		
	});
	
	
  });
  
  
  
  function EnableInputTitleTip(){
		$('.txbhint').focus(function() {
		if ($(this).val() == "" || $(this).val() == $(this).attr('title')){
			$(this).val("").removeClass("hinted");
		}
	}).blur(function() {
		if ($(this).val() == "") {
			$(this).val($(this).attr('title')).addClass("hinted");
		}
	}).filter(function() {
		if ($(this).val() == "" || $(this).val() == $(this).attr('title')){
			$(this).val($(this).attr('title')).addClass("hinted");
		}
	});	
};

EnableInputTitleTip(); //RUN WHEN PAGE LOADS
