var selectors = {".themeDefault > img":"default", ".themeLarge > img":"large"};

$(document).ready( function() {
	jQuery.each(selectors, function (selector, title) {

		$("" + selector + "").click(function(){
			jQuery.each(selectors, function (selector, title) {
				var str = $("" + selector + "").attr("src").replace("_active.gif", "_inactive.gif");
				$("" + selector + "").attr("src", str);
			});
			
			cssSwitcher.switchCSS('fontSize', title, true);

			var str = $(this).attr("src").replace("_inactive.gif", "_active.gif");
			$(this).attr("src", str);
		});

		$("" + selector + "").hover(
			function () {
				var str = $(this).attr("src").replace("_inactive.gif", "_active.gif");
				$(this).attr("src", str);
			},
			function () {
				var currentTitle = cssSwitcher.getCurrentCSSTitle('fontSize');
				if (currentTitle != title) {
					var str = $(this).attr("src").replace("_active.gif", "_inactive.gif");
					$(this).attr("src", str);
				}
			}
		);
		
		var currentTitle = cssSwitcher.getCurrentCSSTitle('fontSize');
		if (currentTitle == title) {
			var str = $("" + selector + "").attr("src");
			str = str.replace("_inactive.gif", "_active.gif");
			$("" + selector + "").attr("src", str);
		}
	});
});
