jQuery.noConflict();
var j$ = jQuery;


// General purpose

var overImg = '_over';
var ua = navigator.userAgent;
if(ua.indexOf("MSIE") != -1 && ua.indexOf("6.0") != -1) {
	var ie6 = true;
}
j$(function(){
	j$('.png').each(function(){
		var classes = j$(this).attr("class");
		if(classes.indexOf("rollover") != -1) {
			var imgout = j$(this).attr("src");
			var imgovr = imgout.replace('.png', overImg+'.png');
			if(ie6 && IEPNGFIX) {
				IEPNGFIX.hover(this, imgovr);
			}else{
				j$(this).hover(
					function(){ j$(this).attr("src", imgovr); },
					function(){ j$(this).attr("src", imgout); }
				);
			}
		} else {
			IEPNGFIX.fix(this);
		}
	});
	j$('.rollover').each(function(){
		var classes = j$(this).attr("class");
		if(classes.indexOf("png") == -1) {
			var imgout = j$(this).attr("src");
			var imgovr = imgout.replace('.gif', overImg+'.gif').replace('.jpg', overImg+'.jpg').replace('.png', overImg+'.png');
			j$(this).hover(
				function(){ j$(this).attr("src", imgovr); },
				function(){ j$(this).attr("src", imgout); }
			);
		}
	});
});

//ポップアップ
function popupWin(className,winName,winWidth,winHeight){
	j$('.' + className).click(function(){
		var _winWidth = 'width=' + winWidth;
		var _winHeight = 'height=' + winHeight;
		var w = window.open(this.href, winName, _winWidth + ',' + _winHeight + ', menubar=no, toolbar=no, resizable=yes, scrollbars=yes');
		w.focus();
		return false;
	});
}


//実行
j$(function(){
	new popupWin('popup','payment',630,600);
});
