$(document).ready(function() {
	// max number of results
	$("#max_results").change(function() {
		$("#max_form").submit();
	});
	
	/* swap the search field types */
	$("#type").change(function() {
		$("#search_string, #search_collection_category").hide();
		
		if ($(this).val() == "industry")
			$("#search_collection_category").show();
		else
			$("#search_string").show();
	});
	
	/* convert all rel links into popup windows */
	$('a[rel=new]').click(function() {
		window.open($(this).attr('href'));
        return false;
	});
	
	$('a[rel=player]').live("click", function() {
		window.open($(this).attr('href'), 'eventPlayer', 'resizable=yes,scrollbars=yes,height=650,width=780');
        return false;
	});
	
	  
	
	
});
