
	if(site_url != 'http://csshazard.com' || ajax_url != '/index.php') {
		var site_url = 'http://csshazard.com';
		var ajax_url = '/index.php';
	}
	var ratings_image = 'stars';
	var ratings_max = '5';
	var ratings_mouseover_image = new Image();
	ratings_mouseover_image.src = site_url + '/wp-content/plugins/postratings/images/' + ratings_image + '/rating_over.gif';

	col = 2;


function most_viewed_more() {
	$("#most-viewed").load(
		"http://csshazard.com/wp-content/themes/EasyAll/ajaxreturn.php?mode=mostviewed&num=100"
	);
}

imgzoom = function() {
	changesize();
	$(this.parentNode.parentNode).ScrollTo(500);
	this.blur();
	return false;
}

totop = function() {
	$("#top").ScrollTo(500);
	return false;
}



function changesize() {
		if (col == 2) {
			var $target = $("#siteimg_column2");
			var $p = $("img", $target);
			$p.filter(".simg");
			$p.each(function() {
				buf = $(this).attr("src");
				buf = buf.replace("_s.jpg", "_l.jpg");
				$(this).src(buf);
				$(this).width(472);
				$(this).height(374);
			});
			$target.attr("id", "siteimg_column1");
			col = 1;
		} else {
			var $target = $("#siteimg_column1");
			var $p = $("img", $target);
			$p.filter(".simg");
			$p.each(function() {
				buf = $(this).attr("src");
				buf = buf.replace("_l.jpg", "_s.jpg");
				$(this).src(buf);
				$(this).width(236);
				$(this).height(187);
			});
			$target.attr("id", "siteimg_column2");
			col = 2;
		}
}

//初期化関数
$(function(){

	$('a.imgzoom').click(imgzoom);
	$('a.totop').click(totop);
	$('#nav li').not(".current").hover(
		function () {
			$(this).background("#FF7FD5");
		},
		function () {
			$(this).background("none");
		}
	);
	
	//simgうすく
	var $simg = $("#content1 .simg");
	$simg.hover(
		function() {
			$(this).fadeTo("fast", 0.7);
		},
		function() {
			$(this).fadeTo("normal", 1);
		}
	);

	//module-list
	/*
	var $ml = $("#content2 ul").not(".noactive");
	$ml.hover (
		function() {
			$(this).addClass("active");
		},
		function() {
			$(this).removeClass("active");
		}
	);
	*/
	$("ul.module-list li:last-child").css("background", "none");


	
	//change size
	var $t = $(".tests");
	$t.click(function() {
		changesize();
		return false;
	});
	
});