/*@cc_on _d=document;eval('var document=_d')@*/
// コンフリクト回避設定
jQuery(function($) {

//pngfix
$(document).ready(function(){ 
     $(document).pngFix(); 
});


/* roll over ********************************************************* */
function initRollOverImages() {
  var image_cache = new Object();
  $("img.imgOn").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);
/* /roll over ******************************************************** */



$(document).ready(function(){


/* change page effect setting **************************************** */

$('#home #ctBase_in a, #others #ctBase_in a, #gallery #sideBar a, #gallery #bread a, #gallery h2 a, #others #ft a, #gallery #ft a').click(function () {
	$('#ctBase_in').fadeTo(700, 0.1).fadeTo(500,0.1).fadeTo(1000,1);
});

/* /change page effect setting *************************************** */



/* sideBar *********************************************************** */

$('.sideBox > h3').click(function () {
	$(this).next().animate({height: "toggle"}, 400, "swing");
});
$('#side_cambodia span').click(function () {
	$('#side_galleryList dd').animate({height: "toggle"}, 300, "swing");
});
$('#side_cambodia span').hover(
  function() { $(this).css("text-decoration", "underline"); },
  function() { $(this).css("text-decoration", "none"); }
);


/* /sideBar ********************************************************** */



/* #home ************************************************************* */

$("#home #firebird").animate({"top": "+=445px"}, 1400);
$('#home #ctBase_in').fadeTo(1400, 0).fadeTo(300, 0).fadeTo(800, 0.9);
$('#home #homeSlide').cycle({
	fx: 'scrollUp',
	timeout: 7000,
	delay: -2000
});

/* /#home ************************************************************ */



/* #others,#archives ************************************************** */

$('#others #ctBase_in,#archives #ctBase_in,,#categorys #ctBase_in').fadeTo(800, 0.9);

/* /#others,#archives ************************************************* */




/* #gallery *********************************************************** */

$('#gallery #ctBase_in').fadeTo(200, 0.9);

// redefine Cycle's updateActivePagerLink function
$.fn.cycle.updateActivePagerLink = function(pager, currSlideIndex) {
    $(pager).find('li').removeClass('activeLI')
        .filter('li:eq('+currSlideIndex+')').addClass('activeLI');
};

$(function() {
	  $('#gallery #pause').click(function() { $('#gallery #slides').cycle('pause'); return false; });
    $('#gallery #play').click(function() { $('#gallery #slides').cycle('resume'); return false; });
    
   
    $('#gallery #slideshow').hover(
        function() { $('#controls').animate({"left": "+=126px",opacity: 1}, 400); },
        function() { $('#controls').animate({"left": "-=126px",opacity: 0}, 400); }
    );
    
    
    $('#gallery #slides').cycle({
        timeout: 3000,
        pager: '#nav',
        next: '#next',
        prev: '#prev',
        pagerAnchorBuilder: function(idx, slide) {
            return '<li><a href="#"><img src="' + slide.src + '" width="40" height="40" /></a></li>';
        }/*,
        before: function() {  
            $('#caption').html(this.alt);
        }*/
    });
});

/* /#gallery *********************************************************** */


});


// コンフリクト回避設定を閉じる。
});





