//
//
//*********************************************************************************************************************************************** common.js
//
//


//
//
//*********************************************************************************************************************************************** thickbox/thickbox.js
//
//
/*
 * Thickbox 3.1 - One Box To Rule Them All.
 * By Cody Lindley (http://www.codylindley.com)
 * Copyright (c) 2007 cody lindley
 * Licensed under the MIT License: http://www.opensource.org/licenses/mit-license.php
*/
          
var tb_pathToImage = "/kanri/img/common/script/js/jquery/plugins/thickbox/loading_animation.gif";

/*!!!!!!!!!!!!!!!!! edit below this line at your own risk !!!!!!!!!!!!!!!!!!!!!!!*/

//on page load call tb_init
j$(document).ready(function(){   
    tb_init('a.thickbox, area.thickbox, input.thickbox');//pass where to apply thickbox
    imgLoader = new Image();// preload image
    imgLoader.src = tb_pathToImage;
});

//add thickbox to href & area elements that have a class of .thickbox
function tb_init(domChunk){
    j$(domChunk).click(function(){
    var t = this.title || this.name || null;
    var a = this.href || this.alt;
    var g = this.rel || false;
    tb_show(t,a,g);
    this.blur();
    return false;
    });
}

function tb_show(caption, url, imageGroup) {//function called when the user clicks on a thickbox link

    try {
        if (typeof document.body.style.maxHeight === "undefined") {//if IE 6
            j$("body","html").css({height: "100%", width: "100%"});
            j$("html").css("overflow","hidden");
            if (document.getElementById("TB_HideSelect") === null) {//iframe to hide select elements in ie6
                j$("body").append("<iframe id='TB_HideSelect'></iframe><div id='TB_overlay'></div><div id='TB_window'></div>");
                j$("#TB_overlay").click(tb_remove);
            }
        }else{//all others
            if(document.getElementById("TB_overlay") === null){
                j$("body").append("<div id='TB_overlay'></div><div id='TB_window'></div>");
                j$("#TB_overlay").click(tb_remove);
            }
        }
        
        if(tb_detectMacXFF()){
            j$("#TB_overlay").addClass("TB_overlayMacFFBGHack");//use png overlay so hide flash
        }else{
            j$("#TB_overlay").addClass("TB_overlayBG");//use background and opacity
        }
        
        if(caption===null){caption="";}
        j$("body").append("<div id='TB_load'><img src='"+imgLoader.src+"' /></div>");//add loader to the page
        j$('#TB_load').show();//show loader
        
        var baseURL;
       if(url.indexOf("?")!==-1){ //ff there is a query string involved
            baseURL = url.substr(0, url.indexOf("?"));
       }else{ 
            baseURL = url;
       }
       
       var urlString = /\.jpgj$|\.jpegj$|\.pngj$|\.gifj$|\.bmpj$/;
       var urlType = baseURL.toLowerCase().match(urlString);

        if(urlType == '.jpg' || urlType == '.jpeg' || urlType == '.png' || urlType == '.gif' || urlType == '.bmp'){//code to show images
                
            TB_PrevCaption = "";
            TB_PrevURL = "";
            TB_PrevHTML = "";
            TB_NextCaption = "";
            TB_NextURL = "";
            TB_NextHTML = "";
            TB_imageCount = "";
            TB_FoundURL = false;
            if(imageGroup){
                TB_TempArray = j$("a[@rel="+imageGroup+"]").get();
                for (TB_Counter = 0; ((TB_Counter < TB_TempArray.length) && (TB_NextHTML === "")); TB_Counter++) {
                    var urlTypeTemp = TB_TempArray[TB_Counter].href.toLowerCase().match(urlString);
                        if (!(TB_TempArray[TB_Counter].href == url)) {                      
                            if (TB_FoundURL) {
                                TB_NextCaption = TB_TempArray[TB_Counter].title;
                                TB_NextURL = TB_TempArray[TB_Counter].href;
                                TB_NextHTML = "<span id='TB_next'>??<a href='#'>Next ></a></span>";
                            } else {
                                TB_PrevCaption = TB_TempArray[TB_Counter].title;
                                TB_PrevURL = TB_TempArray[TB_Counter].href;
                                TB_PrevHTML = "<span id='TB_prev'>??<a href='#'>< Prev</a></span>";
                            }
                        } else {
                            TB_FoundURL = true;
                            TB_imageCount = "Image " + (TB_Counter + 1) +" of "+ (TB_TempArray.length);                                         
                        }
                }
            }

            imgPreloader = new Image();
            imgPreloader.onload = function(){       
            imgPreloader.onload = null;
                
            // Resizing large images - orginal by Christian Montoya edited by me.
            var pagesize = tb_getPageSize();
            var x = pagesize[0] - 150;
            var y = pagesize[1] - 150;
            var imageWidth = imgPreloader.width;
            var imageHeight = imgPreloader.height;
            if (imageWidth > x) {
                imageHeight = imageHeight * (x / imageWidth); 
                imageWidth = x; 
                if (imageHeight > y) { 
                    imageWidth = imageWidth * (y / imageHeight); 
                    imageHeight = y; 
                }
            } else if (imageHeight > y) { 
                imageWidth = imageWidth * (y / imageHeight); 
                imageHeight = y; 
                if (imageWidth > x) { 
                    imageHeight = imageHeight * (x / imageWidth); 
                    imageWidth = x;
                }
            }
            // End Resizing
            
            TB_WIDTH = imageWidth + 30;
            TB_HEIGHT = imageHeight + 60;
            j$("#TB_window").append("<a href='' id='TB_ImageOff' title='Close'><img id='TB_Image' src='"+url+"' width='"+imageWidth+"' height='"+imageHeight+"' alt='"+caption+"'/></a>" + "<div id='TB_caption'>"+caption+"<div id='TB_secondLine'>" + TB_imageCount + TB_PrevHTML + TB_NextHTML + "</div></div><div id='TB_closeWindow'><a href='#' id='TB_closeWindowButton' title='Close'><img src='http://img.his-j.com/common/script/js/jquery/plugins/thickbox/btn_close.gif' alt='閉じる' /></a></div>");       
            
            j$("#TB_closeWindowButton").click(tb_remove);
            
            if (!(TB_PrevHTML === "")) {
                function goPrev(){
                    if(j$(document).unbind("click",goPrev)){j$(document).unbind("click",goPrev);}
                    j$("#TB_window").remove();
                    j$("body").append("<div id='TB_window'></div>");
                    tb_show(TB_PrevCaption, TB_PrevURL, imageGroup);
                    return false;   
                }
                j$("#TB_prev").click(goPrev);
            }
            
            if (!(TB_NextHTML === "")) {        
                function goNext(){
                    j$("#TB_window").remove();
                    j$("body").append("<div id='TB_window'></div>");
                    tb_show(TB_NextCaption, TB_NextURL, imageGroup);                
                    return false;   
                }
                j$("#TB_next").click(goNext);
                
            }

            document.onkeydown = function(e){   
                if (e == null) { // ie
                    keycode = event.keyCode;
                } else { // mozilla
                    keycode = e.which;
                }
                if(keycode == 27){ // close
                    tb_remove();
                } else if(keycode == 190){ // display previous image
                    if(!(TB_NextHTML == "")){
                        document.onkeydown = "";
                        goNext();
                    }
                } else if(keycode == 188){ // display next image
                    if(!(TB_PrevHTML == "")){
                        document.onkeydown = "";
                        goPrev();
                    }
                }   
            };
            
            tb_position();
            j$("#TB_load").remove();
            j$("#TB_ImageOff").click(tb_remove);
            j$("#TB_window").css({display:"block"}); //for safari using css instead of show
            };
            
            imgPreloader.src = url;
        }else{//code to show html
            
            var queryString = url.replace(/^[^\?]+\??/,'');
            var params = tb_parseQuery( queryString );

            TB_WIDTH = (params['width']*1) + 30 || 630; //defaults to 630 if no paramaters were added to URL
            TB_HEIGHT = (params['height']*1) + 40 || 440; //defaults to 440 if no paramaters were added to URL
            ajaxContentW = TB_WIDTH - 30;
            ajaxContentH = TB_HEIGHT - 40;
            
            if(url.indexOf('TB_iframe') != -1){// either iframe or ajax window      
                    urlNoQuery = url.split('TB_');
                    j$("#TB_iframeContent").remove();
                    if(params['modal'] != "true"){//iframe no modal
                        j$("#TB_window").append("<div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton' title='Close'><img src='http://img.his-j.com/common/script/js/jquery/plugins/thickbox/btn_close.gif' alt='閉じる' /></a></div><iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW + 29)+"px;height:"+(ajaxContentH + 17)+"px;' > </iframe>");
                    }else{//iframe modal
                    j$("#TB_overlay").unbind();
                        j$("#TB_window").append("<iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW + 29)+"px;height:"+(ajaxContentH + 17)+"px;'> </iframe>");
                    }
            }else{// not an iframe, ajax
                    if(j$("#TB_window").css("display") != "block"){
                        if(params['modal'] != "true"){//ajax no modal
                        j$("#TB_window").append("<div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton'><img src='http://img.his-j.com/common/script/js/jquery/plugins/thickbox/btn_close.gif' alt='閉じる' /></a></div><div id='TB_ajaxContent' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px'></div>");
                        }else{//ajax modal
                        j$("#TB_overlay").unbind();
                        j$("#TB_window").append("<div id='TB_ajaxContent' class='TB_modal' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px;'></div>"); 
                        }
                    }else{//this means the window is already up, we are just loading new content via ajax
                        j$("#TB_ajaxContent")[0].style.width = ajaxContentW +"px";
                        j$("#TB_ajaxContent")[0].style.height = ajaxContentH +"px";
                        j$("#TB_ajaxContent")[0].scrollTop = 0;
                        j$("#TB_ajaxWindowTitle").html(caption);
                    }
            }
                    
            j$("#TB_closeWindowButton").click(tb_remove);
            
                if(url.indexOf('TB_inline') != -1){ 
                    j$("#TB_ajaxContent").append(j$('#' + params['inlineId']).children());
                    j$("#TB_window").unload(function () {
                        j$('#' + params['inlineId']).append( j$("#TB_ajaxContent").children() ); // move elements back when you're finished
                    });
                    tb_position();
                    j$("#TB_load").remove();
                    j$("#TB_window").css({display:"block"}); 
                }else if(url.indexOf('TB_iframe') != -1){
                    tb_position();
                    if(j$.browser.safari){//safari needs help because it will not fire iframe onload
                        j$("#TB_load").remove();
                        j$("#TB_window").css({display:"block"});
                    }
                }else{
                    j$("#TB_ajaxContent").load(url += "&random=" + (new Date().getTime()),function(){//to do a post change this load method
                        tb_position();
                        j$("#TB_load").remove();
                        tb_init("#TB_ajaxContent a.thickbox");
                        j$("#TB_window").css({display:"block"});
                    });
                }
            
        }

        if(!params['modal']){
            document.onkeyup = function(e){     
                if (e == null) { // ie
                    keycode = event.keyCode;
                } else { // mozilla
                    keycode = e.which;
                }
                if(keycode == 27){ // close
                    tb_remove();
                }   
            };
        }
        
    } catch(e) {
        //nothing here
    }
}

//helper functions below
function tb_showIframe(){
    j$("#TB_load").remove();
    j$("#TB_window").css({display:"block"});
}

function tb_remove() {
    j$("#TB_imageOff").unbind("click");
    j$("#TB_closeWindowButton").unbind("click");
    j$("#TB_window").fadeOut("fast",function(){j$('#TB_window,#TB_overlay,#TB_HideSelect').trigger("unload").unbind().remove();});
    j$("#TB_load").remove();
    if (typeof document.body.style.maxHeight == "undefined") {//if IE 6
        j$("body","html").css({height: "auto", width: "auto"});
        j$("html").css("overflow","");
    }
    document.onkeydown = "";
    document.onkeyup = "";
    return false;
}

function tb_position() {
j$("#TB_window").css({marginLeft: '-' + parseInt((TB_WIDTH / 2),10) + 'px', width: (TB_WIDTH + 10) + 'px'});
    if ( !(jQuery.browser.msie && jQuery.browser.version < 7)) { // take away IE6
        j$("#TB_window").css({marginTop: '-' + parseInt((TB_HEIGHT / 2),10) + 'px'});
    }
}

function tb_parseQuery ( query ) {
   var Params = {};
   if ( ! query ) {return Params;}// return empty object
   var Pairs = query.split(/[;&]/);
   for ( var i = 0; i < Pairs.length; i++ ) {
      var KeyVal = Pairs[i].split('=');
      if ( ! KeyVal || KeyVal.length != 2 ) {continue;}
      var key = unescape( KeyVal[0] );
      var val = unescape( KeyVal[1] );
      val = val.replace(/\+/g, ' ');
      Params[key] = val;
   }
   return Params;
}

function tb_getPageSize(){
    var de = document.documentElement;
    var w = window.innerWidth || self.innerWidth || (de&&de.clientWidth) || document.body.clientWidth;
    var h = window.innerHeight || self.innerHeight || (de&&de.clientHeight) || document.body.clientHeight;
    arrayPageSize = [w,h];
    return arrayPageSize;
}

function tb_detectMacXFF() {
  var userAgent = navigator.userAgent.toLowerCase();
  if (userAgent.indexOf('mac') != -1 && userAgent.indexOf('firefox')!=-1) {
    return true;
  }
}


//
//
//*********************************************************************************************************************************************** updn_watermark.js

//k start
function qinpInit() {
	j$('input:text[title]').each(function() {
			var qinp = j$(this);
			var title = qinp.attr('title');
			if(qinp.val() === '' || qinp.val() === title) {
					qinp.val(title).addClass('vempty').css({"color" : "#999"});
			}
			
			qinp.focus(function() {
					if(qinp.val() === title) {
							qinp.val('').removeClass('vempty');
							qinp.css({"color" : "#000"});
					}
			});
	
			qinp.blur(function() {
					if(qinp.val() === '') {
							qinp.val(title).addClass('vempty');
							qinp.css({"color" : "#999"});
					}
			});
	});
}
function qinpReset() {
		j$('input:text.vempty').val('').removeClass('vempty');
}
j$(document).ready( function() { qinpInit(); } );
//k end

//
//
//*********************************************************************************************************************************************** idTabs.js
//
//
/* idTabs ~ Sean Catchpole - Version 2.2 - MIT/GPL */
(function(){var dep={"jQuery":"http://code.jquery.com/jquery-latest.min.js"};var init=function(){(function(j$){j$.fn.idTabs=function(){var s={};for(var i=0;i<arguments.length;++i){var a=arguments[i];switch(a.constructor){case Object:j$.extend(s,a);break;case Boolean:s.change=a;break;case Number:s.start=a;break;case Function:s.click=a;break;case String:if(a.charAt(0)=='.')s.selected=a;else if(a.charAt(0)=='!')s.event=a;else s.start=a;break;}}
if(typeof s['return']=="function")
s.change=s['return'];return this.each(function(){j$.idTabs(this,s);});}
j$.idTabs=function(tabs,options){var meta=(j$.metadata)?j$(tabs).metadata():{};var s=j$.extend({},j$.idTabs.settings,meta,options);if(s.selected.charAt(0)=='.')s.selected=s.selected.substr(1);if(s.event.charAt(0)=='!')s.event=s.event.substr(1);if(s.start==null)s.start=-1;var showId=function(){if(j$(this).is('.'+s.selected))
return s.change;var id="#"+this.href.split('#')[1];var aList=[];var idList=[];j$("a",tabs).each(function(){if(this.href.match(/#/)){aList.push(this);idList.push("#"+this.href.split('#')[1]);}});if(s.click&&!s.click.apply(this,[id,idList,tabs,s]))return s.change;for(i in aList)j$(aList[i]).removeClass(s.selected);for(i in idList)j$(idList[i]).hide();j$(this).addClass(s.selected);j$(id).show();return s.change;}
var list=j$("a[href*='#']",tabs).unbind(s.event,showId).bind(s.event,showId);list.each(function(){j$("#"+this.href.split('#')[1]).hide();});var test=false;if((test=list.filter('.'+s.selected)).length);else if(typeof s.start=="number"&&(test=list.eq(s.start)).length);else if(typeof s.start=="string"&&(test=list.filter("[href*='#"+s.start+"']")).length);if(test){test.removeClass(s.selected);test.trigger(s.event);}
return s;}
j$.idTabs.settings={start:0,change:false,click:null,selected:".active",event:"!click"};j$.idTabs.version="2.2";j$(function(){j$(".tabNav").idTabs();});})(jQuery);}
var check=function(o,s){s=s.split('.');while(o&&s.length)o=o[s.shift()];return o;}
var head=document.getElementsByTagName("head")[0];var add=function(url){var s=document.createElement("script");s.type="text/javascript";s.src=url;head.appendChild(s);}
var s=document.getElementsByTagName('script');var src=s[s.length-1].src;var ok=true;for(d in dep){if(check(this,d))continue;ok=false;add(dep[d]);}if(ok)return init();add(src);})();


//
//
//**************************************************************************************************************************************** galleryview/jquery.galleryview.js
//
//
/*

    GalleryView - jQuery Content Gallery Plugin
    Author:         Jack Anderson
    Version:        1.1 (April 5, 2009)
    Documentation:  http://www.spaceforaname.com/jquery/galleryview/
    
    Please use this development script if you intend to make changes to the
    plugin code.  For production sites, please use jquery.galleryview-1.0.1-pack.js.
    
*/
(function(j$){
    j$.fn.galleryView = function(options) {
        var opts = j$.extend(j$.fn.galleryView.defaults,options);
        
        var id;
        var iterator = 0;
        var gallery_width;
        var gallery_height;
        var frame_margin = 5;
        var strip_width;
        var wrapper_width;
        var item_count = 0;
        var slide_method;
        var img_path = 'http://www.his-j.com/common/script/js/jquery/plugins/galleryview/themes/';
        var paused = false;
        var frame_caption_size = 20;
        var frame_margin_top = 5;
        var pointer_width = 2;
        
        //Define jQuery objects for reuse
        var j_gallery;
        var j_filmstrip;
        var j_frames;
        var j_panels;
        var j_pointer;
        
/************************************************/
/*  Plugin Methods                              */
/************************************************/  
        function showItem(i) {
            //Disable next/prev buttons until transition is complete
            j$('img.nav-next').unbind('click');
            j$('img.nav-prev').unbind('click');
            j_frames.unbind('click');
            // 広告コピーのスタイルを解除
            setStripCaptionBold(false, i);
            if(has_panels) {
                if(opts.fade_panels) {
                    //Fade out all panels and fade in target panel
                    j_panels.fadeOut(opts.transition_speed).eq(i%item_count).fadeIn(opts.transition_speed,function(){
                        if(!has_filmstrip) {
                            j$('img.nav-prev').click(showPrevItem);
                            j$('img.nav-next').click(showNextItem);      
                        }
                    });
                } 
            }
            
            if(has_filmstrip) {
                //Slide either pointer or filmstrip, depending on transition method
                if(slide_method=='strip') {
                    //Stop filmstrip if it's currently in motion
                    j_filmstrip.stop();
                    
                    //Determine distance between pointer (eventual destination) and target frame
                    var distance = getPos(j_frames[i]).left - (getPos(j_pointer[0]).left+2);
                    var leftstr = (distance>=0?'-=':'+=')+Math.abs(distance)+'px';
                    
                    //Animate filmstrip and slide target frame under pointer
                    //If target frame is a duplicate, jump back to 'original' frame
                    j_filmstrip.animate({
                        'left':leftstr
                    },opts.transition_speed,opts.easing,function(){
                        //Always ensure that there are a sufficient number of hidden frames on either
                        //side of the filmstrip to avoid empty frames
                        if(i>item_count) {
                            i = i%item_count;
                            iterator = i;
                            j_filmstrip.css('left','-'+((opts.frame_width+frame_margin)*i)+'px');
                        } else if (i<=(item_count-strip_size)) {
                            i = (i%item_count)+item_count;
                            iterator = i;
                            j_filmstrip.css('left','-'+((opts.frame_width+frame_margin)*i)+'px');
                        }
                        if(!opts.fade_panels) {
                            j_panels.hide().eq(i%item_count).show();
                        }
                        // アクティブな広告コピーを太字にする
                        setStripCaptionBold(true, i);
                        j$('img.nav-prev').click(showPrevItem);
                        j$('img.nav-next').click(showNextItem);
                        enableFrameClicking();
                    });
                } else if(slide_method=='pointer') {
                    //Stop pointer if it's currently in motion
                    j_pointer.stop();
                    //Get position of target frame
                    var pos = getPos(j_frames[i]);
                    //Slide the pointer over the target frame
                    j_pointer.animate({
                        'left':(pos.left-2+'px')
                    },opts.transition_speed,opts.easing,function(){ 
                        if(!opts.fade_panels) {
                            j_panels.hide().eq(i%item_count).show();
                        }   
                        j$('img.nav-prev').click(showPrevItem);
                        j$('img.nav-next').click(showNextItem);
                        enableFrameClicking();
                    });
                }
            
                if(j$('a',j_frames[i])[0]) {
                    j_pointer.unbind('click').click(function(){
                        var a = j$('a',j_frames[i]).eq(0);
                        if(a.attr('target')=='_blank') {window.open(a.attr('href'));}
                        else {location.href = a.attr('href');}
                    });
                }
            }
        };
        /**
         * アクティブな広告コピーのスタイルを切り変える
         * 
         * @param bool activate 太字にするかどうか。trueのとき太字
         * @param int  itemIndex アクティブなアイテムのインデックス(番号)。showItemの第1引数の値。
         */
        function setStripCaptionBold(activate, itemIndex)
        {
            var li = j$('ul.filmstrip li');
            if (activate) {
                // 太字、およびclass="active"を設定
                li.each(function(index){
                    // アクティブなアイテムのみ太字
                    if (index == itemIndex) {
                        j$(this).addClass('active');
                    }
                });
            } else {
                // 太字、class="active"を解除
                li.removeClass('active');
            }
        };
        function showNextItem() {
            j$(document).stopTime("transition");
            if(++iterator==j_frames.length) {iterator=0;}
            showItem(iterator);
            j$(document).everyTime(opts.transition_interval,"transition",function(){
                showNextItem();
            });
        };
        function showPrevItem() {
            j$(document).stopTime("transition");
            if(--iterator<0) {iterator = item_count-1;}
            //alert(iterator);
            showItem(iterator);
            j$(document).everyTime(opts.transition_interval,"transition",function(){
                showNextItem();
            });
        };
        function getPos(el) {
            var left = 0, top = 0;
            var el_id = el.id;
            if(el.offsetParent) {
                do {
                    left += el.offsetLeft;
                    top += el.offsetTop;
                } while(el = el.offsetParent);
            }
            //If we want the position of the gallery itself, return it
            if(el_id == id) {return {'left':left,'top':top};}
            //Otherwise, get position of element relative to gallery
            else {
                var gPos = getPos(j_gallery[0]);
                var gLeft = gPos.left;
                var gTop = gPos.top;
                
                return {'left':left-gLeft,'top':top-gTop};
            }
        };
        function enableFrameClicking() {
            j_frames.each(function(i){
                //If there isn't a link in this frame, set up frame to slide on click
                //Frames with links will handle themselves
                if(j$('a',this).length==0) {
                    j$(this).click(function(){
                        j$(document).stopTime("transition");
                        showItem(i);
                        iterator = i;
                        j$(document).everyTime(opts.transition_interval,"transition",function(){
                            showNextItem();
                        });
                    });
                }
            });
        };
        
        function buildPanels() {
            //If there are panel captions, add overlay divs
            if(j$('.panel-overlay').length>0) {j_panels.append('<div class="overlay"></div>');}
            
            if(!has_filmstrip) {
                //Add navigation buttons
                j$('<img />').addClass('nav-next').attr('src',img_path+opts.nav_theme+'/next.png').appendTo(j_gallery).css({
                    'position':'absolute',
                    'zIndex':'1100',
                    'cursor':'pointer',
                    'top':((opts.panel_height-22)/2)+'px',
                    'right':'10px',
                    'display':'none'
                }).click(showNextItem);
                j$('<img />').addClass('nav-prev').attr('src',img_path+opts.nav_theme+'/prev.png').appendTo(j_gallery).css({
                    'position':'absolute',
                    'zIndex':'1100',
                    'cursor':'pointer',
                    'top':((opts.panel_height-22)/2)+'px',
                    'left':'10px',
                    'display':'none'
                }).click(showPrevItem);
                
                j$('<img />').addClass('nav-overlay').attr('src',img_path+opts.nav_theme+'/panel-nav-next.png').appendTo(j_gallery).css({
                    'position':'absolute',
                    'zIndex':'1099',
                    'top':((opts.panel_height-22)/2)-10+'px',
                    'right':'0',
                    'display':'none'
                });
                
                j$('<img />').addClass('nav-overlay').attr('src',img_path+opts.nav_theme+'/panel-nav-prev.png').appendTo(j_gallery).css({
                    'position':'absolute',
                    'zIndex':'1099',
                    'top':((opts.panel_height-22)/2)-10+'px',
                    'left':'0',
                    'display':'none'
                });
            }
            j_panels.css({
                'width':(opts.panel_width-parseInt(j_panels.css('paddingLeft').split('px')[0],10)-parseInt(j_panels.css('paddingRight').split('px')[0],10))+'px',
                'height':(opts.panel_height-parseInt(j_panels.css('paddingTop').split('px')[0],10)-parseInt(j_panels.css('paddingBottom').split('px')[0],10))+'px',
                'position':'absolute',
                'top':(opts.filmstrip_position=='top'?(opts.frame_height+frame_margin_top+(opts.show_captions?frame_caption_size:frame_margin_top))+'px':'0px'),
                'left':'0px',
                'overflow':'hidden',
                'background':'white',
                'display':'none'
            });
            j$('.panel-overlay',j_panels).css({
                'position':'absolute',
                'zIndex':'999',
                'width':(opts.panel_width-20)+'px',
                'height':opts.overlay_height+'px',
                'top':(opts.overlay_position=='top'?'0':opts.panel_height-opts.overlay_height+'px'),
                'left':'0',
                'padding':'0 10px',
                'color':opts.overlay_text_color,
                'fontSize':opts.overlay_font_size
            });
            j$('.panel-overlay a',j_panels).css({
                'color':opts.overlay_text_color,
                'textDecoration':'underline',
                'fontWeight':'bold'
            });
            j$('.overlay',j_panels).css({
                'position':'absolute',
                'zIndex':'998',
                'width':opts.panel_width+'px',
                'height':opts.overlay_height+'px',
                'top':(opts.overlay_position=='top'?'0':opts.panel_height-opts.overlay_height+'px'),
                'left':'0',
                'background':opts.overlay_color,
                'opacity':opts.overlay_opacity
            });
            j$('.panel iframe',j_panels).css({
                'width':opts.panel_width+'px',
                'height':(opts.panel_height-opts.overlay_height)+'px',
                'border':'0'
            });
        };
        
        function buildFilmstrip() {
            //Add wrapper to filmstrip to hide extra frames
            j_filmstrip.wrap('<div class="strip_wrapper"></div>');
            if(slide_method=='strip') {
                j_frames.clone().appendTo(j_filmstrip);
                j_frames.clone().appendTo(j_filmstrip);
                j_frames = j$('li',j_filmstrip);
            }
            //If captions are enabled, add caption divs and fill with the image titles
            if(opts.show_captions) {
                j_frames.append('<div class="caption"></div>').each(function(i){
                    j$(this).find('.caption').html(j$(this).find('img').attr('title'));              
                });
            }
            
            j_filmstrip.css({
                'listStyle':'none',
                'margin':'0',
                'padding':'0',
                'width':strip_width+'px',
                'position':'absolute',
                'zIndex':'900',
                'top':'0',
                'left':'0',
                'height':(opts.frame_height+10)+'px',
                'background':opts.background_color
            });
            j_frames.css({
                'float':'left',
                'position':'relative',
                'height':opts.frame_height+'px',
                'zIndex':'901',
                'marginTop':frame_margin_top+'px',
                'marginBottom':'0px',
                'marginRight':frame_margin+'px',
                'padding':'0',
                'cursor':'pointer'
            });
            j$('img',j_frames).css({
                'border':'none'
            });
            j$('.strip_wrapper',j_gallery).css({
                'position':'absolute',
                'top':'216px',
                'left':'19px',
                'width':'707px',
                'height':(opts.frame_height+frame_margin_top+(opts.show_captions?frame_caption_size:frame_margin_top))+'px',
                'overflow':'hidden'
            });
            j$('.caption',j_gallery).css({
                'position':'absolute',
                'top':opts.frame_height+'px',
                'left':'0',
                'margin':'0',
                'width':opts.frame_width+'px',
                'padding':'0',
                'color':opts.caption_text_color,
                'textAlign':'center',
                'fontSize':'10px',
                'height':frame_caption_size+'px',
                
                'lineHeight':frame_caption_size+'px'
            });
            var pointer = j$('<div></div>');
            pointer.attr('id','pointer').appendTo(j_gallery).css({
                 'position':'absolute',
                 'zIndex':'1000',
                 'cursor':'pointer',
                 'top':getPos(j_frames[0]).top-(pointer_width/2)+'px',
                 'left':getPos(j_frames[0]).left-(pointer_width/2)+'px',
                 'height':opts.frame_height-pointer_width+'px',
                 'width':opts.frame_width-pointer_width+'px',
                 'border':'none'
            });
            j_pointer = j$('#pointer',j_gallery);
            if(has_panels) {
                var pointerArrow = j$('<img />');
                pointerArrow.attr('src',img_path+opts.nav_theme+'/pointer'+(opts.filmstrip_position=='top'?'-down':'')+'.png').appendTo(j$('#pointer')).css({
                    'display':'none',//***********************************************追加
                    'position':'absolute',
                    'zIndex':'1001',
                    'top':(opts.filmstrip_position=='bottom'?'-'+(10+pointer_width)+'px':opts.frame_height+'px'),
                    'left':((opts.frame_width/2)-10)+'px'
                });
            }
            
            //If the filmstrip is animating, move the strip to the middle third
            if(slide_method=='strip') {
                j_filmstrip.css('left','-'+((opts.frame_width+frame_margin)*item_count)+'px');
                iterator = item_count;
            }
            //If there's a link under the pointer, enable clicking on the pointer
            if(j$('a',j_frames[iterator])[0]) {
                j_pointer.click(function(){
                    var a = j$('a',j_frames[iterator]).eq(0);
                    if(a.attr('target')=='_blank') {window.open(a.attr('href'));}
                    else {location.href = a.attr('href');}
                });
            }
            
            //Add navigation buttons
            j$('<img />').addClass('nav-next').attr('src',img_path+opts.nav_theme+'/next.png').appendTo(j_gallery).css({
                'position':'absolute',
                'cursor':'pointer',
                'top':'217px',//***********************************************変更
                'right':'1px'//***********************************************変更
            }).click(showNextItem);
            j$('<img />').addClass('nav-prev').attr('src',img_path+opts.nav_theme+'/prev.png').appendTo(j_gallery).css({
                'position':'absolute',
                'cursor':'pointer',
                'top':'217px',//***********************************************変更
                'left':'1px'//***********************************************変更
            }).click(showPrevItem);
        };
        
        //Check mouse to see if it is within the borders of the panel
        //More reliable than 'mouseover' event when elements overlay the panel
        function mouseIsOverPanels(x,y) {       
            var pos = getPos(j_gallery[0]);
            var top = pos.top;
            var left = pos.left;
            return x > left && x < left+opts.panel_width && y > top && y < top+opts.panel_height;               
        };
        
/************************************************/
/*  Main Plugin Code                            */
/************************************************/
        return this.each(function() {
            j_gallery = j$(this);
            //Determine path between current page and filmstrip images
            //Scan script tags and look for path to GalleryView plugin
            j$('script').each(function(i){
                var s = j$(this);
                if(s.attr('src') && s.attr('src').match(/jquery\.galleryview/)){
                    img_path = s.attr('src').split('jquery.galleryview')[0]+'themes/';  
                }
            });
            
            //Hide gallery to prevent Flash of Unstyled Content (FoUC) in IE
            j_gallery.css('visibility','hidden');
            
            //Assign elements to variables for reuse
            j_filmstrip = j$('.filmstrip',j_gallery);
            j_frames = j$('li',j_filmstrip);
            j_panels = j$('.panel',j_gallery);
            
            id = j_gallery.attr('id');
            
            has_panels = j_panels.length > 0;
            has_filmstrip = j_frames.length > 0;
            
            if(!has_panels) opts.panel_height = 0;
            
            //Number of frames in filmstrip
            item_count = has_panels?j_panels.length:j_frames.length;
            
            //Number of frames that can display within the screen's width
            //64 = width of block for navigation button * 2
            //5 = minimum frame margin
            strip_size = has_panels?Math.floor((opts.panel_width-64)/(opts.frame_width+frame_margin)):Math.min(item_count,opts.filmstrip_size); 
            
            
            /************************************************/
            /*  Determine transition method for filmstrip   */
            /************************************************/
                    //If more items than strip size, slide filmstrip
                    //Otherwise, slide pointer
                    if(strip_size >= item_count) {
                        slide_method = 'pointer';
                        strip_size = item_count;
                    }
                    else {slide_method = 'strip';}
            
            /************************************************/
            /*  Determine dimensions of various elements    */
            /************************************************/
                    
                    //Width of gallery block
                    gallery_width = has_panels?opts.panel_width:(strip_size*(opts.frame_width+frame_margin))-frame_margin+64;
                    
                    //Height of gallery block = screen + filmstrip + captions (optional)
                    gallery_height = (has_panels?opts.panel_height:0)+(has_filmstrip?opts.frame_height+frame_margin_top+(opts.show_captions?frame_caption_size:frame_margin_top):0);
                    
                    //Width of filmstrip
                    if(slide_method == 'pointer') {strip_width = (opts.frame_width*item_count)+(frame_margin*(item_count));}
                    else {strip_width = (opts.frame_width*item_count*3)+(frame_margin*(item_count*3));}
                    
                    //Width of filmstrip wrapper (to hide overflow)
                    wrapper_width = ((strip_size*opts.frame_width)+((strip_size-1)*frame_margin));
            
            /************************************************/
            /*  Apply CSS Styles                            */
            /************************************************/
                    j_gallery.css({
                        'position':'', //普通はrelative
                        'margin':'0',
                        'background':opts.background_color,
                        'border':opts.border,
                        'width':gallery_width+'px',
                        'height':gallery_height+'px'
                    });
            
            /************************************************/
            /*  Build filmstrip and/or panels               */
            /************************************************/
                    if(has_filmstrip) {
                        buildFilmstrip();
                    }
                    if(has_panels) {
                        buildPanels();
                    }

            
            /************************************************/
            /*  Add events to various elements              */
            /************************************************/
                    if(has_filmstrip) enableFrameClicking();
                    
                        
                        
                        j$().mousemove(function(e){                          
                            if(mouseIsOverPanels(e.pageX,e.pageY)) {
                                if(opts.pause_on_hover) {
                                    j$(document).oneTime(500,"animation_pause",function(){
                                        j$(document).stopTime("transition");
                                        paused=true;
                                    });
                                }
                                if(has_panels && !has_filmstrip) {
                                    j$('.nav-overlay').fadeIn('fast');
                                    j$('.nav-next').fadeIn('fast');
                                    j$('.nav-prev').fadeIn('fast');
                                }
                            } else {
                                if(opts.pause_on_hover) {
                                    j$(document).stopTime("animation_pause");
                                    if(paused) {
                                        j$(document).everyTime(opts.transition_interval,"transition",function(){
                                            showNextItem();
                                        });
                                        paused = false;
                                    }
                                }
                                if(has_panels && !has_filmstrip) {
                                    j$('.nav-overlay').fadeOut('fast');
                                    j$('.nav-next').fadeOut('fast');
                                    j$('.nav-prev').fadeOut('fast');
                                }
                            }
                        });
            
            
            /************************************************/
            /*  Initiate Automated Animation                */
            /************************************************/
                    //Show the first panel
                    j_panels.eq(0).show();

                    //If we have more than one item, begin automated transitions
                    if(item_count > 1) {
                        j$(document).everyTime(opts.transition_interval,"transition",function(){
                            showNextItem();
                        });
                    }
                    
                    //Make gallery visible now that work is complete
                    j_gallery.css('visibility','visible');
        });
    };
    
    j$.fn.galleryView.defaults = {
        panel_width: 400,
        panel_height: 300,
        frame_width: 80,
        frame_height: 80,
        filmstrip_size: 3,
        overlay_height: 70,
        overlay_font_size: '1em',
        transition_speed: 1000,
        transition_interval: 8000,
        overlay_opacity: 0.6,
        overlay_color: 'black',
        background_color: 'black',
        overlay_text_color: 'white',
        caption_text_color: 'white',
        border: '1px solid black',
        nav_theme: 'light',
        easing: 'swing',
        filmstrip_position: 'bottom',
        overlay_position: 'bottom',
        show_captions: false,
        fade_panels: true,
        pause_on_hover: false
    };
})(jQuery);


//
//
//**************************************************************************************************************************************** galleryview/jquery.timers-1.1.2.js
//
//
/**
 * jQuery.timers - Timer abstractions for jQuery
 * Written by Blair Mitchelmore (blair DOT mitchelmore AT gmail DOT com)
 * Licensed under the WTFPL (http://sam.zoy.org/wtfpl/).
 * Date: 2009/02/08
 *
 * @author Blair Mitchelmore
 * @version 1.1.2
 *
 **/

jQuery.fn.extend({
    everyTime: function(interval, label, fn, times, belay) {
        return this.each(function() {
            jQuery.timer.add(this, interval, label, fn, times, belay);
        });
    },
    oneTime: function(interval, label, fn) {
        return this.each(function() {
            jQuery.timer.add(this, interval, label, fn, 1);
        });
    },
    stopTime: function(label, fn) {
        return this.each(function() {
            jQuery.timer.remove(this, label, fn);
        });
    }
});

jQuery.event.special

jQuery.extend({
    timer: {
        global: [],
        guid: 1,
        dataKey: "jQuery.timer",
        regex: /^([0-9]+(?:\.[0-9]*)?)\s*(.*s)?j$/,
        powers: {
            // Yeah this is major overkill...
            'ms': 1,
            'cs': 10,
            'ds': 100,
            's': 1000,
            'das': 10000,
            'hs': 100000,
            'ks': 1000000
        },
        timeParse: function(value) {
            if (value == undefined || value == null)
                return null;
            var result = this.regex.exec(jQuery.trim(value.toString()));
            if (result[2]) {
                var num = parseFloat(result[1]);
                var mult = this.powers[result[2]] || 1;
                return num * mult;
            } else {
                return value;
            }
        },
        add: function(element, interval, label, fn, times, belay) {
            var counter = 0;
            
            if (jQuery.isFunction(label)) {
                if (!times) 
                    times = fn;
                fn = label;
                label = interval;
            }
            
            interval = jQuery.timer.timeParse(interval);

            if (typeof interval != 'number' || isNaN(interval) || interval <= 0)
                return;

            if (times && times.constructor != Number) {
                belay = !!times;
                times = 0;
            }
            
            times = times || 0;
            belay = belay || false;
            
            var timers = jQuery.data(element, this.dataKey) || jQuery.data(element, this.dataKey, {});
            
            if (!timers[label])
                timers[label] = {};
            
            fn.timerID = fn.timerID || this.guid++;
            
            var handler = function() {
                if (belay && this.inProgress) 
                    return;
                this.inProgress = true;
                if ((++counter > times && times !== 0) || fn.call(element, counter) === false)
                    jQuery.timer.remove(element, label, fn);
                this.inProgress = false;
            };
            
            handler.timerID = fn.timerID;
            
            if (!timers[label][fn.timerID])
                timers[label][fn.timerID] = window.setInterval(handler,interval);
            
            this.global.push( element );
            
        },
        remove: function(element, label, fn) {
            var timers = jQuery.data(element, this.dataKey), ret;
            
            if ( timers ) {
                
                if (!label) {
                    for ( label in timers )
                        this.remove(element, label, fn);
                } else if ( timers[label] ) {
                    if ( fn ) {
                        if ( fn.timerID ) {
                            window.clearInterval(timers[label][fn.timerID]);
                            delete timers[label][fn.timerID];
                        }
                    } else {
                        for ( var fn in timers[label] ) {
                            window.clearInterval(timers[label][fn]);
                            delete timers[label][fn];
                        }
                    }
                    
                    for ( ret in timers[label] ) break;
                    if ( !ret ) {
                        ret = null;
                        delete timers[label];
                    }
                }
                
                for ( ret in timers ) break;
                if ( !ret ) 
                    jQuery.removeData(element, this.dataKey);
            }
        }
    }
});

jQuery(window).bind("unload", function() {
    jQuery.each(jQuery.timer.global, function(index, item) {
        jQuery.timer.remove(item);
    });
});



//
//
//**************************************************************************************************************************************** cycle.js
//
//
/*
 * jQuery Cycle Plugin (with Transition Definitions)
 * Examples and documentation at: http://jquery.malsup.com/cycle/
 * Copyright (c) 2007-2010 M. Alsup
 * Version: 2.88 (08-JUN-2010)
 * Dual licensed under the MIT and GPL licenses.
 * http://jquery.malsup.com/license.html
 * Requires: jQuery v1.2.6 or later
 */
(function(j$){var ver="2.88";if(j$.support==undefined){j$.support={opacity:!(j$.browser.msie)};}function debug(s){if(j$.fn.cycle.debug){log(s);}}function log(){if(window.console&&window.console.log){window.console.log("[cycle] "+Array.prototype.join.call(arguments," "));}}j$.fn.cycle=function(options,arg2){var o={s:this.selector,c:this.context};if(this.length===0&&options!="stop"){if(!j$.isReady&&o.s){log("DOM not ready, queuing slideshow");j$(function(){j$(o.s,o.c).cycle(options,arg2);});return this;}log("terminating; zero elements found by selector"+(j$.isReady?"":" (DOM not ready)"));return this;}return this.each(function(){var opts=handleArguments(this,options,arg2);if(opts===false){return;}opts.updateActivePagerLink=opts.updateActivePagerLink||j$.fn.cycle.updateActivePagerLink;if(this.cycleTimeout){clearTimeout(this.cycleTimeout);}this.cycleTimeout=this.cyclePause=0;var j$cont=j$(this);var j$slides=opts.slideExpr?j$(opts.slideExpr,this):j$cont.children();var els=j$slides.get();if(els.length<2){log("terminating; too few slides: "+els.length);return;}var opts2=buildOptions(j$cont,j$slides,els,opts,o);if(opts2===false){return;}var startTime=opts2.continuous?10:getTimeout(els[opts2.currSlide],els[opts2.nextSlide],opts2,!opts2.rev);if(startTime){startTime+=(opts2.delay||0);if(startTime<10){startTime=10;}debug("first timeout: "+startTime);this.cycleTimeout=setTimeout(function(){go(els,opts2,0,(!opts2.rev&&!opts.backwards));},startTime);}});};function handleArguments(cont,options,arg2){if(cont.cycleStop==undefined){cont.cycleStop=0;}if(options===undefined||options===null){options={};}if(options.constructor==String){switch(options){case"destroy":case"stop":var opts=j$(cont).data("cycle.opts");if(!opts){return false;}cont.cycleStop++;if(cont.cycleTimeout){clearTimeout(cont.cycleTimeout);}cont.cycleTimeout=0;j$(cont).removeData("cycle.opts");if(options=="destroy"){destroy(opts);}return false;case"toggle":cont.cyclePause=(cont.cyclePause===1)?0:1;checkInstantResume(cont.cyclePause,arg2,cont);return false;case"pause":cont.cyclePause=1;return false;case"resume":cont.cyclePause=0;checkInstantResume(false,arg2,cont);return false;case"prev":case"next":var opts=j$(cont).data("cycle.opts");if(!opts){log('options not found, "prev/next" ignored');return false;}j$.fn.cycle[options](opts);return false;default:options={fx:options};}return options;}else{if(options.constructor==Number){var num=options;options=j$(cont).data("cycle.opts");if(!options){log("options not found, can not advance slide");return false;}if(num<0||num>=options.elements.length){log("invalid slide index: "+num);return false;}options.nextSlide=num;if(cont.cycleTimeout){clearTimeout(cont.cycleTimeout);cont.cycleTimeout=0;}if(typeof arg2=="string"){options.oneTimeFx=arg2;}go(options.elements,options,1,num>=options.currSlide);return false;}}return options;function checkInstantResume(isPaused,arg2,cont){if(!isPaused&&arg2===true){var options=j$(cont).data("cycle.opts");if(!options){log("options not found, can not resume");return false;}if(cont.cycleTimeout){clearTimeout(cont.cycleTimeout);cont.cycleTimeout=0;}go(options.elements,options,1,(!opts.rev&&!opts.backwards));}}}function removeFilter(el,opts){if(!j$.support.opacity&&opts.cleartype&&el.style.filter){try{el.style.removeAttribute("filter");}catch(smother){}}}function destroy(opts){if(opts.next){j$(opts.next).unbind(opts.prevNextEvent);}if(opts.prev){j$(opts.prev).unbind(opts.prevNextEvent);}if(opts.pager||opts.pagerAnchorBuilder){j$.each(opts.pagerAnchors||[],function(){this.unbind().remove();});}opts.pagerAnchors=null;if(opts.destroy){opts.destroy(opts);}}function buildOptions(j$cont,j$slides,els,options,o){var opts=j$.extend({},j$.fn.cycle.defaults,options||{},j$.metadata?j$cont.metadata():j$.meta?j$cont.data():{});if(opts.autostop){opts.countdown=opts.autostopCount||els.length;}var cont=j$cont[0];j$cont.data("cycle.opts",opts);opts.j$cont=j$cont;opts.stopCount=cont.cycleStop;opts.elements=els;opts.before=opts.before?[opts.before]:[];opts.after=opts.after?[opts.after]:[];opts.after.unshift(function(){opts.busy=0;});if(!j$.support.opacity&&opts.cleartype){opts.after.push(function(){removeFilter(this,opts);});}if(opts.continuous){opts.after.push(function(){go(els,opts,0,(!opts.rev&&!opts.backwards));});}saveOriginalOpts(opts);if(!j$.support.opacity&&opts.cleartype&&!opts.cleartypeNoBg){clearTypeFix(j$slides);}if(j$cont.css("position")=="static"){j$cont.css("position","relative");}if(opts.width){j$cont.width(opts.width);}if(opts.height&&opts.height!="auto"){j$cont.height(opts.height);}if(opts.startingSlide){opts.startingSlide=parseInt(opts.startingSlide);}else{if(opts.backwards){opts.startingSlide=els.length-1;}}if(opts.random){opts.randomMap=[];for(var i=0;i<els.length;i++){opts.randomMap.push(i);}opts.randomMap.sort(function(a,b){return Math.random()-0.5;});opts.randomIndex=1;opts.startingSlide=opts.randomMap[1];}else{if(opts.startingSlide>=els.length){opts.startingSlide=0;}}opts.currSlide=opts.startingSlide||0;var first=opts.startingSlide;j$slides.css({position:"absolute",top:0,left:0}).hide().each(function(i){var z;if(opts.backwards){z=first?i<=first?els.length+(i-first):first-i:els.length-i;}else{z=first?i>=first?els.length-(i-first):first-i:els.length-i;}j$(this).css("z-index",z);});j$(els[first]).css("opacity",1).show();removeFilter(els[first],opts);if(opts.fit&&opts.width){j$slides.width(opts.width);}if(opts.fit&&opts.height&&opts.height!="auto"){j$slides.height(opts.height);}var reshape=opts.containerResize&&!j$cont.innerHeight();if(reshape){var maxw=0,maxh=0;for(var j=0;j<els.length;j++){var j$e=j$(els[j]),e=j$e[0],w=j$e.outerWidth(),h=j$e.outerHeight();if(!w){w=e.offsetWidth||e.width||j$e.attr("width");}if(!h){h=e.offsetHeight||e.height||j$e.attr("height");}maxw=w>maxw?w:maxw;maxh=h>maxh?h:maxh;}if(maxw>0&&maxh>0){j$cont.css({width:maxw+"px",height:maxh+"px"});}}if(opts.pause){j$cont.hover(function(){this.cyclePause++;},function(){this.cyclePause--;});}if(supportMultiTransitions(opts)===false){return false;}var requeue=false;options.requeueAttempts=options.requeueAttempts||0;j$slides.each(function(){var j$el=j$(this);this.cycleH=(opts.fit&&opts.height)?opts.height:(j$el.height()||this.offsetHeight||this.height||j$el.attr("height")||0);this.cycleW=(opts.fit&&opts.width)?opts.width:(j$el.width()||this.offsetWidth||this.width||j$el.attr("width")||0);if(j$el.is("img")){var loadingIE=(j$.browser.msie&&this.cycleW==28&&this.cycleH==30&&!this.complete);var loadingFF=(j$.browser.mozilla&&this.cycleW==34&&this.cycleH==19&&!this.complete);var loadingOp=(j$.browser.opera&&((this.cycleW==42&&this.cycleH==19)||(this.cycleW==37&&this.cycleH==17))&&!this.complete);var loadingOther=(this.cycleH==0&&this.cycleW==0&&!this.complete);if(loadingIE||loadingFF||loadingOp||loadingOther){if(o.s&&opts.requeueOnImageNotLoaded&&++options.requeueAttempts<100){log(options.requeueAttempts," - img slide not loaded, requeuing slideshow: ",this.src,this.cycleW,this.cycleH);setTimeout(function(){j$(o.s,o.c).cycle(options);},opts.requeueTimeout);requeue=true;return false;}else{log("could not determine size of image: "+this.src,this.cycleW,this.cycleH);}}}return true;});if(requeue){return false;}opts.cssBefore=opts.cssBefore||{};opts.animIn=opts.animIn||{};opts.animOut=opts.animOut||{};j$slides.not(":eq("+first+")").css(opts.cssBefore);if(opts.cssFirst){j$(j$slides[first]).css(opts.cssFirst);}if(opts.timeout){opts.timeout=parseInt(opts.timeout);if(opts.speed.constructor==String){opts.speed=j$.fx.speeds[opts.speed]||parseInt(opts.speed);}if(!opts.sync){opts.speed=opts.speed/2;}var buffer=opts.fx=="shuffle"?500:250;while((opts.timeout-opts.speed)<buffer){opts.timeout+=opts.speed;}}if(opts.easing){opts.easeIn=opts.easeOut=opts.easing;}if(!opts.speedIn){opts.speedIn=opts.speed;}if(!opts.speedOut){opts.speedOut=opts.speed;}opts.slideCount=els.length;opts.currSlide=opts.lastSlide=first;if(opts.random){if(++opts.randomIndex==els.length){opts.randomIndex=0;}opts.nextSlide=opts.randomMap[opts.randomIndex];}else{if(opts.backwards){opts.nextSlide=opts.startingSlide==0?(els.length-1):opts.startingSlide-1;}else{opts.nextSlide=opts.startingSlide>=(els.length-1)?0:opts.startingSlide+1;}}if(!opts.multiFx){var init=j$.fn.cycle.transitions[opts.fx];if(j$.isFunction(init)){init(j$cont,j$slides,opts);}else{if(opts.fx!="custom"&&!opts.multiFx){log("unknown transition: "+opts.fx,"; slideshow terminating");return false;}}}var e0=j$slides[first];if(opts.before.length){opts.before[0].apply(e0,[e0,e0,opts,true]);}if(opts.after.length>1){opts.after[1].apply(e0,[e0,e0,opts,true]);}if(opts.next){j$(opts.next).bind(opts.prevNextEvent,function(){return advance(opts,opts.rev?-1:1);});}if(opts.prev){j$(opts.prev).bind(opts.prevNextEvent,function(){return advance(opts,opts.rev?1:-1);});}if(opts.pager||opts.pagerAnchorBuilder){buildPager(els,opts);}exposeAddSlide(opts,els);return opts;}function saveOriginalOpts(opts){opts.original={before:[],after:[]};opts.original.cssBefore=j$.extend({},opts.cssBefore);opts.original.cssAfter=j$.extend({},opts.cssAfter);opts.original.animIn=j$.extend({},opts.animIn);opts.original.animOut=j$.extend({},opts.animOut);j$.each(opts.before,function(){opts.original.before.push(this);});j$.each(opts.after,function(){opts.original.after.push(this);});}function supportMultiTransitions(opts){var i,tx,txs=j$.fn.cycle.transitions;if(opts.fx.indexOf(",")>0){opts.multiFx=true;opts.fxs=opts.fx.replace(/\s*/g,"").split(",");for(i=0;i<opts.fxs.length;i++){var fx=opts.fxs[i];tx=txs[fx];if(!tx||!txs.hasOwnProperty(fx)||!j$.isFunction(tx)){log("discarding unknown transition: ",fx);opts.fxs.splice(i,1);i--;}}if(!opts.fxs.length){log("No valid transitions named; slideshow terminating.");return false;}}else{if(opts.fx=="all"){opts.multiFx=true;opts.fxs=[];for(p in txs){tx=txs[p];if(txs.hasOwnProperty(p)&&j$.isFunction(tx)){opts.fxs.push(p);}}}}if(opts.multiFx&&opts.randomizeEffects){var r1=Math.floor(Math.random()*20)+30;for(i=0;i<r1;i++){var r2=Math.floor(Math.random()*opts.fxs.length);opts.fxs.push(opts.fxs.splice(r2,1)[0]);}debug("randomized fx sequence: ",opts.fxs);}return true;}function exposeAddSlide(opts,els){opts.addSlide=function(newSlide,prepend){var j$s=j$(newSlide),s=j$s[0];if(!opts.autostopCount){opts.countdown++;}els[prepend?"unshift":"push"](s);if(opts.els){opts.els[prepend?"unshift":"push"](s);}opts.slideCount=els.length;j$s.css("position","absolute");j$s[prepend?"prependTo":"appendTo"](opts.j$cont);if(prepend){opts.currSlide++;opts.nextSlide++;}if(!j$.support.opacity&&opts.cleartype&&!opts.cleartypeNoBg){clearTypeFix(j$s);}if(opts.fit&&opts.width){j$s.width(opts.width);}if(opts.fit&&opts.height&&opts.height!="auto"){j$slides.height(opts.height);}s.cycleH=(opts.fit&&opts.height)?opts.height:j$s.height();s.cycleW=(opts.fit&&opts.width)?opts.width:j$s.width();j$s.css(opts.cssBefore);if(opts.pager||opts.pagerAnchorBuilder){j$.fn.cycle.createPagerAnchor(els.length-1,s,j$(opts.pager),els,opts);}if(j$.isFunction(opts.onAddSlide)){opts.onAddSlide(j$s);}else{j$s.hide();}};}j$.fn.cycle.resetState=function(opts,fx){fx=fx||opts.fx;opts.before=[];opts.after=[];opts.cssBefore=j$.extend({},opts.original.cssBefore);opts.cssAfter=j$.extend({},opts.original.cssAfter);opts.animIn=j$.extend({},opts.original.animIn);opts.animOut=j$.extend({},opts.original.animOut);opts.fxFn=null;j$.each(opts.original.before,function(){opts.before.push(this);});j$.each(opts.original.after,function(){opts.after.push(this);});var init=j$.fn.cycle.transitions[fx];if(j$.isFunction(init)){init(opts.j$cont,j$(opts.elements),opts);}};function go(els,opts,manual,fwd){if(manual&&opts.busy&&opts.manualTrump){debug("manualTrump in go(), stopping active transition");j$(els).stop(true,true);opts.busy=false;}if(opts.busy){debug("transition active, ignoring new tx request");return;}var p=opts.j$cont[0],curr=els[opts.currSlide],next=els[opts.nextSlide];if(p.cycleStop!=opts.stopCount||p.cycleTimeout===0&&!manual){return;}if(!manual&&!p.cyclePause&&!opts.bounce&&((opts.autostop&&(--opts.countdown<=0))||(opts.nowrap&&!opts.random&&opts.nextSlide<opts.currSlide))){if(opts.end){opts.end(opts);}return;}var changed=false;if((manual||!p.cyclePause)&&(opts.nextSlide!=opts.currSlide)){changed=true;var fx=opts.fx;curr.cycleH=curr.cycleH||j$(curr).height();curr.cycleW=curr.cycleW||j$(curr).width();next.cycleH=next.cycleH||j$(next).height();next.cycleW=next.cycleW||j$(next).width();if(opts.multiFx){if(opts.lastFx==undefined||++opts.lastFx>=opts.fxs.length){opts.lastFx=0;}fx=opts.fxs[opts.lastFx];opts.currFx=fx;}if(opts.oneTimeFx){fx=opts.oneTimeFx;opts.oneTimeFx=null;}j$.fn.cycle.resetState(opts,fx);if(opts.before.length){j$.each(opts.before,function(i,o){if(p.cycleStop!=opts.stopCount){return;}o.apply(next,[curr,next,opts,fwd]);});}var after=function(){j$.each(opts.after,function(i,o){if(p.cycleStop!=opts.stopCount){return;}o.apply(next,[curr,next,opts,fwd]);});};debug("tx firing; currSlide: "+opts.currSlide+"; nextSlide: "+opts.nextSlide);opts.busy=1;if(opts.fxFn){opts.fxFn(curr,next,opts,after,fwd,manual&&opts.fastOnEvent);}else{if(j$.isFunction(j$.fn.cycle[opts.fx])){j$.fn.cycle[opts.fx](curr,next,opts,after,fwd,manual&&opts.fastOnEvent);}else{j$.fn.cycle.custom(curr,next,opts,after,fwd,manual&&opts.fastOnEvent);}}}if(changed||opts.nextSlide==opts.currSlide){opts.lastSlide=opts.currSlide;if(opts.random){opts.currSlide=opts.nextSlide;if(++opts.randomIndex==els.length){opts.randomIndex=0;}opts.nextSlide=opts.randomMap[opts.randomIndex];if(opts.nextSlide==opts.currSlide){opts.nextSlide=(opts.currSlide==opts.slideCount-1)?0:opts.currSlide+1;}}else{if(opts.backwards){var roll=(opts.nextSlide-1)<0;if(roll&&opts.bounce){opts.backwards=!opts.backwards;opts.nextSlide=1;opts.currSlide=0;}else{opts.nextSlide=roll?(els.length-1):opts.nextSlide-1;opts.currSlide=roll?0:opts.nextSlide+1;}}else{var roll=(opts.nextSlide+1)==els.length;if(roll&&opts.bounce){opts.backwards=!opts.backwards;opts.nextSlide=els.length-2;opts.currSlide=els.length-1;}else{opts.nextSlide=roll?0:opts.nextSlide+1;opts.currSlide=roll?els.length-1:opts.nextSlide-1;}}}}if(changed&&opts.pager){opts.updateActivePagerLink(opts.pager,opts.currSlide,opts.activePagerClass);}var ms=0;if(opts.timeout&&!opts.continuous){ms=getTimeout(els[opts.currSlide],els[opts.nextSlide],opts,fwd);}else{if(opts.continuous&&p.cyclePause){ms=10;}}if(ms>0){p.cycleTimeout=setTimeout(function(){go(els,opts,0,(!opts.rev&&!opts.backwards));},ms);}}j$.fn.cycle.updateActivePagerLink=function(pager,currSlide,clsName){j$(pager).each(function(){j$(this).children().removeClass(clsName).eq(currSlide).addClass(clsName);});};function getTimeout(curr,next,opts,fwd){if(opts.timeoutFn){var t=opts.timeoutFn.call(curr,curr,next,opts,fwd);while((t-opts.speed)<250){t+=opts.speed;}debug("calculated timeout: "+t+"; speed: "+opts.speed);if(t!==false){return t;}}return opts.timeout;}j$.fn.cycle.next=function(opts){advance(opts,opts.rev?-1:1);};j$.fn.cycle.prev=function(opts){advance(opts,opts.rev?1:-1);};function advance(opts,val){var els=opts.elements;var p=opts.j$cont[0],timeout=p.cycleTimeout;if(timeout){clearTimeout(timeout);p.cycleTimeout=0;}if(opts.random&&val<0){opts.randomIndex--;if(--opts.randomIndex==-2){opts.randomIndex=els.length-2;}else{if(opts.randomIndex==-1){opts.randomIndex=els.length-1;}}opts.nextSlide=opts.randomMap[opts.randomIndex];}else{if(opts.random){opts.nextSlide=opts.randomMap[opts.randomIndex];}else{opts.nextSlide=opts.currSlide+val;if(opts.nextSlide<0){if(opts.nowrap){return false;}opts.nextSlide=els.length-1;}else{if(opts.nextSlide>=els.length){if(opts.nowrap){return false;}opts.nextSlide=0;}}}}var cb=opts.onPrevNextEvent||opts.prevNextClick;if(j$.isFunction(cb)){cb(val>0,opts.nextSlide,els[opts.nextSlide]);}go(els,opts,1,val>=0);return false;}function buildPager(els,opts){var j$p=j$(opts.pager);j$.each(els,function(i,o){j$.fn.cycle.createPagerAnchor(i,o,j$p,els,opts);});opts.updateActivePagerLink(opts.pager,opts.startingSlide,opts.activePagerClass);}j$.fn.cycle.createPagerAnchor=function(i,el,j$p,els,opts){var a;if(j$.isFunction(opts.pagerAnchorBuilder)){a=opts.pagerAnchorBuilder(i,el);debug("pagerAnchorBuilder("+i+", el) returned: "+a);}else{a='<a href="#">'+(i+1)+"</a>";}if(!a){return;}var j$a=j$(a);if(j$a.parents("body").length===0){var arr=[];if(j$p.length>1){j$p.each(function(){var j$clone=j$a.clone(true);j$(this).append(j$clone);arr.push(j$clone[0]);});j$a=j$(arr);}else{j$a.appendTo(j$p);}}opts.pagerAnchors=opts.pagerAnchors||[];opts.pagerAnchors.push(j$a);j$a.bind(opts.pagerEvent,function(e){e.preventDefault();opts.nextSlide=i;var p=opts.j$cont[0],timeout=p.cycleTimeout;if(timeout){clearTimeout(timeout);p.cycleTimeout=0;}var cb=opts.onPagerEvent||opts.pagerClick;if(j$.isFunction(cb)){cb(opts.nextSlide,els[opts.nextSlide]);}go(els,opts,1,opts.currSlide<i);});if(!/^click/.test(opts.pagerEvent)&&!opts.allowPagerClickBubble){j$a.bind("click.cycle",function(){return false;});}if(opts.pauseOnPagerHover){j$a.hover(function(){opts.j$cont[0].cyclePause++;},function(){opts.j$cont[0].cyclePause--;});}};j$.fn.cycle.hopsFromLast=function(opts,fwd){var hops,l=opts.lastSlide,c=opts.currSlide;if(fwd){hops=c>l?c-l:opts.slideCount-l;}else{hops=c<l?l-c:l+opts.slideCount-c;}return hops;};function clearTypeFix(j$slides){debug("applying clearType background-color hack");function hex(s){s=parseInt(s).toString(16);return s.length<2?"0"+s:s;}function getBg(e){for(;e&&e.nodeName.toLowerCase()!="html";e=e.parentNode){var v=j$.css(e,"background-color");if(v.indexOf("rgb")>=0){var rgb=v.match(/\d+/g);return"#"+hex(rgb[0])+hex(rgb[1])+hex(rgb[2]);}if(v&&v!="transparent"){return v;}}return"#ffffff";}j$slides.each(function(){j$(this).css("background-color",getBg(this));});}j$.fn.cycle.commonReset=function(curr,next,opts,w,h,rev){j$(opts.elements).not(curr).hide();opts.cssBefore.opacity=1;opts.cssBefore.display="block";if(w!==false&&next.cycleW>0){opts.cssBefore.width=next.cycleW;}if(h!==false&&next.cycleH>0){opts.cssBefore.height=next.cycleH;}opts.cssAfter=opts.cssAfter||{};opts.cssAfter.display="none";j$(curr).css("zIndex",opts.slideCount+(rev===true?1:0));j$(next).css("zIndex",opts.slideCount+(rev===true?0:1));};j$.fn.cycle.custom=function(curr,next,opts,cb,fwd,speedOverride){var j$l=j$(curr),j$n=j$(next);var speedIn=opts.speedIn,speedOut=opts.speedOut,easeIn=opts.easeIn,easeOut=opts.easeOut;j$n.css(opts.cssBefore);if(speedOverride){if(typeof speedOverride=="number"){speedIn=speedOut=speedOverride;}else{speedIn=speedOut=1;}easeIn=easeOut=null;}var fn=function(){j$n.animate(opts.animIn,speedIn,easeIn,cb);};j$l.animate(opts.animOut,speedOut,easeOut,function(){if(opts.cssAfter){j$l.css(opts.cssAfter);}if(!opts.sync){fn();}});if(opts.sync){fn();}};j$.fn.cycle.transitions={fade:function(j$cont,j$slides,opts){j$slides.not(":eq("+opts.currSlide+")").css("opacity",0);opts.before.push(function(curr,next,opts){j$.fn.cycle.commonReset(curr,next,opts);opts.cssBefore.opacity=0;});opts.animIn={opacity:1};opts.animOut={opacity:0};opts.cssBefore={top:0,left:0};}};j$.fn.cycle.ver=function(){return ver;};j$.fn.cycle.defaults={fx:"fade",timeout:4000,timeoutFn:null,continuous:0,speed:1000,speedIn:null,speedOut:null,next:null,prev:null,onPrevNextEvent:null,prevNextEvent:"click.cycle",pager:null,onPagerEvent:null,pagerEvent:"click.cycle",allowPagerClickBubble:false,pagerAnchorBuilder:null,before:null,after:null,end:null,easing:null,easeIn:null,easeOut:null,shuffle:null,animIn:null,animOut:null,cssBefore:null,cssAfter:null,fxFn:null,height:"auto",startingSlide:0,sync:1,random:0,fit:0,containerResize:1,pause:0,pauseOnPagerHover:0,autostop:0,autostopCount:0,delay:0,slideExpr:null,cleartype:!j$.support.opacity,cleartypeNoBg:false,nowrap:0,fastOnEvent:0,randomizeEffects:1,rev:0,manualTrump:true,requeueOnImageNotLoaded:true,requeueTimeout:250,activePagerClass:"activeSlide",updateActivePagerLink:null,backwards:false};})(jQuery);
/*
 * jQuery Cycle Plugin Transition Definitions
 * This script is a plugin for the jQuery Cycle Plugin
 * Examples and documentation at: http://malsup.com/jquery/cycle/
 * Copyright (c) 2007-2010 M. Alsup
 * Version:  2.72
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 */
(function(j$){j$.fn.cycle.transitions.none=function(j$cont,j$slides,opts){opts.fxFn=function(curr,next,opts,after){j$(next).show();j$(curr).hide();after();};};j$.fn.cycle.transitions.scrollUp=function(j$cont,j$slides,opts){j$cont.css("overflow","hidden");opts.before.push(j$.fn.cycle.commonReset);var h=j$cont.height();opts.cssBefore={top:h,left:0};opts.cssFirst={top:0};opts.animIn={top:0};opts.animOut={top:-h};};j$.fn.cycle.transitions.scrollDown=function(j$cont,j$slides,opts){j$cont.css("overflow","hidden");opts.before.push(j$.fn.cycle.commonReset);var h=j$cont.height();opts.cssFirst={top:0};opts.cssBefore={top:-h,left:0};opts.animIn={top:0};opts.animOut={top:h};};j$.fn.cycle.transitions.scrollLeft=function(j$cont,j$slides,opts){j$cont.css("overflow","hidden");opts.before.push(j$.fn.cycle.commonReset);var w=j$cont.width();opts.cssFirst={left:0};opts.cssBefore={left:w,top:0};opts.animIn={left:0};opts.animOut={left:0-w};};j$.fn.cycle.transitions.scrollRight=function(j$cont,j$slides,opts){j$cont.css("overflow","hidden");opts.before.push(j$.fn.cycle.commonReset);var w=j$cont.width();opts.cssFirst={left:0};opts.cssBefore={left:-w,top:0};opts.animIn={left:0};opts.animOut={left:w};};j$.fn.cycle.transitions.scrollHorz=function(j$cont,j$slides,opts){j$cont.css("overflow","hidden").width();opts.before.push(function(curr,next,opts,fwd){j$.fn.cycle.commonReset(curr,next,opts);opts.cssBefore.left=fwd?(next.cycleW-1):(1-next.cycleW);opts.animOut.left=fwd?-curr.cycleW:curr.cycleW;});opts.cssFirst={left:0};opts.cssBefore={top:0};opts.animIn={left:0};opts.animOut={top:0};};j$.fn.cycle.transitions.scrollVert=function(j$cont,j$slides,opts){j$cont.css("overflow","hidden");opts.before.push(function(curr,next,opts,fwd){j$.fn.cycle.commonReset(curr,next,opts);opts.cssBefore.top=fwd?(1-next.cycleH):(next.cycleH-1);opts.animOut.top=fwd?curr.cycleH:-curr.cycleH;});opts.cssFirst={top:0};opts.cssBefore={left:0};opts.animIn={top:0};opts.animOut={left:0};};j$.fn.cycle.transitions.slideX=function(j$cont,j$slides,opts){opts.before.push(function(curr,next,opts){j$(opts.elements).not(curr).hide();j$.fn.cycle.commonReset(curr,next,opts,false,true);opts.animIn.width=next.cycleW;});opts.cssBefore={left:0,top:0,width:0};opts.animIn={width:"show"};opts.animOut={width:0};};j$.fn.cycle.transitions.slideY=function(j$cont,j$slides,opts){opts.before.push(function(curr,next,opts){j$(opts.elements).not(curr).hide();j$.fn.cycle.commonReset(curr,next,opts,true,false);opts.animIn.height=next.cycleH;});opts.cssBefore={left:0,top:0,height:0};opts.animIn={height:"show"};opts.animOut={height:0};};j$.fn.cycle.transitions.shuffle=function(j$cont,j$slides,opts){var i,w=j$cont.css("overflow","visible").width();j$slides.css({left:0,top:0});opts.before.push(function(curr,next,opts){j$.fn.cycle.commonReset(curr,next,opts,true,true,true);});if(!opts.speedAdjusted){opts.speed=opts.speed/2;opts.speedAdjusted=true;}opts.random=0;opts.shuffle=opts.shuffle||{left:-w,top:15};opts.els=[];for(i=0;i<j$slides.length;i++){opts.els.push(j$slides[i]);}for(i=0;i<opts.currSlide;i++){opts.els.push(opts.els.shift());}opts.fxFn=function(curr,next,opts,cb,fwd){var j$el=fwd?j$(curr):j$(next);j$(next).css(opts.cssBefore);var count=opts.slideCount;j$el.animate(opts.shuffle,opts.speedIn,opts.easeIn,function(){var hops=j$.fn.cycle.hopsFromLast(opts,fwd);for(var k=0;k<hops;k++){fwd?opts.els.push(opts.els.shift()):opts.els.unshift(opts.els.pop());}if(fwd){for(var i=0,len=opts.els.length;i<len;i++){j$(opts.els[i]).css("z-index",len-i+count);}}else{var z=j$(curr).css("z-index");j$el.css("z-index",parseInt(z)+1+count);}j$el.animate({left:0,top:0},opts.speedOut,opts.easeOut,function(){j$(fwd?this:curr).hide();if(cb){cb();}});});};opts.cssBefore={display:"block",opacity:1,top:0,left:0};};j$.fn.cycle.transitions.turnUp=function(j$cont,j$slides,opts){opts.before.push(function(curr,next,opts){j$.fn.cycle.commonReset(curr,next,opts,true,false);opts.cssBefore.top=next.cycleH;opts.animIn.height=next.cycleH;});opts.cssFirst={top:0};opts.cssBefore={left:0,height:0};opts.animIn={top:0};opts.animOut={height:0};};j$.fn.cycle.transitions.turnDown=function(j$cont,j$slides,opts){opts.before.push(function(curr,next,opts){j$.fn.cycle.commonReset(curr,next,opts,true,false);opts.animIn.height=next.cycleH;opts.animOut.top=curr.cycleH;});opts.cssFirst={top:0};opts.cssBefore={left:0,top:0,height:0};opts.animOut={height:0};};j$.fn.cycle.transitions.turnLeft=function(j$cont,j$slides,opts){opts.before.push(function(curr,next,opts){j$.fn.cycle.commonReset(curr,next,opts,false,true);opts.cssBefore.left=next.cycleW;opts.animIn.width=next.cycleW;});opts.cssBefore={top:0,width:0};opts.animIn={left:0};opts.animOut={width:0};};j$.fn.cycle.transitions.turnRight=function(j$cont,j$slides,opts){opts.before.push(function(curr,next,opts){j$.fn.cycle.commonReset(curr,next,opts,false,true);opts.animIn.width=next.cycleW;opts.animOut.left=curr.cycleW;});opts.cssBefore={top:0,left:0,width:0};opts.animIn={left:0};opts.animOut={width:0};};j$.fn.cycle.transitions.zoom=function(j$cont,j$slides,opts){opts.before.push(function(curr,next,opts){j$.fn.cycle.commonReset(curr,next,opts,false,false,true);opts.cssBefore.top=next.cycleH/2;opts.cssBefore.left=next.cycleW/2;opts.animIn={top:0,left:0,width:next.cycleW,height:next.cycleH};opts.animOut={width:0,height:0,top:curr.cycleH/2,left:curr.cycleW/2};});opts.cssFirst={top:0,left:0};opts.cssBefore={width:0,height:0};};j$.fn.cycle.transitions.fadeZoom=function(j$cont,j$slides,opts){opts.before.push(function(curr,next,opts){j$.fn.cycle.commonReset(curr,next,opts,false,false);opts.cssBefore.left=next.cycleW/2;opts.cssBefore.top=next.cycleH/2;opts.animIn={top:0,left:0,width:next.cycleW,height:next.cycleH};});opts.cssBefore={width:0,height:0};opts.animOut={opacity:0};};j$.fn.cycle.transitions.blindX=function(j$cont,j$slides,opts){var w=j$cont.css("overflow","hidden").width();opts.before.push(function(curr,next,opts){j$.fn.cycle.commonReset(curr,next,opts);opts.animIn.width=next.cycleW;opts.animOut.left=curr.cycleW;});opts.cssBefore={left:w,top:0};opts.animIn={left:0};opts.animOut={left:w};};j$.fn.cycle.transitions.blindY=function(j$cont,j$slides,opts){var h=j$cont.css("overflow","hidden").height();opts.before.push(function(curr,next,opts){j$.fn.cycle.commonReset(curr,next,opts);opts.animIn.height=next.cycleH;opts.animOut.top=curr.cycleH;});opts.cssBefore={top:h,left:0};opts.animIn={top:0};opts.animOut={top:h};};j$.fn.cycle.transitions.blindZ=function(j$cont,j$slides,opts){var h=j$cont.css("overflow","hidden").height();var w=j$cont.width();opts.before.push(function(curr,next,opts){j$.fn.cycle.commonReset(curr,next,opts);opts.animIn.height=next.cycleH;opts.animOut.top=curr.cycleH;});opts.cssBefore={top:h,left:w};opts.animIn={top:0,left:0};opts.animOut={top:h,left:w};};j$.fn.cycle.transitions.growX=function(j$cont,j$slides,opts){opts.before.push(function(curr,next,opts){j$.fn.cycle.commonReset(curr,next,opts,false,true);opts.cssBefore.left=this.cycleW/2;opts.animIn={left:0,width:this.cycleW};opts.animOut={left:0};});opts.cssBefore={width:0,top:0};};j$.fn.cycle.transitions.growY=function(j$cont,j$slides,opts){opts.before.push(function(curr,next,opts){j$.fn.cycle.commonReset(curr,next,opts,true,false);opts.cssBefore.top=this.cycleH/2;opts.animIn={top:0,height:this.cycleH};opts.animOut={top:0};});opts.cssBefore={height:0,left:0};};j$.fn.cycle.transitions.curtainX=function(j$cont,j$slides,opts){opts.before.push(function(curr,next,opts){j$.fn.cycle.commonReset(curr,next,opts,false,true,true);opts.cssBefore.left=next.cycleW/2;opts.animIn={left:0,width:this.cycleW};opts.animOut={left:curr.cycleW/2,width:0};});opts.cssBefore={top:0,width:0};};j$.fn.cycle.transitions.curtainY=function(j$cont,j$slides,opts){opts.before.push(function(curr,next,opts){j$.fn.cycle.commonReset(curr,next,opts,true,false,true);opts.cssBefore.top=next.cycleH/2;opts.animIn={top:0,height:next.cycleH};opts.animOut={top:curr.cycleH/2,height:0};});opts.cssBefore={left:0,height:0};};j$.fn.cycle.transitions.cover=function(j$cont,j$slides,opts){var d=opts.direction||"left";var w=j$cont.css("overflow","hidden").width();var h=j$cont.height();opts.before.push(function(curr,next,opts){j$.fn.cycle.commonReset(curr,next,opts);if(d=="right"){opts.cssBefore.left=-w;}else{if(d=="up"){opts.cssBefore.top=h;}else{if(d=="down"){opts.cssBefore.top=-h;}else{opts.cssBefore.left=w;}}}});opts.animIn={left:0,top:0};opts.animOut={opacity:1};opts.cssBefore={top:0,left:0};};j$.fn.cycle.transitions.uncover=function(j$cont,j$slides,opts){var d=opts.direction||"left";var w=j$cont.css("overflow","hidden").width();var h=j$cont.height();opts.before.push(function(curr,next,opts){j$.fn.cycle.commonReset(curr,next,opts,true,true,true);if(d=="right"){opts.animOut.left=w;}else{if(d=="up"){opts.animOut.top=-h;}else{if(d=="down"){opts.animOut.top=h;}else{opts.animOut.left=-w;}}}});opts.animIn={left:0,top:0};opts.animOut={opacity:1};opts.cssBefore={top:0,left:0};};j$.fn.cycle.transitions.toss=function(j$cont,j$slides,opts){var w=j$cont.css("overflow","visible").width();var h=j$cont.height();opts.before.push(function(curr,next,opts){j$.fn.cycle.commonReset(curr,next,opts,true,true,true);if(!opts.animOut.left&&!opts.animOut.top){opts.animOut={left:w*2,top:-h/2,opacity:0};}else{opts.animOut.opacity=0;}});opts.cssBefore={left:0,top:0};opts.animIn={left:0};};j$.fn.cycle.transitions.wipe=function(j$cont,j$slides,opts){var w=j$cont.css("overflow","hidden").width();var h=j$cont.height();opts.cssBefore=opts.cssBefore||{};var clip;if(opts.clip){if(/l2r/.test(opts.clip)){clip="rect(0px 0px "+h+"px 0px)";}else{if(/r2l/.test(opts.clip)){clip="rect(0px "+w+"px "+h+"px "+w+"px)";}else{if(/t2b/.test(opts.clip)){clip="rect(0px "+w+"px 0px 0px)";}else{if(/b2t/.test(opts.clip)){clip="rect("+h+"px "+w+"px "+h+"px 0px)";}else{if(/zoom/.test(opts.clip)){var top=parseInt(h/2);var left=parseInt(w/2);clip="rect("+top+"px "+left+"px "+top+"px "+left+"px)";}}}}}}opts.cssBefore.clip=opts.cssBefore.clip||clip||"rect(0px 0px 0px 0px)";var d=opts.cssBefore.clip.match(/(\d+)/g);var t=parseInt(d[0]),r=parseInt(d[1]),b=parseInt(d[2]),l=parseInt(d[3]);opts.before.push(function(curr,next,opts){if(curr==next){return;}var j$curr=j$(curr),j$next=j$(next);j$.fn.cycle.commonReset(curr,next,opts,true,true,false);opts.cssAfter.display="block";var step=1,count=parseInt((opts.speedIn/13))-1;(function f(){var tt=t?t-parseInt(step*(t/count)):0;var ll=l?l-parseInt(step*(l/count)):0;var bb=b<h?b+parseInt(step*((h-b)/count||1)):h;var rr=r<w?r+parseInt(step*((w-r)/count||1)):w;j$next.css({clip:"rect("+tt+"px "+rr+"px "+bb+"px "+ll+"px)"});(step++<=count)?setTimeout(f,13):j$curr.css("display","none");})();});opts.cssBefore={display:"block",opacity:1,top:0,left:0};opts.animIn={left:0};opts.animOut={left:0};};})(jQuery);


//
//
//**************************************************************************************************************************************** rotation_bnr.js
//
//
//ローテーションバナー
rotationBnr = 
    function(URL){
        j$.ajax({
            url : URL,
            success : function(data)
            {
                j$('div.rotation_bnr').html(data);
                
                // 挙動の設定
                j$('div.rotation_bnr ul').cycle({
                    fx:'fade',//scrollDown scrollUp scrollLeft scrollRight shufull zoom fade
                    random: 1,
                    speed:1000,
                    timeout:7000 
                });
            }
        });
    }


//
//
//**************************************************************************************************************************************** expand_bnr.js
//
//
j$(document).ready(function(){
    if (typeof document.documentElement.style.maxHeight != "undefined") {
        //IE7以上、Firefox, Opera, Chrome等
        var imgWidth = j$('.expand_bnr img').attr('width');
        j$('.expand_bnr').mouseover(function(){
            j$('.expand_bnr').animate({width:imgWidth},"fast");
        });
        j$('.expand_bnr').mouseout(function(){
            j$('.expand_bnr').animate({width:'180px'},"fast");
        });
    } else {
        //IE6
        //何もしない
    }
});

