//scroll
$('#header a').click(function(){
	$.scrollTo( $('#header'), {speed:1000,axis:'y', queue:true} );
	return false;
});
//rollover
function initRollOverImages() {
  var image_cache = new Object();
  $("img.swap").each(function(i) {
    var imgsrc = this.src;
    var dot = this.src.lastIndexOf('.');
    var imgsrc_on = this.src.substr(0, dot) + '_on' + this.src.substr(dot, 4);
    image_cache[this.src] = new Image();
    image_cache[this.src].src = imgsrc_on;
    $(this).hover(
      function() { this.src = imgsrc_on; },
      function() { this.src = imgsrc; });
  });
}

$(document).ready(initRollOverImages);

//searchbox
$(function() {
    swapValues = [];
    $(".swap_value").each(function(i){
        swapValues[i] = $(this).val();
        $(this).focus(function(){
            if ($(this).val() == swapValues[i]) {
                $(this).val("");
            }
        }).blur(function(){
            if ($.trim($(this).val()) == "") {
                $(this).val(swapValues[i]);
            }
        });
    });
});

//curve
$(function() {
  $("div.choice-title").corner("10px tl tr");
});
$(function() {
  $("div.adpr-title").corner("10px tl tr");
});
$(function() {
  $("div#area-title").corner("10px tl tr");
});
$(function() {
  $("div.kuchikomi-title").corner("10px tl tr");
});
$(function() {
  $("div.star-title").corner("10px tl tr");
});
$(function() {
  $("div#menu ul li h2").corner("10px tl tr");
});
$(function() {
  $("div#content #commentlist li").corner("10px");
});
$(function() {
  $("div.yet").corner("10px");
});
//form
$(document).ready(function(){
	$("#cform-title").click(function(){
	$(".cform-con:hidden").show("slow");
	});
});
//popup
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}