PageSourceSearch

https://wild-cards.net/wc/wp-content/themes/wildcards/js/script.js?ver=1.0

js wild-cards.net collected 2026-10-03 22:11:22 UTC 60,535 bytes, 2,283 lines download raw bytes

1/*スクロール固定*/
2$(window).load(function() {
3	var tab = $('.scrollfix , .scrollfix2 , .scrollfix3'),
4    offset = tab.offset();
5
6$(window).scroll(function () {
7  if($(window).scrollTop() > offset.top) {
8    tab.addClass('fixed');
9  } else {
10    tab.removeClass('fixed');
11  }
12});
13});
14
15
16
17
18/*タブ処理*/  
19(function($) {
20    $(document).ready(function() {
21        $('.tab_area:first').show();
22        $('.tab li:first').addClass('active');
23  
24        $('.tab li').click(function() {
25            $('.tab li').removeClass('active');
26            $(this).addClass('active');
27            $('.tab_area').hide();
28  
29            $(jQuery(this).find('a').attr('href')).fadeIn();
30            return false;
31        });
32    });
33})(jQuery);
34
35
36/*ドロップダウンのカスタマイズ
37 * jQuery Selectbox plugin 0.2
38 *
39 * Copyright 2011-2012, Dimitar Ivanov (http://www.bulgaria-web-developers.com/projects/javascript/selectbox/)
40 * Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license.
41 * 
42 * Date: Tue Jul 17 19:58:36 2012 +0300
43 */
44(function ($, undefined) {
45	var PROP_NAME = 'selectbox',
46		FALSE = false,
47		TRUE = true;
48	/**
49	 * Selectbox manager.
50	 * Use the singleton instance of this class, $.selectbox, to interact with the select box.
51	 * Settings for (groups of) select boxes are maintained in an instance object,
52	 * allowing multiple different settings on the same page
53	 */
54	function Selectbox() {
55		this._state = [];
56		this._defaults = { // Global defaults for all the select box instances
57			classHolder: "sbHolder",
58			classHolderDisabled: "sbHolderDisabled",
59			classSelector: "sbSelector",
60			classOptions: "sbOptions",
61			classGroup: "sbGroup",
62			classSub: "sbSub",
63			classDisabled: "sbDisabled",
64			classToggleOpen: "sbToggleOpen",
65			classToggle: "sbToggle",
66			classFocus: "sbFocus",
67			speed: 200,
68			effect: "slide", // "slide" or "fade"
69			onChange: null, //Define a callback function when the selectbox is changed
70			onOpen: null, //Define a callback function when the selectbox is open
71			onClose: null //Define a callback function when the selectbox is closed
72		};
73	}
74	
75	$.extend(Selectbox.prototype, {
76		/**
77		 * Is the first field in a jQuery collection open as a selectbox
78		 * 
79		 * @param {Object} target
80		 * @return {Boolean}
81		 */
82		_isOpenSelectbox: function (target) {
83			if (!target) {
84				return FALSE;
85			}
86			var inst = this._getInst(target);
87			return inst.isOpen;
88		},
89		/**
90		 * Is the first field in a jQuery collection disabled as a selectbox
91		 * 
92		 * @param {HTMLElement} target
93		 * @return {Boolean}
94		 */
95		_isDisabledSelectbox: function (target) {
96			if (!target) {
97				return FALSE;
98			}
99			var inst = this._getInst(target);
100			return inst.isDisabled;
101		},
102		/**
103		 * Attach the select box to a jQuery selection.
104		 * 
105		 * @param {HTMLElement} target
106		 * @param {Object} settings
107		 */
108		_attachSelectbox: function (target, settings) {
109			if (this._getInst(target)) {
110				return FALSE;
111			}
112			var $target = $(target),
113				self = this,
114				inst = self._newInst($target),
115				sbHolder, sbSelector, sbToggle, sbOptions,
116				s = FALSE, optGroup = $target.find("optgroup"), opts = $target.find("option"), olen = opts.length;
117				
118			$target.attr("sb", inst.uid);
119				
120			$.extend(inst.settings, self._defaults, settings);
121			self._state[inst.uid] = FALSE;
122			$target.hide();
123			
124			function closeOthers() {
125				var key, sel,
126					uid = this.attr("id").split("_")[1];
127				for (key in self._state) {
128					if (key !== uid) {
129						if (self._state.hasOwnProperty(key)) {
130							sel = $("select[sb='" + key + "']")[0];
131							if (sel) {
132								self._closeSelectbox(sel);
133							}
134						}
135					}
136				}
137			}
138			
139			sbHolder = $("<div>", {
140				"id": "sbHolder_" + inst.uid,
141				"class": inst.settings.classHolder,
142				"tabindex": $target.attr("tabindex")
143			});
144			
145			sbSelector = $("<a>", {
146				"id": "sbSelector_" + inst.uid,
147				"href": "#",
148				"class": inst.settings.classSelector,
149				"click": function (e) {
150					e.preventDefault();
151					closeOthers.apply($(this), []);
152					var uid = $(this).attr("id").split("_")[1];
153					if (self._state[uid]) {
154						self._closeSelectbox(target);
155					} else {
156						self._openSelectbox(target);
157					}
158				}
159			});
160			
161			sbToggle = $("<a>", {
162				"id": "sbToggle_" + inst.uid,
163				"href": "#",
164				"class": inst.settings.classToggle,
165				"click": function (e) {
166					e.preventDefault();
167					closeOthers.apply($(this), []);
168					var uid = $(this).attr("id").split("_")[1];
169					if (self._state[uid]) {
170						self._closeSelectbox(target);
171					} else {
172						self._openSelectbox(target);
173					}
174				}
175			});
176			sbToggle.appendTo(sbHolder);
177
178			sbOptions = $("<ul>", {
179				"id": "sbOptions_" + inst.uid,
180				"class": inst.settings.classOptions,
181				"css": {
182					"display": "none"
183				}
184			});
185			
186			$target.children().each(function(i) {
187				var that = $(this), li, config = {};
188				if (that.is("option")) {
189					getOptions(that);
190				} else if (that.is("optgroup")) {
191					li = $("<li>");
192					$("<span>", {
193						"text": that.attr("label")
194					}).addClass(inst.settings.classGroup).appendTo(li);
195					li.appendTo(sbOptions);
196					if (that.is(":disabled")) {
197						config.disabled = true;
198					}
199					config.sub = true;
200					getOptions(that.find("option"), config);
201				}
202			});
203			
204			function getOptions () {
205				var sub = arguments[1] && arguments[1].sub ? true : false,
206					disabled = arguments[1] && arguments[1].disabled ? true : false;
207				arguments[0].each(function (i) {
208					var that = $(this),
209						li = $("<li>"),
210						child;
211					if (that.is(":selected")) {
212						sbSelector.text(that.text());
213						s = TRUE;
214					}
215					if (i === olen - 1) {
216						li.addClass("last");
217					}
218					if (!that.is(":disabled") && !disabled) {
219						child = $("<a>", {
220							"href": "#" + that.val(),
221							"rel": that.val()
222						}).text(that.text()).bind("click.sb", function (e) {
223							if (e && e.preventDefault) {
224								e.preventDefault();
225							}
226							var t = sbToggle,
227							 	$this = $(this),
228								uid = t.attr("id").split("_")[1];
229							self._changeSelectbox(target, $this.attr("rel"), $this.text());
230							self._closeSelectbox(target);
231						}).bind("mouseover.sb", function () {
232							var $this = $(this);
233							$this.parent().siblings().find("a").removeClass(inst.settings.classFocus);
234							$this.addClass(inst.settings.classFocus);
235						}).bind("mouseout.sb", function () {
236							$(this).removeClass(inst.settings.classFocus);
237						});
238						if (sub) {
239							child.addClass(inst.settings.classSub);
240						}
241						if (that.is(":selected")) {
242							child.addClass(inst.settings.classFocus);
243						}
244						child.appendTo(li);
245					} else {
246						child = $("<span>", {
247							"text": that.text()
248						}).addClass(inst.settings.classDisabled);
249						if (sub) {
250							child.addClass(inst.settings.classSub);
251						}
252						child.appendTo(li);
253					}
254					li.appendTo(sbOptions);
255				});
256			}
257			
258			if (!s) {
259				sbSelector.text(opts.first().text());
260			}
261
262			$.data(target, PROP_NAME, inst);
263			
264			sbHolder.data("uid", inst.uid).bind("keydown.sb", function (e) {
265				var key = e.charCode ? e.charCode : e.keyCode ? e.keyCode : 0,
266					$this = $(this),
267					uid = $this.data("uid"),
268					inst = $this.siblings("select[sb='"+uid+"']").data(PROP_NAME),
269					trgt = $this.siblings(["select[sb='", uid, "']"].join("")).get(0),
270					$f = $this.find("ul").find("a." + inst.settings.classFocus);
271				switch (key) {
272					case 37: //Arrow Left
273					case 38: //Arrow Up
274						if ($f.length > 0) {
275							var $next;
276							$("a", $this).removeClass(inst.settings.classFocus);
277							$next = $f.parent().prevAll("li:has(a)").eq(0).find("a");
278							if ($next.length > 0) {
279								$next.addClass(inst.settings.classFocus).focus();
280								$("#sbSelector_" + uid).text($next.text());
281							}
282						}
283						break;
284					case 39: //Arrow Right
285					case 40: //Arrow Down
286						var $next;
287						$("a", $this).removeClass(inst.settings.classFocus);
288						if ($f.length > 0) {
289							$next = $f.parent().nextAll("li:has(a)").eq(0).find("a");
290						} else {
291							$next = $this.find("ul").find("a").eq(0);
292						}
293						if ($next.length > 0) {
294							$next.addClass(inst.settings.classFocus).focus();
295							$("#sbSelector_" + uid).text($next.text());
296						}
297						break;				
298					case 13: //Enter
299						if ($f.length > 0) {
300							self._changeSelectbox(trgt, $f.attr("rel"), $f.text());
301						}
302						self._closeSelectbox(trgt);
303						break;
304					case 9: //Tab
305						if (trgt) {
306							var inst = self._getInst(trgt);
307							if (inst/* && inst.isOpen*/) {
308								if ($f.length > 0) {
309									self._changeSelectbox(trgt, $f.attr("rel"), $f.text());
310								}
311								self._closeSelectbox(trgt);
312							}
313						}
314						var i = parseInt($this.attr("tabindex"), 10);
315						if (!e.shiftKey) {
316							i++;
317						} else {
318							i--;
319						}
320						$("*[tabindex='" + i + "']").focus();
321						break;
322					case 27: //Escape
323						self._closeSelectbox(trgt);
324						break;
325				}
326				e.stopPropagation();
327				return false;
328			}).delegate("a", "mouseover", function (e) {
329				$(this).addClass(inst.settings.classFocus);
330			}).delegate("a", "mouseout", function (e) {
331				$(this).removeClass(inst.settings.classFocus);	
332			});
333			
334			sbSelector.appendTo(sbHolder);
335			sbOptions.appendTo(sbHolder);			
336			sbHolder.insertAfter($target);
337			
338			$("html").live('mousedown', function(e) {
339				e.stopPropagation();          
340				$("select").selectbox('close'); 
341			});
342			$([".", inst.settings.classHolder, ", .", inst.settings.classSelector].join("")).mousedown(function(e) {    
343				e.stopPropagation();
344			});
345		},
346		/**
347		 * Remove the selectbox functionality completely. This will return the element back to its pre-init state.
348		 * 
349		 * @param {HTMLElement} target
350		 */
351		_detachSelectbox: function (target) {
352			var inst = this._getInst(target);
353			if (!inst) {
354				return FALSE;
355			}
356			$("#sbHolder_" + inst.uid).remove();
357			$.data(target, PROP_NAME, null);
358			$(target).show();			
359		},
360		/**
361		 * Change selected attribute of the selectbox.
362		 * 
363		 * @param {HTMLElement} target
364		 * @param {String} value
365		 * @param {String} text
366		 */
367		_changeSelectbox: function (target, value, text) {
368			var onChange,
369				inst = this._getInst(target);
370			if (inst) {
371				onChange = this._get(inst, 'onChange');
372				$("#sbSelector_" + inst.uid).text(text);
373			}
374			value = value.replace(/\'/g, "\\'");
375			$(target).find("option[value='" + value + "']").attr("selected", TRUE);
376			if (inst && onChange) {
377				onChange.apply((inst.input ? inst.input[0] : null), [value, inst]);
378			} else if (inst && inst.input) {
379				inst.input.trigger('change');
380			}
381		},
382		/**
383		 * Enable the selectbox.
384		 * 
385		 * @param {HTMLElement} target
386		 */
387		_enableSelectbox: function (target) {
388			var inst = this._getInst(target);
389			if (!inst || !inst.isDisabled) {
390				return FALSE;
391			}
392			$("#sbHolder_" + inst.uid).removeClass(inst.settings.classHolderDisabled);
393			inst.isDisabled = FALSE;
394			$.data(target, PROP_NAME, inst);
395		},
396		/**
397		 * Disable the selectbox.
398		 * 
399		 * @param {HTMLElement} target
400		 */
401		_disableSelectbox: function (target) {
402			var inst = this._getInst(target);
403			if (!inst || inst.isDisabled) {
404				return FALSE;
405			}
406			$("#sbHolder_" + inst.uid).addClass(inst.settings.classHolderDisabled);
407			inst.isDisabled = TRUE;
408			$.data(target, PROP_NAME, inst);
409		},
410		/**
411		 * Get or set any selectbox option. If no value is specified, will act as a getter.
412		 * 
413		 * @param {HTMLElement} target
414		 * @param {String} name
415		 * @param {Object} value
416		 */
417		_optionSelectbox: function (target, name, value) {
418			var inst = this._getInst(target);
419			if (!inst) {
420				return FALSE;
421			}
422			//TODO check name
423			inst[name] = value;
424			$.data(target, PROP_NAME, inst);
425		},
426		/**
427		 * Call up attached selectbox
428		 * 
429		 * @param {HTMLElement} target
430		 */
431		_openSelectbox: function (target) {
432			var inst = this._getInst(target);
433			//if (!inst || this._state[inst.uid] || inst.isDisabled) {
434			if (!inst || inst.isOpen || inst.isDisabled) {
435				return;
436			}
437			var	el = $("#sbOptions_" + inst.uid),
438				viewportHeight = parseInt($(window).height(), 10),
439				offset = $("#sbHolder_" + inst.uid).offset(),
440				scrollTop = $(window).scrollTop(),
441				height = el.prev().height(),
442				diff = viewportHeight - (offset.top - scrollTop) - height / 2,
443				onOpen = this._get(inst, 'onOpen');
444			el.css({
445				"top": height + "px",
446				"maxHeight": (diff - height) + "px"
447			});
448			inst.settings.effect === "fade" ? el.fadeIn(inst.settings.speed) : el.slideDown(inst.settings.speed);
449			$("#sbToggle_" + inst.uid).addClass(inst.settings.classToggleOpen);
450			this._state[inst.uid] = TRUE;
451			inst.isOpen = TRUE;
452			if (onOpen) {
453				onOpen.apply((inst.input ? inst.input[0] : null), [inst]);
454			}
455			$.data(target, PROP_NAME, inst);
456		},
457		/**
458		 * Close opened selectbox
459		 * 
460		 * @param {HTMLElement} target
461		 */
462		_closeSelectbox: function (target) {
463			var inst = this._getInst(target);
464			//if (!inst || !this._state[inst.uid]) {
465			if (!inst || !inst.isOpen) {
466				return;
467			}
468			var onClose = this._get(inst, 'onClose');
469			inst.settings.effect === "fade" ? $("#sbOptions_" + inst.uid).fadeOut(inst.settings.speed) : $("#sbOptions_" + inst.uid).slideUp(inst.settings.speed);
470			$("#sbToggle_" + inst.uid).removeClass(inst.settings.classToggleOpen);
471			this._state[inst.uid] = FALSE;
472			inst.isOpen = FALSE;
473			if (onClose) {
474				onClose.apply((inst.input ? inst.input[0] : null), [inst]);
475			}
476			$.data(target, PROP_NAME, inst);
477		},
478		/**
479		 * Create a new instance object
480		 * 
481		 * @param {HTMLElement} target
482		 * @return {Object}
483		 */
484		_newInst: function(target) {
485			var id = target[0].id.replace(/([^A-Za-z0-9_-])/g, '\\\\$1');
486			return {
487				id: id, 
488				input: target, 
489				uid: Math.floor(Math.random() * 99999999),
490				isOpen: FALSE,
491				isDisabled: FALSE,
492				settings: {}
493			}; 
494		},
495		/**
496		 * Retrieve the instance data for the target control.
497		 * 
498		 * @param {HTMLElement} target
499		 * @return {Object} - the associated instance data
500		 * @throws error if a jQuery problem getting data
501		 */
502		_getInst: function(target) {
503			try {
504				return $.data(target, PROP_NAME);
505			}
506			catch (err) {
507				throw 'Missing instance data for this selectbox';
508			}
509		},
510		/**
511		 * Get a setting value, defaulting if necessary
512		 * 
513		 * @param {Object} inst
514		 * @param {String} name
515		 * @return {Mixed}
516		 */
517		_get: function(inst, name) {
518			return inst.settings[name] !== undefined ? inst.settings[name] : this._defaults[name];
519		}
520	});
521
522	/**
523	 * Invoke the selectbox functionality.
524	 * 
525	 * @param {Object|String} options
526	 * @return {Object}
527	 */
528	$.fn.selectbox = function (options) {
529		
530		var otherArgs = Array.prototype.slice.call(arguments, 1);
531		if (typeof options == 'string' && options == 'isDisabled') {
532			return $.selectbox['_' + options + 'Selectbox'].apply($.selectbox, [this[0]].concat(otherArgs));
533		}
534		
535		if (options == 'option' && arguments.length == 2 && typeof arguments[1] == 'string') {
536			return $.selectbox['_' + options + 'Selectbox'].apply($.selectbox, [this[0]].concat(otherArgs));
537		}
538		
539		return this.each(function() {
540			typeof options == 'string' ?
541				$.selectbox['_' + options + 'Selectbox'].apply($.selectbox, [this].concat(otherArgs)) :
542				$.selectbox._attachSelectbox(this, options);
543		});
544	};
545	
546	$.selectbox = new Selectbox(); // singleton instance
547	$.selectbox.version = "0.2";
548})(jQuery); 
549$(window).load(function (){
550    $("select").selectbox();
551});
552
553
554
555/*ブロック要素の高さを揃える*/
556/*
557======================================================================
558	$.changeLetterSize.addHandler(func)
559	文字の大きさが変化した時に実行する処理を追加
560======================================================================
561*/
562
563jQuery.changeLetterSize = {
564	handlers : [],
565	interval : 1000,
566	currentSize: 0
567};
568
569(function($) {
570
571	var self = $.changeLetterSize;
572
573	/* 文字の大きさを確認するためのins要素 */
574	var ins = $('<ins>M</ins>').css({
575		display: 'block',
576		visibility: 'hidden',
577		position: 'absolute',
578		padding: '0',
579		top: '0'
580	});
581
582	/* 文字の大きさが変わったか */
583	var isChanged = function() {
584		ins.appendTo('body');
585		var size = ins[0].offsetHeight;
586		ins.remove();
587		if (self.currentSize == size) return false;
588		self.currentSize = size;
589		return true;
590	};
591
592	/* 文書を読み込んだ時点で
593	   文字の大きさを確認しておく */
594	$(isChanged);
595
596	/* 文字の大きさが変わっていたら、
597	   handlers中の関数を順に実行 */
598	var observer = function() {
599		if (!isChanged()) return;
600		$.each(self.handlers, function(i, handler) {
601			handler();
602		});
603	};
604
605	/* ハンドラを登録し、
606	   最初の登録であれば、定期処理を開始 */
607	self.addHandler = function(func) {
608		self.handlers.push(func);
609		if (self.handlers.length == 1) {
610			setInterval(observer, self.interval);
611		}
612	};
613
614})(jQuery);
615
616/*
617======================================================================
618	$(expr).flatHeights()
619	$(expr)で選択した複数の要素について、それぞれ高さを
620	一番高いものに揃える
621======================================================================
622*/
623
624(function($) {
625
626	/* 対象となる要素群の集合 */
627	var sets = [];
628
629	/* 高さ揃えの処理本体 */
630	var flatHeights = function(set) {
631		var maxHeight = 0;
632		set.each(function(){
633			var height = this.offsetHeight;
634			if (height > maxHeight) maxHeight = height;
635		});
636		set.css('height', maxHeight + 'px');
637	};
638
639	/* 要素群の高さを揃え、setsに追加 */
640	jQuery.fn.flatHeights = function() {
641		if (this.length > 1) {
642			flatHeights(this);
643			sets.push(this);
644		}
645		return this;
646	};
647
648	/* 高さ揃えを再実行する処理 */
649	var reflatting = function() {
650		$.each(sets, function() {
651			this.height('auto');
652			flatHeights(this);
653		});
654	};
655
656	/* 文字の大きさが変わった時に高さ揃えを再実行 */
657	$.changeLetterSize.addHandler(reflatting);
658
659	/* ウィンドウの大きさが変わった時に高さ揃えを再実行 */
660	$(window).resize(reflatting);
661
662})(jQuery);
663
664
665/*
666Copyright (c) 2007, KITAMURA Akatsuki
667
668Permission is hereby granted, free of charge, to any person obtaining a
669copy of this software and associated documentation files (the "Software"),
670to deal in the Software without restriction, including without limitation
671the rights to use, copy, modify, merge, publish, distribute, sublicense,
672and/or sell copies of the Software, and to permit persons to whom the
673Software is furnished to do so, subject to the following conditions:
674
675The above copyright notice and this permission notice shall be included
676in all copies or substantial portions of the Software.
677
678THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
679IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
680FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
681THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
682OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
683ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
684OTHER DEALINGS IN THE SOFTWARE.
685*/
686$(function(){  
687    $('#side_left, #side_right ').flatHeights();  
688});  
689
690
691
692/*TOPへ戻るボタン
693 scrollup v2.1.0
694 Author: Mark Goodyear - http://markgoodyear.com
695 Git: https://github.com/markgoodyear/scrollup
696
697 Copyright 2013 Mark Goodyear.
698 Licensed under the MIT license
699 http://www.opensource.org/licenses/mit-license.php
700
701 Twitter: @markgdyr
702 */
703(function($, window, document) {
704
705    // Main function
706    $.fn.scrollUp = function (options) {
707        // Ensure that only one scrollUp exists
708        if ( ! $.data( document.body, 'scrollUp' ) ) {
709            $.data( document.body, 'scrollUp', true );
710            $.fn.scrollUp.init(options);
711        }
712    };
713
714    // Init
715    $.fn.scrollUp.init = function(options) {
716        // Apply any options to the settings, override the defaults
717        var o = $.fn.scrollUp.settings = $.extend({}, $.fn.scrollUp.defaults, options),
718
719        // Set scrollTitle
720        scrollTitle = (o.scrollTitle) ? o.scrollTitle : o.scrollText,
721
722        // Create element
723        $self = $('<a/>', {
724            id: o.scrollName,
725            href: '#top',
726            title: scrollTitle
727        }).appendTo('body');
728
729        // If not using an image display text
730        if (!o.scrollImg) {
731            $self.html(o.scrollText);
732        }
733
734        // Minimum CSS to make the magic happen
735        $self.css({
736            display: 'none',
737            position: 'fixed',
738            zIndex: o.zIndex
739        });
740
741        // Active point overlay
742        if (o.activeOverlay) {
743            $('<div/>', { id: o.scrollName + '-active' }).css({ position: 'absolute', 'top': o.scrollDistance + 'px', width: '100%', borderTop: '1px dotted' + o.activeOverlay, zIndex: o.zIndex }).appendTo('body');
744        }
745
746        // Scroll function
747        scrollEvent = $(window).scroll(function() {
748            // If from top or bottom
749            if (o.scrollFrom === 'top') {
750                scrollDis = o.scrollDistance;
751            } else {
752                scrollDis = $(document).height() - $(window).height() - o.scrollDistance;
753            }
754
755            // Switch animation type
756            switch (o.animation) {
757                case 'fade':
758                    $( ($(window).scrollTop() > scrollDis) ? $self.fadeIn(o.animationInSpeed) : $self.fadeOut(o.animationOutSpeed) );
759                    break;
760                case 'slide':
761                    $( ($(window).scrollTop() > scrollDis) ? $self.slideDown(o.animationInSpeed) : $self.slideUp(o.animationOutSpeed) );
762                    break;
763                default:
764                    $( ($(window).scrollTop() > scrollDis) ? $self.show(0) : $self.hide(0) );
765            }
766        });
767
768        // To the top
769        $self.click(function(e) {
770            e.preventDefault();
771            $('html, body').animate({
772                scrollTop:0
773            }, o.topSpeed, o.easingType);
774        });
775    };
776
777    // Defaults
778    $.fn.scrollUp.defaults = {
779        scrollName: 'scrollUp', // Element ID
780        scrollDistance: 1300, // Distance from top/bottom before showing element (px)
781        scrollFrom: 'top', // 'top' or 'bottom'
782        scrollSpeed: 300, // Speed back to top (ms)
783        easingType: 'linear', // Scroll to top easing (see http://easings.net/)
784        animation: 'slide', // Fade, slide, none
785        animationInSpeed: 300, // Animation in speed (ms)
786        animationOutSpeed: 300, // Animation out speed (ms)
787        scrollText: '※大和田常務ではありません', // Text for element, can contain HTML
788        scrollTitle: false, // Set a custom <a> title if required. Defaults to scrollText
789        scrollImg: false, // Set true to use image
790        activeOverlay: false, // Set CSS color to display scrollUp active point, e.g '#00FFFF'
791        zIndex: 2147483647 // Z-Index for the overlay
792    };
793
794    // Destroy scrollUp plugin and clean all modifications to the DOM
795    $.fn.scrollUp.destroy = function (scrollEvent){
796        $.removeData( document.body, 'scrollUp' );
797        $( '#' + $.fn.scrollUp.settings.scrollName ).remove();
798        $( '#' + $.fn.scrollUp.settings.scrollName + '-active' ).remove();
799
800        // If 1.7 or above use the new .off()
801        if ($.fn.jquery.split('.')[1] >= 7) {
802            $(window).off( 'scroll', scrollEvent );
803
804        // Else use the old .unbind()
805        } else {
806            $(window).unbind( 'scroll', scrollEvent );
807        }
808    };
809
810    $.scrollUp = $.fn.scrollUp;
811
812})(jQuery, window, document);
813$(window).load(function (){
814    $.scrollUp();
815});
816
817
818
819
820
821
822
823/*!
824	カラーボックス
825	Colorbox v1.4.32 - 2013-10-16
826	jQuery lightbox and modal window plugin
827	(c) 2013 Jack Moore - http://www.jacklmoore.com/colorbox
828	license: http://www.opensource.org/licenses/mit-license.php
829*/
830(function ($, document, window) {
831	var
832	// Default settings object.
833	// See http://jacklmoore.com/colorbox for details.
834	defaults = {
835		// data sources
836		html: false,
837		photo: false,
838		iframe: false,
839		inline: false,
840
841		// behavior and appearance
842		transition: "elastic",
843		speed: 300,
844		fadeOut: 300,
845		width: false,
846		initialWidth: "600",
847		innerWidth: false,
848		maxWidth: false,
849		height: false,
850		initialHeight: "450",
851		innerHeight: false,
852		maxHeight: false,
853		scalePhotos: true,
854		scrolling: true,
855		href: false,
856		title: false,
857		rel: false,
858		opacity: 0.9,
859		preloading: true,
860		className: false,
861		overlayClose: true,
862		escKey: true,
863		arrowKey: true,
864		top: false,
865		bottom: false,
866		left: false,
867		right: false,
868		fixed: false,
869		data: undefined,
870		closeButton: true,
871		fastIframe: true,
872		open: false,
873		reposition: true,
874		loop: true,
875		slideshow: false,
876		slideshowAuto: true,
877		slideshowSpeed: 2500,
878		slideshowStart: "start slideshow",
879		slideshowStop: "stop slideshow",
880		photoRegex: /\.(gif|png|jp(e|g|eg)|bmp|ico|webp)((#|\?).*)?$/i,
881
882		// alternate image paths for high-res displays
883		retinaImage: false,
884		retinaUrl: false,
885		retinaSuffix: '@2x.$1',
886
887		// internationalization
888		current: "image {current} of {total}",
889		previous: "previous",
890		next: "next",
891		close: "close",
892		xhrError: "This content failed to load.",
893		imgError: "This image failed to load.",
894
895		// accessbility
896		returnFocus: true,
897		trapFocus: true,
898
899		// callbacks
900		onOpen: false,
901		onLoad: false,
902		onComplete: false,
903		onCleanup: false,
904		onClosed: false
905	},
906	
907	// Abstracting the HTML and event identifiers for easy rebranding
908	colorbox = 'colorbox',
909	prefix = 'cbox',
910	boxElement = prefix + 'Element',
911	
912	// Events
913	event_open = prefix + '_open',
914	event_load = prefix + '_load',
915	event_complete = prefix + '_complete',
916	event_cleanup = prefix + '_cleanup',
917	event_closed = prefix + '_closed',
918	event_purge = prefix + '_purge',
919
920	// Cached jQuery Object Variables
921	$overlay,
922	$box,
923	$wrap,
924	$content,
925	$topBorder,
926	$leftBorder,
927	$rightBorder,
928	$bottomBorder,
929	$related,
930	$window,
931	$loaded,
932	$loadingBay,
933	$loadingOverlay,
934	$title,
935	$current,
936	$slideshow,
937	$next,
938	$prev,
939	$close,
940	$groupControls,
941	$events = $('<a/>'),
942	
943	// Variables for cached values or use across multiple functions
944	settings,
945	interfaceHeight,
946	interfaceWidth,
947	loadedHeight,
948	loadedWidth,
949	element,
950	index,
951	photo,
952	open,
953	active,
954	closing,
955	loadingTimer,
956	publicMethod,
957	div = "div",
958	className,
959	requests = 0,
960	previousCSS = {},
961	init;
962
963	// ****************
964	// HELPER FUNCTIONS
965	// ****************
966	
967	// Convenience function for creating new jQuery objects
968	function $tag(tag, id, css) {
969		var element = document.createElement(tag);
970
971		if (id) {
972			element.id = prefix + id;
973		}
974
975		if (css) {
976			element.style.cssText = css;
977		}
978
979		return $(element);
980	}
981	
982	// Get the window height using innerHeight when available to avoid an issue with iOS
983	// http://bugs.jquery.com/ticket/6724
984	function winheight() {
985		return window.innerHeight ? window.innerHeight : $(window).height();
986	}
987
988	// Determine the next and previous members in a group.
989	function getIndex(increment) {
990		var
991		max = $related.length,
992		newIndex = (index + increment) % max;
993		
994		return (newIndex < 0) ? max + newIndex : newIndex;
995	}
996
997	// Convert '%' and 'px' values to integers
998	function setSize(size, dimension) {
999		return Math.round((/%/.test(size) ? ((dimension === 'x' ? $window.width() : winheight()) / 100) : 1) * parseInt(size, 10));
1000	}
1001	
1002	// Checks an href to see if it is a photo.
1003	// There is a force photo option (photo: true) for hrefs that cannot be matched by the regex.
1004	function isImage(settings, url) {
1005		return settings.photo || settings.photoRegex.test(url);
1006	}
1007
1008	function retinaUrl(settings, url) {
1009		return settings.retinaUrl && window.devicePixelRatio > 1 ? url.replace(settings.photoRegex, settings.retinaSuffix) : url;
1010	}
1011
1012	function trapFocus(e) {
1013		if ('contains' in $box[0] && !$box[0].contains(e.target)) {
1014			e.stopPropagation();
1015			$box.focus();
1016		}
1017	}
1018
1019	// Assigns function results to their respective properties
1020	function makeSettings() {
1021		var i,
1022			data = $.data(element, colorbox);
1023		
1024		if (data == null) {
1025			settings = $.extend({}, defaults);
1026			if (console && console.log) {
1027				console.log('Error: cboxElement missing settings object');
1028			}
1029		} else {
1030			settings = $.extend({}, data);
1031		}
1032		
1033		for (i in settings) {
1034			if ($.isFunction(settings[i]) && i.slice(0, 2) !== 'on') { // checks to make sure the function isn't one of the callbacks, they will be handled at the appropriate time.
1035				settings[i] = settings[i].call(element);
1036			}
1037		}
1038		
1039		settings.rel = settings.rel || element.rel || $(element).data('rel') || 'nofollow';
1040		settings.href = settings.href || $(element).attr('href');
1041		settings.title = settings.title || element.title;
1042		
1043		if (typeof settings.href === "string") {
1044			settings.href = $.trim(settings.href);
1045		}
1046	}
1047
1048	function trigger(event, callback) {
1049		// for external use
1050		$(document).trigger(event);
1051
1052		// for internal use
1053		$events.trigger(event);
1054
1055		if ($.isFunction(callback)) {
1056			callback.call(element);
1057		}
1058	}
1059
1060
1061	var slideshow = (function(){
1062		var active,
1063			className = prefix + "Slideshow_",
1064			click = "click." + prefix,
1065			timeOut;
1066
1067		function clear () {
1068			clearTimeout(timeOut);
1069		}
1070
1071		function set() {
1072			if (settings.loop || $related[index + 1]) {
1073				clear();
1074				timeOut = setTimeout(publicMethod.next, settings.slideshowSpeed);
1075			}
1076		}
1077
1078		function start() {
1079			$slideshow
1080				.html(settings.slideshowStop)
1081				.unbind(click)
1082				.one(click, stop);
1083
1084			$events
1085				.bind(event_complete, set)
1086				.bind(event_load, clear);
1087
1088			$box.removeClass(className + "off").addClass(className + "on");
1089		}
1090
1091		function stop() {
1092			clear();
1093			
1094			$events
1095				.unbind(event_complete, set)
1096				.unbind(event_load, clear);
1097
1098			$slideshow
1099				.html(settings.slideshowStart)
1100				.unbind(click)
1101				.one(click, function () {
1102					publicMethod.next();
1103					start();
1104				});
1105
1106			$box.removeClass(className + "on").addClass(className + "off");
1107		}
1108
1109		function reset() {
1110			active = false;
1111			$slideshow.hide();
1112			clear();
1113			$events
1114				.unbind(event_complete, set)
1115				.unbind(event_load, clear);
1116			$box.removeClass(className + "off " + className + "on");
1117		}
1118
1119		return function(){
1120			if (active) {
1121				if (!settings.slideshow) {
1122					$events.unbind(event_cleanup, reset);
1123					reset();
1124				}
1125			} else {
1126				if (settings.slideshow && $related[1]) {
1127					active = true;
1128					$events.one(event_cleanup, reset);
1129					if (settings.slideshowAuto) {
1130						start();
1131					} else {
1132						stop();
1133					}
1134					$slideshow.show();
1135				}
1136			}
1137		};
1138
1139	}());
1140
1141
1142	function launch(target) {
1143		if (!closing) {
1144			
1145			element = target;
1146			
1147			makeSettings();
1148			
1149			$related = $(element);
1150			
1151			index = 0;
1152			
1153			if (settings.rel !== 'nofollow') {
1154				$related = $('.' + boxElement).filter(function () {
1155					var data = $.data(this, colorbox),
1156						relRelated;
1157
1158					if (data) {
1159						relRelated =  $(this).data('rel') || data.rel || this.rel;
1160					}
1161					
1162					return (relRelated === settings.rel);
1163				});
1164				index = $related.index(element);
1165				
1166				// Check direct calls to Colorbox.
1167				if (index === -1) {
1168					$related = $related.add(element);
1169					index = $related.length - 1;
1170				}
1171			}
1172			
1173			$overlay.css({
1174				opacity: parseFloat(settings.opacity),
1175				cursor: settings.overlayClose ? "pointer" : "auto",
1176				visibility: 'visible'
1177			}).show();
1178			
1179
1180			if (className) {
1181				$box.add($overlay).removeClass(className);
1182			}
1183			if (settings.className) {
1184				$box.add($overlay).addClass(settings.className);
1185			}
1186			className = settings.className;
1187
1188			if (settings.closeButton) {
1189				$close.html(settings.close).appendTo($content);
1190			} else {
1191				$close.appendTo('<div/>');
1192			}
1193
1194			if (!open) {
1195				open = active = true; // Prevents the page-change action from queuing up if the visitor holds down the left or right 
1195keys.
1196				
1197				// Show colorbox so the sizes can be calculated in older versions of jQuery
1198				$box.css({visibility:'hidden', display:'block'});
1199				
1200				$loaded = $tag(div, 'LoadedContent', 'width:0; height:0; overflow:hidden');
1201				$content.css({width:'', height:''}).append($loaded);
1202
1203				// Cache values needed for size calculations
1204				interfaceHeight = $topBorder.height() + $bottomBorder.height() + $content.outerHeight(true) - $content.height();
1205				interfaceWidth = $leftBorder.width() + $rightBorder.width() + $content.outerWidth(true) - $content.width();
1206				loadedHeight = $loaded.outerHeight(true);
1207				loadedWidth = $loaded.outerWidth(true);
1208
1209				// Opens inital empty Colorbox prior to content being loaded.
1210				settings.w = setSize(settings.initialWidth, 'x');
1211				settings.h = setSize(settings.initialHeight, 'y');
1212				$loaded.css({width:'', height:settings.h});
1213				publicMethod.position();
1214
1215				trigger(event_open, settings.onOpen);
1216				
1217				$groupControls.add($title).hide();
1218
1219				$box.focus();
1220				
1221				if (settings.trapFocus) {
1222					// Confine focus to the modal
1223					// Uses event capturing that is not supported in IE8-
1224					if (document.addEventListener) {
1225
1226						document.addEventListener('focus', trapFocus, true);
1227						
1228						$events.one(event_closed, function () {
1229							document.removeEventListener('focus', trapFocus, true);
1230						});
1231					}
1232				}
1233
1234				// Return focus on closing
1235				if (settings.returnFocus) {
1236					$events.one(event_closed, function () {
1237						$(element).focus();
1238					});
1239				}
1240			}
1241			load();
1242		}
1243	}
1244
1245	// Colorbox's markup needs to be added to the DOM prior to being called
1246	// so that the browser will go ahead and load the CSS background images.
1247	function appendHTML() {
1248		if (!$box && document.body) {
1249			init = false;
1250			$window = $(window);
1251			$box = $tag(div).attr({
1252				id: colorbox,
1253				'class': $.support.opacity === false ? prefix + 'IE' : '', // class for optional IE8 & lower targeted CSS.
1254				role: 'dialog',
1255				tabindex: '-1'
1256			}).hide();
1257			$overlay = $tag(div, "Overlay").hide();
1258			$loadingOverlay = $([$tag(div, "LoadingOverlay")[0],$tag(div, "LoadingGraphic")[0]]);
1259			$wrap = $tag(div, "Wrapper");
1260			$content = $tag(div, "Content").append(
1261				$title = $tag(div, "Title"),
1262				$current = $tag(div, "Current"),
1263				$prev = $('<button type="button"/>').attr({id:prefix+'Previous'}),
1264				$next = $('<button type="button"/>').attr({id:prefix+'Next'}),
1265				$slideshow = $tag('button', "Slideshow"),
1266				$loadingOverlay
1267			);
1268
1269			$close = $('<button type="button"/>').attr({id:prefix+'Close'});
1270			
1271			$wrap.append( // The 3x3 Grid that makes up Colorbox
1272				$tag(div).append(
1273					$tag(div, "TopLeft"),
1274					$topBorder = $tag(div, "TopCenter"),
1275					$tag(div, "TopRight")
1276				),
1277				$tag(div, false, 'clear:left').append(
1278					$leftBorder = $tag(div, "MiddleLeft"),
1279					$content,
1280					$rightBorder = $tag(div, "MiddleRight")
1281				),
1282				$tag(div, false, 'clear:left').append(
1283					$tag(div, "BottomLeft"),
1284					$bottomBorder = $tag(div, "BottomCenter"),
1285					$tag(div, "BottomRight")
1286				)
1287			).find('div div').css({'float': 'left'});
1288			
1289			$loadingBay = $tag(div, false, 'position:absolute; width:9999px; visibility:hidden; display:none; max-width:none;');
1290			
1291			$groupControls = $next.add($prev).add($current).add($slideshow);
1292
1293			$(document.body).append($overlay, $box.append($wrap, $loadingBay));
1294		}
1295	}
1296
1297	// Add Colorbox's event bindings
1298	function addBindings() {
1299		function clickHandler(e) {
1300			// ignore non-left-mouse-clicks and clicks modified with ctrl / command, shift, or alt.
1301			// See: http://jacklmoore.com/notes/click-events/
1302			if (!(e.which > 1 || e.shiftKey || e.altKey || e.metaKey || e.ctrlKey)) {
1303				e.preventDefault();
1304				launch(this);
1305			}
1306		}
1307
1308		if ($box) {
1309			if (!init) {
1310				init = true;
1311
1312				// Anonymous functions here keep the public method from being cached, thereby allowing them to be redefined on the fly.
1313				$next.click(function () {
1314					publicMethod.next();
1315				});
1316				$prev.click(function () {
1317					publicMethod.prev();
1318				});
1319				$close.click(function () {
1320					publicMethod.close();
1321				});
1322				$overlay.click(function () {
1323					if (settings.overlayClose) {
1324						publicMethod.close();
1325					}
1326				});
1327				
1328				// Key Bindings
1329				$(document).bind('keydown.' + prefix, function (e) {
1330					var key = e.keyCode;
1331					if (open && settings.escKey && key === 27) {
1332						e.preventDefault();
1333						publicMethod.close();
1334					}
1335					if (open && settings.arrowKey && $related[1] && !e.altKey) {
1336						if (key === 37) {
1337							e.preventDefault();
1338							$prev.click();
1339						} else if (key === 39) {
1340							e.preventDefault();
1341							$next.click();
1342						}
1343					}
1344				});
1345
1346				if ($.isFunction($.fn.on)) {
1347					// For jQuery 1.7+
1348					$(document).on('click.'+prefix, '.'+boxElement, clickHandler);
1349				} else {
1350					// For jQuery 1.3.x -> 1.6.x
1351					// This code is never reached in jQuery 1.9, so do not contact me about 'live' being removed.
1352					// This is not here for jQuery 1.9, it's here for legacy users.
1353					$('.'+boxElement).live('click.'+prefix, clickHandler);
1354				}
1355			}
1356			return true;
1357		}
1358		return false;
1359	}
1360
1361	// Don't do anything if Colorbox already exists.
1362	if ($.colorbox) {
1363		return;
1364	}
1365
1366	// Append the HTML when the DOM loads
1367	$(appendHTML);
1368
1369
1370	// ****************
1371	// PUBLIC FUNCTIONS
1372	// Usage format: $.colorbox.close();
1373	// Usage from within an iframe: parent.jQuery.colorbox.close();
1374	// ****************
1375	
1376	publicMethod = $.fn[colorbox] = $[colorbox] = function (options, callback) {
1377		var $this = this;
1378		
1379		options = options || {};
1380		
1381		appendHTML();
1382
1383		if (addBindings()) {
1384			if ($.isFunction($this)) { // assume a call to $.colorbox
1385				$this = $('<a/>');
1386				options.open = true;
1387			} else if (!$this[0]) { // colorbox being applied to empty collection
1388				return $this;
1389			}
1390			
1391			if (callback) {
1392				options.onComplete = callback;
1393			}
1394			
1395			$this.each(function () {
1396				$.data(this, colorbox, $.extend({}, $.data(this, colorbox) || defaults, options));
1397			}).addClass(boxElement);
1398			
1399			if (($.isFunction(options.open) && options.open.call($this)) || options.open) {
1400				launch($this[0]);
1401			}
1402		}
1403		
1404		return $this;
1405	};
1406
1407	publicMethod.position = function (speed, loadedCallback) {
1408		var
1409		css,
1410		top = 0,
1411		left = 0,
1412		offset = $box.offset(),
1413		scrollTop,
1414		scrollLeft;
1415		
1416		$window.unbind('resize.' + prefix);
1417
1418		// remove the modal so that it doesn't influence the document width/height
1419		$box.css({top: -9e4, left: -9e4});
1420
1421		scrollTop = $window.scrollTop();
1422		scrollLeft = $window.scrollLeft();
1423
1424		if (settings.fixed) {
1425			offset.top -= scrollTop;
1426			offset.left -= scrollLeft;
1427			$box.css({position: 'fixed'});
1428		} else {
1429			top = scrollTop;
1430			left = scrollLeft;
1431			$box.css({position: 'absolute'});
1432		}
1433
1434		// keeps the top and left positions within the browser's viewport.
1435		if (settings.right !== false) {
1436			left += Math.max($window.width() - settings.w - loadedWidth - interfaceWidth - setSize(sett
1436ings.right, 'x'), 0);
1437		} else if (settings.left !== false) {
1438			left += setSize(settings.left, 'x');
1439		} else {
1440			left += Math.round(Math.max($window.width() - settings.w - loadedWidth - interfaceWidth, 0) / 2);
1441		}
1442		
1443		if (settings.bottom !== false) {
1444			top += Math.max(winheight() - settings.h - loadedHeight - interfaceHeight - setSize(settings.bottom, 'y'), 0);
1445		} else if (settings.top !== false) {
1446			top += setSize(settings.top, 'y');
1447		} else {
1448			top += Math.round(Math.max(winheight() - settings.h - loadedHeight - interfaceHeight, 0) / 2);
1449		}
1450
1451		$box.css({top: offset.top, left: offset.left, visibility:'visible'});
1452		
1453		// this gives the wrapper plenty of breathing room so it's floated contents can move around smoothly,
1454		// but it has to be shrank down around the size of div#colorbox when it's done.  If not,
1455		// it can invoke an obscure IE bug when using iframes.
1456		$wrap[0].style.width = $wrap[0].style.height = "9999px";
1457		
1458		function modalDimensions() {
1459			$topBorder[0].style.width = $bottomBorder[0].style.width = $content[0].style.width = (parseInt($box[0].style.width,10) - interfaceWidth)+'px';
1460			$content[0].style.height = $leftBorder[0].style.height = $rightBorder[0].style.height = (parseInt($box[0].style.height,10) - interfaceHeight)+'px';
1461		}
1462
1463		css = {width: settings.w + loadedWidth + interfaceWidth, height: settings.h + loadedHeight + interfaceHeight, top: top, left: left};
1464
1465		// setting the speed to 0 if the content hasn't changed size or position
1466		if (speed) {
1467			var tempSpeed = 0;
1468			$.each(css, function(i){
1469				if (css[i] !== previousCSS[i]) {
1470					tempSpeed = speed;
1471					return;
1472				}
1473			});
1474			speed = tempSpeed;
1475		}
1476
1477		previousCSS = css;
1478
1479		if (!speed) {
1480			$box.css(css);
1481		}
1482
1483		$box.dequeue().animate(css, {
1484			duration: speed || 0,
1485			complete: function () {
1486				modalDimensions();
1487				
1488				active = false;
1489				
1490				// shrink the wrapper down to exactly the size of colorbox to avoid a bug in IE's iframe implementation.
1491				$wrap[0].style.width = (settings.w + loadedWidth + interfaceWidth) + "px";
1492				$wrap[0].style.height = (settings.h + loadedHeight + interfaceHeight) + "px";
1493				
1494				if (settings.reposition) {
1495					setTimeout(function () {  // small delay before binding onresize due to an IE8 bug.
1496						$window.bind('resize.' + prefix, publicMethod.position);
1497					}, 1);
1498				}
1499
1500				if (loadedCallback) {
1501					loadedCallback();
1502				}
1503			},
1504			step: modalDimensions
1505		});
1506	};
1507
1508	publicMethod.resize = function (options) {
1509		var scrolltop;
1510		
1511		if (open) {
1512			options = options || {};
1513			
1514			if (options.width) {
1515				settings.w = setSize(options.width, 'x') - loadedWidth - interfaceWidth;
1516			}
1517
1518			if (options.innerWidth) {
1519				settings.w = setSize(options.innerWidth, 'x');
1520			}
1521
1522			$loaded.css({width: settings.w});
1523			
1524			if (options.height) {
1525				settings.h = setSize(options.height, 'y') - loadedHeight - interfaceHeight;
1526			}
1527
1528			if (options.innerHeight) {
1529				settings.h = setSize(options.innerHeight, 'y');
1530			}
1531
1532			if (!options.innerHeight && !options.height) {
1533				scrolltop = $loaded.scrollTop();
1534				$loaded.css({height: "auto"});
1535				settings.h = $loaded.height();
1536			}
1537
1538			$loaded.css({height: settings.h});
1539
1540			if(scrolltop) {
1541				$loaded.scrollTop(scrolltop);
1542			}
1543			
1544			publicMethod.position(settings.transition === "none" ? 0 : settings.speed);
1545		}
1546	};
1547
1548	publicMethod.prep = function (object) {
1549		if (!open) {
1550			return;
1551		}
1552		
1553		var callback, speed = settings.transition === "none" ? 0 : settings.speed;
1554
1555		$loaded.empty().remove(); // Using empty first may prevent some IE7 issues.
1556
1557		$loaded = $tag(div, 'LoadedContent').append(object);
1558		
1559		function getWidth() {
1560			settings.w = settings.w || $loaded.width();
1561			settings.w = settings.mw && settings.mw < settings.w ? settings.mw : settings.w;
1562			return settings.w;
1563		}
1564		function getHeight() {
1565			settings.h = settings.h || $loaded.height();
1566			settings.h = settings.mh && settings.mh < settings.h ? settings.mh : settings.h;
1567			return settings.h;
1568		}
1569		
1570		$loaded.hide()
1571		.appendTo($loadingBay.show())// content has to be appended to the DOM for accurate size calculations.
1572		.css({width: getWidth(), overflow: settings.scrolling ? 'auto' : 'hidden'})
1573		.css({height: getHeight()})// sets the height independently from the width in case the new width influences the value of height.
1574		.prependTo($content);
1575		
1576		$loadingBay.hide();
1577		
1578		// floating the IMG removes the bottom line-height and fixed a problem where IE miscalculates the width of the parent element as 100% of the document width.
1579		
1580		$(photo).css({'float': 'none'});
1581
1582		callback = function () {
1583			var total = $related.length,
1584				iframe,
1585				frameBorder = 'frameBorder',
1586				allowTransparency = 'allowTransparency',
1587				complete;
1588			
1589			if (!open) {
1590				return;
1591			}
1592			
1593			function removeFilter() { // Needed for IE7 & IE8 in versions of jQuery prior to 1.7.2
1594				if ($.support.opacity === false) {
1595					$box[0].style.removeAttribute('filter');
1596				}
1597			}
1598			
1599			complete = function () {
1600				clearTimeout(loadingTimer);
1601				$loadingOverlay.hide();
1602				trigger(event_complete, settings.onComplete);
1603			};
1604
1605			
1606			$title.html(settings.title).add($loaded).show();
1607			
1608			if (total > 1) { // handle grouping
1609				if (typeof settings.current === "string") {
1610					$current.html(settings.current.replace('{current}', index + 1).replace('{total}', total)).show();
1611				}
1612				
1613				$next[(settings.loop || index < total - 1) ? "show" : "hide"]().html(sett
1613ings.next);
1614				$prev[(settings.loop || index) ? "show" : "hide"]().html(settings.previous);
1615				
1616				slideshow();
1617				
1618				// Preloads images within a rel group
1619				if (settings.preloading) {
1620					$.each([getIndex(-1), getIndex(1)], function(){
1621						var src,
1622							img,
1623							i = $related[this],
1624							data = $.data(i, colorbox);
1625
1626						if (data && data.href) {
1627							src = data.href;
1628							if ($.isFunction(src)) {
1629								src = src.call(i);
1630							}
1631						} else {
1632							src = $(i).attr('href');
1633						}
1634
1635						if (src && isImage(data, src)) {
1636							src = retinaUrl(data, src);
1637							img = document.createElement('img');
1638							img.src = src;
1639						}
1640					});
1641				}
1642			} else {
1643				$groupControls.hide();
1644			}
1645			
1646			if (settings.iframe) {
1647				iframe = $tag('iframe')[0];
1648				
1649				if (frameBorder in iframe) {
1650					iframe[frameBorder] = 0;
1651				}
1652				
1653				if (allowTransparency in iframe) {
1654					iframe[allowTransparency] = "true";
1655				}
1656
1657				if (!settings.scrolling) {
1658					iframe.scrolling = "no";
1659				}
1660				
1661				$(iframe)
1662					.attr({
1663						src: settings.href,
1664						name: (new Date()).getTime(), // give the iframe a unique name to prevent caching
1665						'class': prefix + 'Iframe',
1666						allowFullScreen : true, // allow HTML5 video to go fullscreen
1667						webkitAllowFullScreen : true,
1668						mozallowfullscreen : true
1669					})
1670					.one('load', complete)
1671					.appendTo($loaded);
1672				
1673				$events.one(event_purge, function () {
1674					iframe.src = "//about:blank";
1675				});
1676
1677				if (settings.fastIframe) {
1678					$(iframe).trigger('load');
1679				}
1680			} else {
1681				complete();
1682			}
1683			
1684			if (settings.transition === 'fade') {
1685				$box.fadeTo(speed, 1, removeFilter);
1686			} else {
1687				removeFilter();
1688			}
1689		};
1690		
1691		if (settings.transition === 'fade') {
1692			$box.fadeTo(speed, 0, function () {
1693				publicMethod.position(0, callback);
1694			});
1695		} else {
1696			publicMethod.position(speed, callback);
1697		}
1698	};
1699
1700	function load () {
1701		var href, setResize, prep = publicMethod.prep, $inline, request = ++requests;
1702		
1703		active = true;
1704		
1705		photo = false;
1706		
1707		element = $related[index];
1708		
1709		makeSettings();
1710		
1711		trigger(event_purge);
1712		
1713		trigger(event_load, settings.onLoad);
1714		
1715		settings.h = settings.height ?
1716				setSize(settings.height, 'y') - loadedHeight - interfaceHeight :
1717				settings.innerHeight && setSize(settings.innerHeight, 'y');
1718		
1719		settings.w = settings.width ?
1720				setSize(settings.width, 'x') - loadedWidth - interfaceWidth :
1721				settings.innerWidth && setSize(settings.innerWidth, 'x');
1722		
1723		// Sets the minimum dimensions for use in image scaling
1724		settings.mw = settings.w;
1725		settings.mh = settings.h;
1726		
1727		// Re-evaluate the minimum width and height based on maxWidth and maxHeight values.
1728		// If the width or height exceed the maxWidth or maxHeight, use the maximum values instead.
1729		if (settings.maxWidth) {
1730			settings.mw = setSize(settings.maxWidth, 'x') - loadedWidth - interfaceWidth;
1731			settings.mw = settings.w && settings.w < settings.mw ? settings.w : settings.mw;
1732		}
1733		if (settings.maxHeight) {
1734			settings.mh = setSize(settings.maxHeight, 'y') - loadedHeight - interfaceHeight;
1735			settings.mh = settings.h && settings.h < settings.mh ? settings.h : settings.mh;
1736		}
1737		
1738		href = settings.href;
1739		
1740		loadingTimer = setTimeout(function () {
1741			$loadingOverlay.show();
1742		}, 100);
1743		
1744		if (settings.inline) {
1745			// Inserts an empty placeholder where inline content is being pulled from.
1746			// An event is bound to put inline content back when Colorbox closes or loads new content.
1747			$inline = $tag(div).hide().insertBefore($(href)[0]);
1748
1749			$events.one(event_purge, function () {
1750				$inline.replaceWith($loaded.children());
1751			});
1752
1753			prep($(href));
1754		} else if (settings.iframe) {
1755			// IFrame element won't be added to the DOM until it is ready to be displayed,
1756			// to avoid problems with DOM-ready JS that might be trying to run in that iframe.
1757			prep(" ");
1758		} else if (settings.html) {
1759			prep(settings.html);
1760		} else if (isImage(settings, href)) {
1761
1762			href = retinaUrl(settings, href);
1763
1764			photo = document.createElement('img');
1765
1766			$(photo)
1767			.addClass(prefix + 'Photo')
1768			.bind('error',function () {
1769				settings.title = false;
1770				prep($tag(div, 'Error').html(settings.imgError));
1771			})
1772			.one('load', function () {
1773				var percent;
1774
1775				if (request !== requests) {
1776					return;
1777				}
1778
1779				$.each(['alt', 'longdesc', 'aria-describedby'], function(i,val){
1780					var attr = $(element).attr(val) || $(element).attr('data-'+val);
1781					if (attr) {
1782						photo.setAttribute(val, attr);
1783					}
1784				});
1785
1786				if (settings.retinaImage && window.devicePixelRatio > 1) {
1787					photo.height = photo.height / window.devicePixelRatio;
1788					photo.width = photo.width / window.devicePixelRatio;
1789				}
1790
1791				if (settings.scalePhotos) {
1792					setResize = function () {
1793						photo.height -= photo.height * percent;
1794						photo.width -= photo.width * percent;
1795					};
1796					if (settings.mw && photo.width > settings.mw) {
1797						percent = (photo.width - settings.mw) / photo.width;
1798						setResize();
1799					}
1800					if (settings.mh && photo.height > settings.mh) {
1801						percent = (photo.height - settings.mh) / photo.height;
1802						setResize();
1803					}
1804				}
1805				
1806				if (settings.h) {
1807					photo.style.marginTop = Math.max(settings.mh - photo.height, 0) / 2 + 'px';
1808				}
1809				
1810				if ($related[1] && (settings.loop || $related[index + 1])) {
1811					photo.style.cursor = 'pointer';
1812					photo.onclick = function () {
1813						publicMethod.next();
1814					};
1815				}
1816
1817				photo.style.width = photo.width + 'px';
1818				photo.style.height = photo.height + 'px';
1819
1820				setTimeout(function () { // A pause because Chrome will sometimes report a 0 by 0 size otherwise.
1821					prep(photo);
1822				}, 1);
1823			});
1824			
1825			setTimeout(function () { // A pause because Opera 10.6+ will sometimes not run the onload function otherwise.
1826				photo.src = href;
1827			}, 1);
1828		} else if (href) {
1829			$loadingBay.load(href, settings.data, function (data, status) {
1830				if (request === requests) {
1831					prep(status === 'error' ? $tag(div, 'Error').html(settings.xhrError) : $(this).contents());
1832				}
1833			});
1834		}
1835	}
1836		
1837	// Navigates to the next page/image in a set.
1838	publicMethod.next = function () {
1839		if (!active && $related[1] && (settings.loop || $related[index + 1])) {
1840			index = getIndex(1);
1841			launch($related[index]);
1842		}
1843	};
1844	
1845	publicMethod.prev = function () {
1846		if (!active && $related[1] && (settings.loop || index)) {
1847			index = getIndex(-1);
1848			launch($related[index]);
1849		}
1850	};
1851
1852	// Note: to use this within an iframe use the following format: parent.jQuery.colorbox.close();
1853	publicMethod.close = function () {
1854		if (open && !closing) {
1855			
1856			closing = true;
1857			
1858			open = false;
1859			
1860			trigger(event_cleanup, settings.onCleanup);
1861			
1862			$window.unbind('.' + prefix);
1863			
1864			$overlay.fadeTo(settings.fadeOut || 0, 0);
1865			
1866			$box.stop().fadeTo(settings.fadeOut || 0, 0, function () {
1867			
1868				$box.add($overlay).css({'opacity': 1, cursor: 'auto'}).hide();
1869				
1870				trigger(event_purge);
1871				
1872				$loaded.empty().remove(); // Using empty first may prevent some IE7 issues.
1873				
1874				setTimeout(function () {
1875					closing = false;
1876					trigger(event_closed, settings.onClosed);
1877				}, 1);
1878			});
1879		}
1880	};
1881
1882	// Removes changes Colorbox made to the document, but does not remove the plugin.
1883	publicMethod.remove = function () {
1884		if (!$box) { return; }
1885
1886		$box.stop();
1887		$.colorbox.close();
1888		$box.stop().remove();
1889		$overlay.remove();
1890		closing = false;
1891		$box = null;
1892		$('.' + boxElement)
1893			.removeData(colorbox)
1894			.removeClass(boxElement);
1895
1896		$(document).unbind('click.'+prefix);
1897	};
1898
1899	// A method for fetching the current element Colorbox is referencing.
1900	// returns a jQuery object.
1901	publicMethod.element = function () {
1902		return $(element);
1903	};
1904
1905	publicMethod.settings = defaults;
1906
1907}(jQuery, document, window));
1908
1909$("a[rel='imgbox']").colorbox({
1910    transition: "fade",
1911    speed: 500,
1912    opacity: 0.5,
1913});
1914
1915
1916
1917
1918
1919/*はてブ数表示*/ 
1920//jQuery(function() {
1921//  var $ = $ || jQuery;
1922//  $('.post.hentry .goog_qs-tidbit.goog_qs-tidbit-0 a').each(function() {
1923//    var url = $(this).attr('href');
1924//    var hateb_api = 'http://b.hatena.ne.jp/entry/';
1925//    var hateb_icon = $('<img />', { src: hateb_api+'image/'+url });
1926//    var hateb = $('<a/>', { href: hateb_api+url, target: '_blank' }).append(hateb_icon);
1927//    $(this).after(hateb);
1928//  });
1929//
1930//  $("div#content a:not([href^='<?php echo get_settings('home'); ?>'])");
1931//});
1932
1933
1934
1935
1936
1937
1938/*オートページャー*/  
1939(function($) {
1940	var window = this, options = {},
1941		content, currentUrl, nextUrl,
1942		active = false,
1943		defaults = {
1944			autoLoad: true,
1945			page: 1,
1946			content: '.content',
1947			link: 'a[rel=next]',
1948			insertBefore: null, 
1949			appendTo: null, 
1950			start: function() {},
1951			load: function() {},
1952			disabled: false
1953		};
1954
1955	$.autopager = function(_options) {
1956		var autopager = this.autopager;
1957
1958		if (typeof _options === 'string' && $.isFunction(autopager[_options])) {
1959			var args = Array.prototype.slice.call(arguments, 1),
1960				value = autopager[_options].apply(autopager, args);
1961
1962			return value === autopager || value === undefined ? this : value;
1963		}
1964
1965		_options = $.extend({}, defaults, _options);
1966		autopager.option(_options);
1967
1968		content = $(_options.content).filter(':last');
1969		if (content.length) {
1970			if (!_options.insertBefore && !_options.appendTo) {
1971				var insertBefore = content.next();
1972				if (insertBefore.length) {
1973					set('insertBefore', insertBefore);
1974				} else {
1975					set('appendTo', content.parent());
1976				}
1977			}
1978		}
1979
1980		setUrl();
1981
1982		return this;
1983	};
1984
1985	$.extend($.autopager, {
1986		option: function(key, value) {
1987			var _options = key;
1988
1989			if (typeof key === "string") {
1990				if (value === undefined) {
1991					return options[key];
1992				}
1993				_options = {};
1994				_options[key] = value;
1995			}
1996
1997			$.each(_options, function(key, value) {
1998				set(key, value);
1999			});
2000			return this;
2001		},
2002
2003		enable: function() {
2004			set('disabled', false);
2005			return this;
2006		},
2007
2008		disable: function() {
2009			set('disabled', true);
2010			return this;
2011		},
2012
2013		destroy: function() {
2014			this.autoLoad(false);
2015			options = {};
2016			content = currentUrl = nextUrl = undefined;
2017			return this;
2018		},
2019
2020		autoLoad: function(value) {
2021			return this.option('autoLoad', value);
2022		},
2023
2024		load: function() {
2025			if (active || !nextUrl || options.disabled) {
2026				return;
2027			}
2028
2029			active = true;
2030			options.start(currentHash(), nextHash());
2031			$.get(nextUrl, insertContent);
2032			return this;
2033		}
2034
2035	});
2036
2037	function set(key, value) {
2038		switch (key) {
2039			case 'autoLoad':
2040				if (value && !options.autoLoad) {
2041					$(window).scroll(loadOnScroll);
2042				} else if (!value && options.autoLoad) {
2043					$(window).unbind('scroll', loadOnScroll);
2044				}
2045				break;
2046			case 'insertBefore':
2047				if (value) {
2048					options.appendTo = null;
2049				}
2050				break
2051			case 'appendTo':
2052				if (value) {
2053					options.insertBefore = null;
2054				}
2055				break
2056		}
2057		options[key] = value;
2058	}
2059
2060	function setUrl(context) {
2061		currentUrl = nextUrl || window.location.href;
2062		nextUrl = $(options.link, context).attr('href');
2063	}
2064
2065	function loadOnScroll() {
2066		if (content.offset().top + content.height() < $(document).scrollTop() + $(window).height()) {
2067			$.autopager.load();
2068		}
2069	}
2070
2071	function insertContent(res) {
2072		var _options = options,
2073			nextPage = $('<div/>').append(res.replace(/<script(.|\s)*?\/script>/g, "")),
2074			nextContent = nextPage.find(_options.content); 
2075
2076		set('page', _options.page + 1);
2077		setUrl(nextPage);
2078		if (nextContent.length) {
2079			if (_options.insertBefore) {
2080				nextContent.insertBefore(_options.insertBefore);
2081			} else {
2082				nextContent.appendTo(_options.appendTo);
2083			}
2084			_options.load.call(nextContent.get(), currentHash(), nextHash());
2085			content = nextContent.filter(':last');
2086		}
2087		active = false;
2088	}
2089
2090	function currentHash() {
2091		return {
2092			page: options.page,
2093			url: currentUrl
2094		};
2095	}
2096
2097	function nextHash() {
2098		return {
2099			page: options.page + 1,
2100			url: nextUrl
2101		};
2102	}
2103})(jQuery);
2104$(window).load(function () {
2105    $.autopager({
2106        autoLoad: true,
2107        content: '.post',
2108        link: '.ajaxLoad a'
2109    });
2110});
2111
2112
2113
2114
2115
2116
2117/*スライドメニュー*/  
2118(function($){
2119	var settings, status;
2120	var Status = {
2121		CLOSE: 0,
2122		OPEN: 1,
2123		IN_PROGRESS: 2
2124	};
2125	var smY, sfY, mfY, moveY, startY, draggedY, startTime, diffTime;
2126
2127
2128	function _open() {
2129		status = Status.OPEN;
2130		$(settings.menu + ", " + settings.main_contents).addClass('show');
2131		$(settings.menu_contents).show();
2132		$("html, body").css("overflow-x", "hidden");
2133		$("html").bind("touchmove.scrollContents", function() {
2134			event.preventDefault();
2135		});
2136		event.preventDefault();
2137	};
2138
2139	function _close() {
2140		status = Status.IN_PROGRESS;
2141		$(settings.menu + ", " + settings.main_contents).removeClass('show');
2142		$("html").unbind("touchmove.scrollContents");
2143		event.preventDefault();
2144	};
2145
2146	function _buttonTouchStart() {
2147		switch(status) {
2148			case Status.IN_PROGRESS:
2149				status = Status.CLOSE;
2150				break;
2151
2152			case Status.OPEN:
2153				_close();
2154				break;
2155
2156			case Status.CLOSE:
2157				break;
2158		}
2159	}
2160
2161	function _buttonTouchEnd() {
2162		switch(status) {
2163			case Status.IN_PROGRESS:
2164				status = Status.CLOSE;
2165				break;
2166
2167			case Status.OPEN:
2168				break;
2169
2170			case Status.CLOSE:
2171				_open();
2172				break;
2173		}
2174	};
2175
2176	function _bodyTouchStart() {
2177		switch(status) {
2178			case Status.IN_PROGRESS:
2179			case Status.CLOSE:
2180				break;
2181
2182			case Status.OPEN:
2183				_close();
2184				break;
2185		}
2186	}
2187
2188	$.fn.slideMenu = function(options) {
2189		settings = $.extend({}, $.fn.slideMenu.defaults, options);
2190		status = Status.CLOSE;
2191		var button_selector = this.selector;
2192
2193		smY = 0;
2194
2195		$(document).ready(function() {
2196			var menu_list_height;
2197
2198			//menu button - touchstart
2199			$(button_selector).bind("touchstart.menu_button", function() {
2200				_buttonTouchStart();
2201			});
2202
2203			//menu button - touchend
2204			$(button_selector).bind("touchend.menu_button"  , function() {
2205				_buttonTouchEnd();
2206			});
2207
2208			//main contents
2209			$(settings.main_contents).bind("touchstart.main_contents", function() {
2210				_bodyTouchStart();
2211			});
2212
2213
2214			//scroll - touchStart
2215			$(settings.menu_contents).bind("touchstart.scrollMenu", function() {
2216				menu_list_height = $(settings.menu_list).height();
2217				sfY = event.touches[0].screenY;
2218				startTime = (new Date()).getTime();
2219				startY = event.changedTouches[0].clientY;
2220			});
2221
2222			//scroll - touchMove
2223			$(settings.menu_contents).bind("touchmove.scrollMenu", function() {
2224				mfY = event.changedTouches[0].screenY;
2225				moveY = smY + mfY - sfY;
2226				draggedY = event.changedTouches[0].clientY - startY;
2227
2228				$(this).css({
2229					'-webkit-transition': 'none',
2230					'-webkit-transform': 'translate3d(0px,'+ moveY +'px,0px)'
2231				});
2232			});
2233
2234			//scroll - touchEnd
2235			$(settings.menu_contents).bind("touchend.scrollMenu", function() {
2236				diffTime = (new Date()).getTime() - startTime;
2237				smY = smY + (mfY - sfY);
2238
2239				if (diffTime < 200 && draggedY > 0) { // scroll up
2240					moveY += Math.abs((draggedY / diffTime) * 500);
2241					$(settings.menu_contents).css({
2242						'-webkit-transition': '-webkit-transform .7s ease-out',
2243						'-webkit-transform': 'translate3d(0px,'+ moveY +'px,0px)'
2244					});
2245					smY = moveY;
2246				} else if (diffTime < 200 && draggedY < 0) { // scroll down
2247					moveY -= Math.abs((draggedY / diffTime) * 500);
2248					$(settings.menu_contents).css({
2249						'-webkit-transition': '-webkit-transform .7s ease-out',
2250						'-webkit-transform': 'translate3d(0px,'+ moveY +'px,0px)'
2251					});
2252					smY = moveY;
2253				}
2254
2255				if (moveY > 0) {
2256					$(settings.menu_contents).css({
2257						'-webkit-transition': '-webkit-transform .5s ease-out',
2258						'-webkit-transform': 'translate3d(0px,'+ 0 +'px,0px)'
2259					});
2260					smY = 0;
2261				} else if (screen.height - menu_list_height > moveY + settings.bottom_margin) {
2262					$(settings.menu_contents).css({
2263						'-webkit-transition': '-webkit-transform .5s ease-out',
2264						'-webkit-transform': 'translate3d(0px,'+ (screen.height - menu_list_height - settings.bottom_margin) +'px,0px)'
2265					});
2266					smY = screen.height - menu_list_height - settings.bottom_margin;
2267				}
2268			});
2269		});
2270	};
2271
2272	$.fn.slideMenu.defaults = {
2273		main_contents: "#main_contents",
2274		menu: "#slidemenu",
2275		menu_contents: "#slidemenu_contents",
2276		menu_list: "#slidemenu_list",
2277		speed: 200,
2278		width: 240,
2279		bottom_margin: 80
2280	};
2281
2282})(jQuery);
2283$("#menu_button").slideMenu({main_contents: "#container"});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.