$('head').append( '<link rel="stylesheet" type="text/css" href="css/screen_photographers.css" media="all" />' );
$('head').append( '<link rel="stylesheet" type="text/css" href="css/print_photographers.css" media="print" />' );

$( document ).ready ( function () {
	$( "a#alphaSpan" ).click ( function () {
		location.search = "?pg=photographers&part=photographers";
	});

	$( "a#booksSpan" ).click ( function () {
		location.search = "?pg=photographers&part=books";
	});

	$( "a#groupSpan" ).click ( function () {
		location.search = "?pg=photographers&part=categories";
	});

	$( "a#keywordSpan" ).click ( function () {
		location.search = "?pg=photographers&part=keywords";
	});

	switch ( $( "#part" ).val()) {
		case "photographers":
			$( "#alphaSpan" ).addClass ( "noAnchor" );
			$( "#booksSpan" ).removeClass ( "noAnchor" );
			$( "#groupSpan" ).removeClass ( "noAnchor" );
			$( "#keywordSpan" ).removeClass ( "noAnchor" );
			break;
		case "books":
			$( "#alphaSpan" ).removeClass ( "noAnchor" );
			$( "#booksSpan" ).addClass ( "noAnchor" );
			$( "#groupSpan" ).removeClass ( "noAnchor" );
			$( "#keywordSpan" ).removeClass ( "noAnchor" );
			break;
		case "categories":
			$( "#alphaSpan" ).removeClass ( "noAnchor" );
			$( "#booksSpan" ).removeClass ( "noAnchor" );
			$( "#groupSpan" ).addClass ( "noAnchor" );
			$( "#keywordSpan" ).removeClass ( "noAnchor" );
			break;
		case "keywords":
			$( "#alphaSpan" ).removeClass ( "noAnchor" );
			$( "#booksSpan" ).removeClass ( "noAnchor" );
			$( "#groupSpan" ).removeClass ( "noAnchor" );
			$( "#keywordSpan" ).addClass ( "noAnchor" );
			$( ".checkboxes" ).attr ( "checked", "" );
			break;
	}
});

function _countPhotos () {
	xajax_countPhotos ( xajax.getFormValues ( 'keywordForm', false, 'cb_' ));
}
