$(document).ready(function(){
	$('a').each(function(){
		try{
			if($(this).attr('href').match(/png$|gif$|jpg$/i)){
				setNoReferer(this);
			}
		}catch(e){}
	});
	$(".side_category_list li span").each(function(ev) {
		var key=encodeURI($(this).text());
		if($.cookie(key)==1){
			$(this).next().css('display','block');
		}
	} );
	$(".side_category_list li span").click(function(ev) {
		var key=encodeURI($(this).text());
		if($.cookie(key)==1){
			$(this).next().slideUp('fast');
			$.cookie(key, 0, { expires: 7 });
		}else{
			$(this).next().slideDown('fast');
			$.cookie(key, 1, { expires: 7 });
		}
	} );


});
/*
window.onload = function(){
        var list = document.getElementsByTagName("A");
        for(var i=0; i<list.length; i++){
                setNoReferer(list[i]);
        }
}*/

function setNoReferer(a){
	var url = a.href;
	var IE = /*@cc_on!@*/false;
	if(navigator.userAgent.indexOf("MSIE") != -1){//IE専用
		a.href = 'javascript: (function(){location.href = "'+url+'";})();';
		//フレーム内のページは新しいウィンドウで開かないとリファラが消えないようなので強制的に新しいウィンドウで開く
		if(window.parent != window.self) a.target = '_blank';
	}else{//Firefox、Opera、Safari
		var html = '<html><head><script type="text/javascript"><!--\n'
				+ 'document.write(\'<meta http-equiv="refresh" content="0;url='+url+'">\');'
				+ '// --><'+'/script></head><body></body></html>';
		a.href = 'data:text/html;charset=utf-8,'+encodeURIComponent(html);
	}
}
function opn(data){
	
}
