$(document).ready(function () {
	$('#viewThree').hover(
		function () {
			$('#viewThree').addClass('hov');
		},
		function () {
			$('#viewThree').removeClass('hov');
		}
	);
	
	$('#viewFour').hover(
		function () {
			$('#viewFour').addClass('hov');
		},
		function () {
			$('#viewFour').removeClass('hov');
		}
	);

	$('#rssReader').click(function () {
		$('#rssReader').toggleClass("on");
		if($('#readerMenu').css("display") == "block") {
			$('#readerMenu').css("display", "none");
		}
		else {
			$('#readerMenu').css("display", "block");
		}
	});

	if(typeof(proAdIDs) != 'undefined' && proAdIDs != '') {
		$.ajax({
			url: '/proAd/proAdHits.php',
			type: 'POST',
			data: 'page=listingSearch&type=impression&proAdIDs='+proAdIDs,
			dataType: 'html',
			success: function() {
			},
			error: function(data, textStatus) {
			}
		});
	}

	$('a.proAdExtLink').click(function() {
		var proAdID = $(this).attr('rel');
		$.ajax({
			url: '/proAd/proAdHits.php',
			type: 'POST',
			data: 'page=listingSearch&type=urlclick&proAdIDs='+proAdID,
			dataType: 'html',
			success: function() {
				return true;
			},
			error: function(data, textStatus) {
				return true;
			}
		});
		return false;
	});

	/*
	Turning off hovers in IE6 since they have a twitch
	$('.listingFeat').hover(
		function() {
			$(this).addClass('listingFeatHov');
		},
		function() {
			$(this).removeClass('listingFeatHov');
		}
	);

	$('.listing').hover(
		function() {
			$(this).addClass('listingHov');
		},
		function() {
			$(this).removeClass('listingHov');
		}
	);
	*/
});
