// source --> https://fleursenvracmtl.com/wp-content/plugins/miniorange-login-openid/includes/js/mo_openid_jquery.cookie.min.js?ver=6.8.5 
/*!
 * jQuery Cookie Plugin v1.4.1
 * https://github.com/carhartl/jquery-cookie
 *
 * Copyright 2013 Klaus Hartl
 * Released under the MIT license
 */
if (window.location.hash && window.location.hash == '#_=_') {
    window.location.href = window.location.href.split('#_=_')[0];
}




!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):jQuery)}(function(a){function b(a){return h.raw?a:encodeURIComponent(a)}function c(a){return h.raw?a:decodeURIComponent(a)}function d(a){return b(h.json?JSON.stringify(a):String(a))}function e(a){0===a.indexOf('"')&&(a=a.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return a=decodeURIComponent(a.replace(g," ")),h.json?JSON.parse(a):a}catch(b){}}function f(b,c){var d=h.raw?b:e(b);return a.isFunction(c)?c(d):d}var g=/\+/g,h=a.cookie=function(e,g,i){if(void 0!==g&&!a.isFunction(g)){if(i=a.extend({},h.defaults,i),"number"==typeof i.expires){var j=i.expires,k=i.expires=new Date;k.setTime(+k+864e5*j)}return document.cookie=[b(e),"=",d(g),i.expires?"; expires="+i.expires.toUTCString():"",i.path?"; path="+i.path:"",i.domain?"; domain="+i.domain:"",i.secure?"; secure":""].join("")}for(var l=e?void 0:{},m=document.cookie?document.cookie.split("; "):[],n=0,o=m.length;o>n;n++){var p=m[n].split("="),q=c(p.shift()),r=p.join("=");if(e&&e===q){l=f(r,g);break}e||void 0===(r=f(r))||(l[q]=r)}return l};h.defaults={},a.removeCookie=function(b,c){return void 0===a.cookie(b)?!1:(a.cookie(b,"",a.extend({},c,{expires:-1})),!a.cookie(b))}});
// source --> https://fleursenvracmtl.com/wp-content/plugins/miniorange-login-openid/includes/js/mo-openid-social_login.js?ver=6.8.5 
jQuery(window).on('load',function () {
    function mo_openid_set_cookie(cname,cvalue){var d=new Date();d.setTime(d.getTime()+(3*60*1000));var expires="expires="+d.toUTCString();document.cookie=cname+"="+cvalue+";"+expires+";path=/"}
    function mo_openid_get_cookie(cname){var name=cname+"=";var ca=document.cookie.split(';');for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==' '){c=c.substring(1)}
        if(c.indexOf(name)==0){return c.substring(name.length,c.length)}}
        return""}

    // If cookie is set, scroll to the position saved in the cookie.
    if ( (mo_openid_get_cookie("scroll")) !== 'null' ) {
        jQuery(document).scrollTop( mo_openid_get_cookie("scroll") );
        mo_openid_set_cookie("scroll",null);
    }

    // When a button is clicked...
    jQuery('.custom-login-button').on("click", function() {
        // Set a cookie that holds the scroll position.
        mo_openid_set_cookie("scroll",jQuery(document).scrollTop());
    });

    jQuery('.login-button').on("click", function() {
        // Set a cookie that holds the scroll position.
        mo_openid_set_cookie("scroll",jQuery(document).scrollTop());
    });


});

jQuery(document).ready(function () {
    //show mcrypt extension installation reason

    jQuery("#openid_sharing_shortcode_title").click(function () {
        jQuery("#openid_sharing_shortcode").slideToggle(400);
    });

});


if (window.location.hash && window.location.hash == '#_=_') {
    window.location.href = window.location.href.split('#_=_')[0];
};