// source --> https://www.ashiya-central-hospital.jp/wp-content/themes/lightning_child/jquery.cookie.js /*! * jQuery Cookie Plugin v1.4.1 * https://github.com/carhartl/jquery-cookie * * Copyright 2006, 2014 Klaus Hartl * Released under the MIT license */ (function (factory) { if (typeof define === 'function' && define.amd) { // AMD (Register as an anonymous module) define(['jquery'], factory); } else if (typeof exports === 'object') { // Node/CommonJS module.exports = factory(require('jquery')); } else { // Browser globals factory(jQuery); } }(function ($) { var pluses = /\+/g; function encode(s) { return config.raw ? s : encodeURIComponent(s); } function decode(s) { return config.raw ? s : decodeURIComponent(s); } function stringifyCookieValue(value) { return encode(config.json ? JSON.stringify(value) : String(value)); } function parseCookieValue(s) { if (s.indexOf('"') === 0) { // This is a quoted cookie as according to RFC2068, unescape... s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\'); } try { // Replace server-side written pluses with spaces. // If we can't decode the cookie, ignore it, it's unusable. // If we can't parse the cookie, ignore it, it's unusable. s = decodeURIComponent(s.replace(pluses, ' ')); return config.json ? JSON.parse(s) : s; } catch(e) {} } function read(s, converter) { var value = config.raw ? s : parseCookieValue(s); return $.isFunction(converter) ? converter(value) : value; } var config = $.cookie = function (key, value, options) { // Write if (arguments.length > 1 && !$.isFunction(value)) { options = $.extend({}, config.defaults, options); if (typeof options.expires === 'number') { var days = options.expires, t = options.expires = new Date(); t.setMilliseconds(t.getMilliseconds() + days * 864e+5); } return (document.cookie = [ encode(key), '=', stringifyCookieValue(value), options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE options.path ? '; path=' + options.path : '', options.domain ? '; domain=' + options.domain : '', options.secure ? '; secure' : '' ].join('')); } // Read var result = key ? undefined : {}, // To prevent the for loop in the first place assign an empty array // in case there are no cookies at all. Also prevents odd result when // calling $.cookie(). cookies = document.cookie ? document.cookie.split('; ') : [], i = 0, l = cookies.length; for (; i < l; i++) { var parts = cookies[i].split('='), name = decode(parts.shift()), cookie = parts.join('='); if (key === name) { // If second argument (value) is a function it's a converter... result = read(cookie, value); break; } // Prevent storing a cookie that we couldn't decode. if (!key && (cookie = read(cookie)) !== undefined) { result[name] = cookie; } } return result; }; config.defaults = {}; $.removeCookie = function (key, options) { // Must not alter options, thus extending a fresh object... $.cookie(key, '', $.extend({}, options, { expires: -1 })); return !$.cookie(key); }; })); // source --> https://www.ashiya-central-hospital.jp/wp-content/themes/lightning_child/jquery.textresizer.js /* jQuery Text Resizer Plugin v1.1.0 Copyright (c) 2009-2013 Mario J Vargas See the file MIT-LICENSE.txt for copying permission. Website: http://angstrey.com/ Documentation: http://angstrey.com/index.php/projects/jquery-text-resizer-plugin/ */ ;(function ($) { "use strict"; var TextResizerPlugin, debug, stringify; stringify = function (value) { if ("object" === (typeof window.JSON) && "function" === (typeof window.JSON.stringify)) { return JSON.stringify(value); } // Because of IE7 and below... Need I say more? return value; }; debug = function (obj) { if (window.console && "function" === (typeof window.console.log)) { setTimeout(function () { var key, output = [], keyValuePair; if ("string" === (typeof obj)) { output.push("jquery.textresizer => " + obj); } else { output.push("jquery.textresizer => {"); for (key in obj) { if (obj.hasOwnProperty(key)) { keyValuePair = [ " ", key, ": ", stringify(obj[key]) ].join(""); output.push(keyValuePair); } } output.push("}"); } console.log(output.join("\n")); }, 0); } }; TextResizerPlugin = function ($elements, options) { this.$elements = $elements; this.settings = options || TextResizerPlugin.defaults; }; TextResizerPlugin.defaults = { debugMode: false, // Disable debug mode. type: "fontSize", // Available options: fontSize, css, cssClass. target: "body", // The HTML element to which the new font size will be applied. selectedIndex: -1, // No font size option selected by default. suppressClickThrough: true // Disables click-through of font size controls. }; TextResizerPlugin.prototype.buildDefaultFontSizes = function (numElms) { if (0 === numElms) { return; } var size0 = 8, // Initial size, measured in pixels mySizes = [], i, value; if (this.settings.debugMode) { debug("In buildDefaultFontSizes: numElms = " + numElms); } if (this.settings.debugMode) { for (i = 0; i < numElms; i += 1) { // Append elements in increments of 2 units value = (size0 + (i * 2)) / 10; mySizes.push(value + "em"); debug("In buildDefaultFontSizes: mySizes[" + i + "] = " + mySizes[i]); } } else { for (i = 0; i < numElms; i += 1) { // Append elements in increments of 2 units value = (size0 + (i * 2)) / 10; mySizes.push(value + "em"); } } return mySizes; }; TextResizerPlugin.prototype.serializeHash = function (dictionary) { // jQuery's param() function does not replace white space correctly return $.param(dictionary).replace(/\+/g, "%20"); }; TextResizerPlugin.prototype.deserializeHash = function (serializedValue) { var i, valueCount, keyValuePair, dictionary = {}, separatorPattern = /\&|\|/g, dictValues = serializedValue.split(separatorPattern); for (i = 0, valueCount = dictValues.length; i < valueCount; i += 1) { // Separate key/value pair and assign to dictionary keyValuePair = dictValues[i].split("="); dictionary[keyValuePair[0]] = window.decodeURIComponent(keyValuePair[1]); } // Now that the object is finished, return it return dictionary; }; TextResizerPlugin.prototype.buildCookieID = function (selector, target, prop) { return "JQUERY.TEXTRESIZER[" + selector + "," + target + "]." + prop; }; TextResizerPlugin.prototype.getCookie = function (selector, target, prop) { var id = this.buildCookieID(selector, target, prop), cookieValue = $.cookie(id); if ($.cookie(id + ".valueType") === "dict" && cookieValue) { return this.deserializeHash(cookieValue); } return cookieValue; }; TextResizerPlugin.prototype.setCookie = function (selector, target, prop, value) { var id = this.buildCookieID(selector, target, prop), // Cookie expires in 1 year (365 days/year) cookieOpts = { expires: 365, path: "/" }, serializedVals; // Serialize value if it's an object if ("object" === (typeof value)) { // Store type of value so we can convert it back // to a dictionary object $.cookie(id + ".valueType", "dict", cookieOpts); serializedVals = this.serializeHash(value); $.cookie(id, serializedVals, cookieOpts); if (this.settings.debugMode) { debug("In setCookie: Cookie: " + id + ": " + serializedVals); } } else { $.cookie(id, value, cookieOpts); if (this.settings.debugMode) { debug("In setCookie: Cookie (not hash): " + id + ": " + value); } } }; TextResizerPlugin.prototype.applyInlineCssProperties = function ($targetElement, cssStyles) { $targetElement.css(cssStyles); }; TextResizerPlugin.prototype.applyCssClass = function ($targetElement, newSize, cssClasses) { // Remove previously assigned CSS class from // target element. Iterating through matched // elements ensures the class is removed $.each(cssClasses, function () { var className = this.toString(); $targetElement.each(function () { var $currentElement = $(this); if ($currentElement.hasClass(className)) { $currentElement.removeClass(className); } }); }); // Now apply the new CSS class $targetElement.addClass(newSize); }; TextResizerPlugin.prototype.applySpecificFontSize = function ($targetElement, newSize) { $targetElement.css("font-size", newSize); }; TextResizerPlugin.prototype.applyFontSize = function (newSize) { if (this.settings.debugMode) { debug([ "In applyFontSize(): target: ", this.settings.target, " | ", "newSize: ", stringify(newSize), " | ", "type: ", this.settings.type ].join("")); } var $targetElement = $(this.settings.target); switch (this.settings.type) { case "css": this.applyInlineCssProperties($targetElement, newSize); break; case "cssClass": this.applyCssClass($targetElement, newSize, this.settings.sizes); break; default: this.applySpecificFontSize($targetElement, newSize); break; } }; TextResizerPlugin.prototype.loadPreviousState = function () { var settings = this.settings, rawSelectedIndex, selectedIndex, prevSize; // Determine if jquery.cookie is installed if ($.cookie) { if (settings.debugMode) { debug("In loadPreviousState(): jquery.cookie: INSTALLED"); } rawSelectedIndex = this.getCookie(settings.selector, settings.target, "selectedIndex"); selectedIndex = parseInt(rawSelectedIndex, 10); prevSize = this.getCookie(settings.selector, settings.target, "size"); if (!isNaN(selectedIndex)) { settings.selectedIndex = selectedIndex; } if (settings.debugMode) { debug("In loadPreviousState: selectedIndex: " + selectedIndex + "; type: " + (typeof selectedIndex)); debug("In loadPreviousState: prevSize: " + prevSize + "; type: " + (typeof prevSize)); } if (prevSize) { this.applyFontSize(prevSize); } } else { if (settings.debugMode) { debug("In loadPreviousState(): jquery.cookie: NOT INSTALLED"); } } }; TextResizerPlugin.prototype.markActive = function (sizeButton) { // Deactivate previous button $(this.settings.selector).removeClass("textresizer-active"); // Mark this button as active $(sizeButton).addClass("textresizer-active"); }; TextResizerPlugin.prototype.saveState = function (newSize) { // Determine if jquery.cookie is installed if ($.cookie) { var selector = this.settings.selector, target = this.settings.target, selectedIndex = this.settings.selectedIndex; if (this.settings.debugMode) { debug("In saveState(): jquery.cookie: INSTALLED"); } this.setCookie(selector, target, "size", newSize); this.setCookie(selector, target, "selectedIndex", selectedIndex); } else { if (this.settings.debugMode) { debug("In saveState(): jquery.cookie: NOT INSTALLED"); } } }; TextResizerPlugin.prototype.attachResizerToElement = function (element, index) { var thisPlugin = this, settings = thisPlugin.settings, $resizeButton = $(element), // Current resize button currSizeValue = settings.sizes[index]; // Size corresponding to this resize button // Mark this button as active if necessary if (index === settings.selectedIndex) { $resizeButton.addClass("textresizer-active"); } // Apply the font size to target element when its // corresponding resize button is clicked $resizeButton.on("click", { index: index }, function (e) { var currentElement = this; if (settings.suppressClickThrough) { e.preventDefault(); } settings.selectedIndex = e.data.index; thisPlugin.applyFontSize(currSizeValue); thisPlugin.saveState(currSizeValue); thisPlugin.markActive(currentElement); }); }; TextResizerPlugin.prototype.init = function () { var numberOfElements = this.$elements.size(), debugMode = TextResizerPlugin.defaults.debugMode; if (debugMode) { debug("init() => selection count: " + numberOfElements); } // Stop plugin execution if no matched elements if (0 === numberOfElements) { return; } // Set up main options before element iteration this.settings = $.extend( { selector: this.$elements.selector, sizes: this.buildDefaultFontSizes(numberOfElements) // Default font sizes based on number of resize buttons. }, $.fn.textresizer.defaults, this.settings ); debugMode = this.settings.debugMode; if (debugMode) { debug(this.settings); } // Ensure that the number of defined sizes is suitable // for number of resize buttons. if (numberOfElements > this.settings.sizes.length) { if (debugMode) { debug("ERROR: Number of defined sizes incompatible with number of buttons => elements: " + numberOfElements + "; defined sizes: " + this.settings.sizes.length + "; target: " + this.settings.target); } return; // Stop execution of the plugin } this.loadPreviousState(); return this; }; $.fn.textresizer = function (options) { var plugin = new TextResizerPlugin(this, options).init(); // Iterate and bind click event function to each element return this.each(function (i) { plugin.attachResizerToElement(this, i); }); }; $.fn.textresizer.defaults = TextResizerPlugin.defaults; })(window.jQuery); // source --> https://www.ashiya-central-hospital.jp/wp-content/themes/lightning_child/lity.min.js /*! Lity - v2.3.1 - 2018-04-20 * http://sorgalla.com/lity/ * Copyright (c) 2015-2018 Jan Sorgalla; Licensed MIT */ !function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(c){return b(a,c)}):"object"==typeof module&&"object"==typeof module.exports?module.exports=b(a,require("jquery")):a.lity=b(a,a.jQuery||a.Zepto)}("undefined"!=typeof window?window:this,function(a,b){"use strict";function c(a){var b=B();return N&&a.length?(a.one(N,b.resolve),setTimeout(b.resolve,500)):b.resolve(),b.promise()}function d(a,c,d){if(1===arguments.length)return b.extend({},a);if("string"==typeof c){if(void 0===d)return void 0===a[c]?null:a[c];a[c]=d}else b.extend(a,c);return this}function e(a){for(var b,c=decodeURI(a.split("#")[0]).split("&"),d={},e=0,f=c.length;e-1?"&":"?")+b.param(c)}function g(a,b){var c=a.indexOf("#");return-1===c?b:(c>0&&(a=a.substr(c)),b+a)}function h(a){return b('').append(a)}function i(a,c){var d=c.opener()&&c.opener().data("lity-desc")||"Image with no description",e=b(''+d+''),f=B(),g=function(){f.reject(h("Failed loading image"))};return e.on("load",function(){if(0===this.naturalWidth)return g();f.resolve(e)}).on("error",g),f.promise()}function j(a,c){var d,e,f;try{d=b(a)}catch(a){return!1}return!!d.length&&(e=b(''),f=d.hasClass("lity-hide"),c.element().one("lity:remove",function(){e.before(d).remove(),f&&!d.closest(".lity-content").length&&d.addClass("lity-hide")}),d.removeClass("lity-hide").after(e))}function k(a){var c=J.exec(a);return!!c&&o(g(a,f("https://www.youtube"+(c[2]||"")+".com/embed/"+c[4],b.extend({autoplay:1},e(c[5]||"")))))}function l(a){var c=K.exec(a);return!!c&&o(g(a,f("https://player.vimeo.com/video/"+c[3],b.extend({autoplay:1},e(c[4]||"")))))}function m(a){var c=M.exec(a);return!!c&&(0!==a.indexOf("http")&&(a="https:"+a),o(g(a,f("https://www.facebook.com/plugins/video.php?href="+a,b.extend({autoplay:1},e(c[4]||""))))))}function n(a){var b=L.exec(a);return!!b&&o(g(a,f("https://www.google."+b[3]+"/maps?"+b[6],{output:b[6].indexOf("layer=c")>0?"svembed":"embed"})))}function o(a){return'