").append(m.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},m.expr.filters.animated=function(a){return m.grep(m.timers,function(b){return a===b.elem}).length};var cd=a.document.documentElement;function dd(a){return m.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}m.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=m.css(a,"position"),l=m(a),n={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=m.css(a,"top"),i=m.css(a,"left"),j=("absolute"===k||"fixed"===k)&&m.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),m.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(n.top=b.top-h.top+g),null!=b.left&&(n.left=b.left-h.left+e),"using"in b?b.using.call(a,n):l.css(n)}},m.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){m.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,m.contains(b,e)?(typeof e.getBoundingClientRect!==K&&(d=e.getBoundingClientRect()),c=dd(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===m.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),m.nodeName(a[0],"html")||(c=a.offset()),c.top+=m.css(a[0],"borderTopWidth",!0),c.left+=m.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-m.css(d,"marginTop",!0),left:b.left-c.left-m.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||cd;while(a&&!m.nodeName(a,"html")&&"static"===m.css(a,"position"))a=a.offsetParent;return a||cd})}}),m.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);m.fn[a]=function(d){return V(this,function(a,d,e){var f=dd(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?m(f).scrollLeft():e,c?e:m(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),m.each(["top","left"],function(a,b){m.cssHooks[b]=Lb(k.pixelPosition,function(a,c){return c?(c=Jb(a,b),Hb.test(c)?m(a).position()[b]+"px":c):void 0})}),m.each({Height:"height",Width:"width"},function(a,b){m.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){m.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return V(this,function(b,c,d){var e;return m.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?m.css(b,c,g):m.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),m.fn.size=function(){return this.length},m.fn.andSelf=m.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return m});var ed=a.jQuery,fd=a.$;return m.noConflict=function(b){return a.$===m&&(a.$=fd),b&&a.jQuery===m&&(a.jQuery=ed),m},typeof b===K&&(a.jQuery=a.$=m),m});
/*********************************
■ピグミーCMS用 http://Pygmy_CMS.com/
■テキストPOST送信 JavaScript
Ver.1.0.1 2016/01/25 【著作:ピグミーCMS http://Pygmy_CMS.com/】
*********************************/
//FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
// ■テキストをPOST送信
function post_text(x_post_url, x_async, x_data) { // x_async[非同期:true, 同期:false], x_data[送信データ:GET形式]
var res = jQuery.ajax({
url: x_post_url,
type: "POST",
async: x_async,
data: x_data + "&Pygmy_location_href=" + encodeURIComponent(location.href)
}).responseText;
// レスポンス後の処理
if (res && res.match(/(^ERROR:::|\/Pygmy_CMS\/.+?\.php on line \d)/)) {
alert(res);
console.log(res);
} else if (res && res.match(/^Message:::/)) {
res = res.replace(/^Message:::/, "");
alert(res);
console.log(res);
} else if (res && res.match(/^ReFresh:::/)) {
location.reload();
} else if (res && res.match(/^URL:::/)) {
res = res.replace(/^URL:::/, "");
location.href = res;
} else if (res) {
return res;
}
}
//FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
/*********************************
■ピグミーCMS用 http://Pygmy_CMS.com/
■トースト通知 JavaScript
Ver.1.0.0 2016/05/02 【著作:ピグミーCMS http://Pygmy_CMS.com/】
*********************************/
//FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
// ■トースト通知
function toast(str, wait_time){
if(str == undefined) str = '';
if(wait_time == undefined) wait_time = 4000;
jQuery('.Pygmy_toast').remove();
// Pygmyタグエリアに トースト通知用div を書き出す
jQuery('.Pygmy_Tag_Area').append('
' + str + '
');
// css
jQuery('.Pygmy_toast').css('position', 'fixed');
jQuery('.Pygmy_toast').css('z-index', '77');
jQuery('.Pygmy_toast').css('color', '#FFFFFF');
jQuery('.Pygmy_toast').css('background', 'rgba(0, 0, 0, 0.7)');
jQuery('.Pygmy_toast').css('padding', '1em');
jQuery('.Pygmy_toast').css('border-radius', '5px');
jQuery('.Pygmy_toast').css('box-shadow', '2px 2px 5px rgba(0, 0, 0, 0.4)');
jQuery('.Pygmy_toast').css('box-sizing', 'border-box');
var x_top = 50;
jQuery('.Pygmy_toast').css('top', x_top).hide().fadeIn('fast');
var x_left = jQuery(window).width() / 2 - jQuery('.Pygmy_toast').width() / 2;
x_left -= 16;// 微調整
jQuery('.Pygmy_toast').css('left', x_left).hide().fadeIn('fast');
var x_timer;
clearTimeout(x_timer);
x_timer = setTimeout(function(){
jQuery('.Pygmy_toast').fadeOut('slow',function(){
jQuery(this).remove();
});
}, wait_time);
}
//FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
jQuery(function(){
jQuery('
').appendTo('body');
});
jQuery(function(){
jQuery('.Pygmy_Tag_Area').append('
\
\
\
');
});
jQuery(function(){
jQuery('.Pygmy_contact_form').html('
\
\
\
\
\
お問い合わせ完了 \
\
【お問い合わせ番号】
\
\
お問い合わせ内容をメールにてお送りしております。お問い合わせ頂き、誠にありがとうございました。
\
\
閉じる
\
\
\
\
\
\
');
});
//------編集前のを保持------//
var before_HTML = '';
var after_HTML = '';
var edited_count = 0;
jQuery(document).ready( function(){
before_HTML = jQuery("html").get(0).outerHTML;
});
//---------Panel 準備---------//
var modal;
var panel;
var modal_clicked_time;
var Panel_isOpen = false;
var before_textarea_Text_val;
// Panelを表示
function Panel_open(n, msg){
if( new Date().getTime() <= modal_clicked_time + 100){// 100ミリ秒経っていなかったらreturn
return;
}
if(msg == undefined){
msg = "";
}
jQuery(".Pygmy_panel .Message").html(msg);// メッセージを設定
panel = jQuery(n);
modal = jQuery('.Pygmy_Panel_modal');
modal.css("height", jQuery(window).height() );
modal.fadeIn();
panel.css("display", "block");
setPosition();
Panel_isOpen = true;
}
// Panelを画面上部に表示
function setPosition(){
panel.css("position", "fixed");
panel.css("top", "50");
if(jQuery(window).width() >= 900){
panel.css("left", ( jQuery(window).width() - panel.width() - 60 ) / 2 - 20);
}
}
// Panelを閉じる
function Panel_close(n){
if(n){
panel = jQuery(n);
}
panel.css("display", "none");
modal = jQuery('.Pygmy_Panel_modal');
modal.css("display", "none");
Panel_isOpen = false;
Touchmove_Now = Touchmove_Now - 1;
}
// クリックされたターゲットを確認
function get_target(e){
if(e.target.id){
return e.target.id;
}else if( jQuery(e.target).parent().attr("id") != undefined ){
return jQuery(e.target).parent().attr("id");
}else if( jQuery(e.target).attr("for") != undefined ){//
return jQuery(e.target).attr("for");
}
}
//-------------イベント-------------//
// グローバル変数
edit_index = -1;
edit_html = '';
evt1 = '';
hasTapEvent = ('ontouchstart' in window);
Touchmove_Now = 0;
if( hasTapEvent == "true"){// タップイベントが存在する
evt1 = "touchend";
}else{
evt1 = "mousedown";
}
jQuery(function(){
//------画面サイズ変更イベント-----//
// 画面サイズを変えたとき
jQuery(window).on('resize', function(e){
try{
if( panel != undefined ){
// 縦に1px移動させて、URLのアドレスバーを隠す
if( jQuery( window ).scrollTop() <= 0 ){
Touchmove_Now = 0;
jQuery( window ).scrollTop(1);
}
if( panel.css("top") != undefined && panel.css("top") == "auto" ){
panel.css("top", 0);
}
if( panel.css("top") != undefined && panel.css("top") != (jQuery( window ).scrollTop() + "px") ){
if(Panel_isOpen == true){
// Panelを画面上部に表示
setPosition();
}
}
}
}catch(e){
console.log(e);
}
});
//---------スワイプイベント---------//
jQuery(document).on("touchmove", "*", function(){
if( jQuery( window ).scrollTop() <= 0 ){
Touchmove_Now = 0;
jQuery( window ).scrollTop(1);
}else{
Touchmove_Now = 2;
}
});
//---------マウスイベント---------//
// ■body 内をクリックしたら
jQuery(document).on(evt1, "*", function(e){
// ◇クリックしたボタンで振り分け
switch( get_target(e) ){
// ■半透明のモーダルパネルをクリックしたら
case "Pygmy_Panel_modal":
modal_clicked_time = new Date().getTime();
Panel_close(); return false; break;
// ■Panel の [キャンセル] ボタンをクリックしたら
case "button-Cancel":
Panel_close(); return false; break;
}
});
});
jQuery(function(){
// ■body 内をクリックしたら
jQuery(document).on(evt1, "*", function(e){
// ◇クリックしたボタンで振り分け
switch( get_target(e) ){
// ■[お申込み内容確認へ] ボタンをクリックしたら
case "button-go_to_contact_confirm_page":
// POSTデータ作成
var x_data = jQuery("#form1").serialize();
// テキストをPOST送信
var x_value = post_text("/Pygmy_CMS/Pygmy_contact_form/1.0.5/class.php", false, x_data);
if(x_value != undefined){
// step_020 お申込み内容確認画面を表示
jQuery(".Pygmy_contact_form").html(x_value);
}
return false; break;
// ■[戻る] ボタンをクリックしたら
case "button-back_to_step_010":
var x_value = post_text("/Pygmy_CMS/Pygmy_contact_form/1.0.5/class.php", false, "action=button-back_to_step_010");
if(x_value != undefined){
// step_010 お客様情報 入力画面を表示
jQuery(".Pygmy_contact_form").html(x_value);
}
return false; break;
// ■[送信] ボタンをクリックしたら(代引き)
case "button-contact_confirm_ok":
var x_value = post_text("/Pygmy_CMS/Pygmy_contact_form/1.0.5/class.php", false, "action=button-contact_confirm_ok");
if(x_value != undefined){
// step_010 お客様情報 入力画面 と Thanks Panel を表示
jQuery(".Pygmy_contact_form").html(x_value);
// Thanks Panel を開く
Panel_open('.Panel_Thanks');
}
return false; break;
}
});
});