﻿var IE = document.all?true:false;
var debugIndex = 1;

if(location.protocol.search('https:')==-1){
	location.href = location.href.replace('http:', 'https:');
}

$(function() {
	$('img.btn_over').mouseover(function(){
		$(this).attr('src', $(this).attr('src').toString().replace('.g','_over.g').replace('.j','_over.j'));
    }).mouseout(function(){
		$(this).attr('src', $(this).attr('src').toString().replace('_over.g','.g').replace('_over.j','.j'));
    });
	$('.keyCheck').each(function(){
		$(this).bind('keyup', function(e){keyCheck(this, e, 'up')}).bind('keypress', function(e){keyCheck(this, e, 'press')});
	})
});

function debug(str){
	if($('#debugDIV').length==0){
		$("body").append('<div id="debugDIV" style="position:absolute; top: 100px; left: 100px; padding: 5px; background: #090; color: #900; z-index: 10000;"></div>');
	}
	$('#debugDIV').html('Debug ID: ' + (debugIndex++)+ '\r\n' + str);
}