PageSourceSearch

https://www.worthfultools.com/template/en/js/hwaq.js

js worthfultools.com collected 2026-10-04 04:57:15 UTC 37,462 bytes, 538 lines download raw bytes

1$(document).ready(function () {
2    $.plugin = {
3        NUMBER_plus: function (obj, set_num, speed) {
4            if (!speed)
5                speed = 60;
6            if (!set_num)
7                set_num = 50;
8            var scroll_lock = true;
9            $(window).scroll(function () {
10                if ($(document).scrollTop() + $(window).height() > obj.offset().top && obj.offset().top + obj.innerHeight() > $(document).scrollTop() && scroll_lock) {
11                    scroll_lock = false;
12                    var time_lock = 0,
13                        This = obj.find('li'), // 获取对象
14                        num = [];  // 数据容器
15                    This.each(function () {
16                        //数据缓存
17                        num.push($(this).find('em').attr('data-num') * 1);
18                    });
19                    var set_plus_num = function (index) {
20                            // 数字相加
21                            if (This.eq(index).find('em').text() * 1 > num[index] - num[index] / set_num) {
22                                This.eq(index).find('em').text(parseInt(num[index]));
23                            } else {
24                                This.eq(index).find('em').text(parseInt(num[index] / set_num + This.eq(index).find('em').text() * 1));
25                            }
26                            //较小数字处理
27                            if (num[index] < set_num) {
28                                This.eq(index).find('em').text(parseInt(num[index]));
29                            }
30                        },
31                        set_plus = setInterval(function () {
32                            // 动画执行
33                            for (var i = 0; i <= This.length; i++) {
34                                if (num[i - 1] > This.eq(i - 1).find('em').text() * 1) {
35                                    set_plus_num(i - 1);
36                                    if (num[i - 1] === This.eq(i - 1).find('em').text() * 1) {
37                                        time_lock++;
38                                    }
39                                }
40                            }
41                            if (time_lock >= num.length) {
42                                // 清理多余执行
43                                clearInterval(set_plus);
44                            }
45                        }, speed);
46                }
47            })
48        },
49        BG_parallax: function (obj, speed) {
50            if (!speed)
51                speed = .5;
52            $(window).scroll(function () {
53                obj.css({
54                    'background-position-y': (((obj.offset().top + obj.innerHeight() / 2) - ($(document).scrollTop() + $(window).height() / 2)) * speed)
55                })
56            })
57        },
58        Interval_Fun: function (obj, means, cycle, position) {
59            if (!position)
60                position = 2;
61            if (!cycle)
62                var cycle_num = 0;
63            $(window).scroll(function () {
64                if (obj.offset().top + obj.innerHeight() / position < $(document).scrollTop() + $(window).height() && obj.offset().top + obj.innerHeight() / position > $(document).scrollTop()) {
65                    cycle_num++;
66                    if (!cycle && cycle_num <= 1)
67                        means();
68                    else if (cycle)
69                        means()
70                }
71            })
72        },
73        Video_open: function (obj) {
74            var src, btn, img, tag, method = obj.attr('data-mode');
75            if (obj.attr('data-src'))
76                src = obj.attr('data-src');
77            else
78                return;
79            if (obj.attr('data-img'))
80                img = obj.attr('data-img');
81            btn = obj.attr('data-btn') ? obj.attr('data-btn') : '#000';
82            if (!method)
83                tag = '<video controls poster=' + img + ' src=' + src + '></video>';
84            else
85                tag = '<iframe width="1000" height="540" src="' + src + '" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>';
86            var video = "<div class='video_box active'>" + tag + "<i class='video_close fa fa-close'></i></div><i class='video_mask active'></i>",
87                css = "<style type='text/css' id='video_css'>.video_box {position: fixed;display: inline-block;top: 50%;left: 50%;-webkit-transform: translate(-50%, -50%) scale(1, 1);-moz-transform: translate(-50%, -50%) scale(1, 1);-ms-transform: translate(-50%, -50%) scale(1, 1);-o-transform: translate(-50%, -50%) scale(1, 1);transform: translate(-50%, -50%) scale(1, 1);z-index: 1000;max-width: 90%; max-height: 90%;-webkit-transition: .5s;-moz-transition: .5s;-ms-transition: .5s;-o-transition: .5s;transition: .5s;-webkit-transform-origin: center center;-moz-transform-origin: center center;-ms-transform-origin: center center;-o-transform-origin: center center;transform-origin: center center;zoom: 1;}.video_box video,.video_box iframe {max-width: 100%;max-height: 100%;-webkit-transition: .5s;-moz-transition: .5s;-ms-transition: .5s;-o-transition: .5s;transition: .5s;}.video_box i.video_close {position: absolute;height: 40px;width: 40px;border-radius: 100%;background: " + btn + ";display: block;right: -20px;top: -20px;cursor: pointer;cursor: hand;text-align: center;line-height: 40px;color: white;font-size: 18px;opacity: 0;-webkit-transition: .5s;-moz-transition: .5s;-ms-transition: .5s;-o-transition: .5s;transition: .5s;}
87.video_box:hover i.video_close {opacity: 1;}.video_box.active {-webkit-transform: translate(-50%, -50%) scale(0.3, 0.3);-moz-transform: translate(-50%, -50%) scale(0.3, 0.3);-ms-transform: translate(-50%, -50%) scale(0.3, 0.3);-o-transform: translate(-50%, -50%) scale(0.3, 0.3);transform: translate(-50%, -50%) scale(0.3, 0.3);zoom: .3;}i.video_mask {position: fixed;top: 0;left: 0;z-index: 900;background: rgba(0, 0, 0, 0.5);height: 100%;width: 100%;-webkit-transition: .5s .2s;-moz-transition: .5s .2s;-ms-transition: .5s .2s;-o-transition: .5s .2s;transition: .5s .2s;opacity: 1;}i.video_mask.active {opacity: 0;-webkit-transition: .5s;-moz-transition: .5s;-ms-transition: .5s;-o-transition: .5s;transition: .5s;}.video_box video, .video_box iframe {min-width: 900px;}@media screen and (max-width: 1000px) { .video_box video, .video_box iframe {min-width: 600px;display: block;max-height: 340px !important;}}@media screen and (max-width: 700px) {.video_box video, .video_box iframe { min-width: 400px; display: block;max-height: 240px !important;}}@media screen and (max-width: 500px) {.video_box video, .video_box iframe {min-width: 300px;display: block; max-height: 170px !important;}}</style>"
88            obj.click(function () {
89                $("body").append(video).append(css).animate(200, function () {
90                    $(".video_box").add($(".video_mask")).removeClass('active');
91                });
92                $("i.video_mask").add($("i.video_close")).one('click', function () {
93                    $(".video_box").add($("i.video_mask")).add($("#video_css")).remove();
94                })
95            });
96        },
97        Pop_Ups: function(obj,model,btn_,lang){
98            lang = {
99                lang:window.location.hostname.split('.')[0],
100                title:'Submit feedback',
101                name:'Name',
102                mail:'Email',
103                phone:'Phone',
104                message:'Message',
105                send:'Send'
106            }
107            switch (lang.lang) {
108                case 'cn':
109                    lang['title'] = '留言反馈';lang['name'] = '姓名';lang['mail'] = '邮箱';lang['phone'] = '电话';lang['message'] = '留言内容';lang['send'] = '立即提交';
110                    break;
111                case 'ru':
112                    lang['title'] = 'Обратная связь';lang['name'] = 'Имя';lang['mail'] = 'Почта';lang['phone'] = 'телефон';lang['message'] = 'Содержание сообщения';lang['send'] = 'Отправить сейчас';
113                    break;
114                case 'es':
115                    lang['title'] = 'Realimentación';lang['name'] = 'Nombre';lang['mail'] = 'Correo';lang['phone'] = 'Teléfono';lang['message'] = 'Contenido del mensaje';lang['send'] = 'Aplique ahora';
116                    break;
117                case 'sa':
118                    lang['title'] = 'ردود الفعل';lang['name'] = 'اسم';lang['mail'] = 'بريد';lang['phone'] = 'هاتف';lang['message'] = 'محتوى الرسالة';lang['send'] = 'أرسل الآن';
119                    break;
120                case 'de':
121                    lang['title'] = 'Feedback';lang['name'] = 'Name';lang['mail'] = 'Email';lang['phone'] = 'Telefon';lang['message'] = 'Nachrichteninhalt';lang['send'] = 'Jetzt Absenden';
122                    break;
123                case 'jp':
124                    lang['title'] = 'フィードバック';lang['name'] = '名前';lang['mail'] = 'Eメール';lang['phone'] = '電話';lang['message'] = 'メッセージの内容';lang['send'] = '今提出';
125                    break;
126                case 'kr':
127                    lang['title'] = '피드백';lang['name'] = '이름';lang['mail'] = '우편';lang['phone'] = '전화';lang['message'] = '메시지 내용';lang['send'] = '지금 제출';
128                    break;
129                case 'fr':
130                    lang['title'] = 'Retour d\'information';lang['name'] = 'Nom';lang['mail'] = 'Courrier';lang['phone'] = 'Téléphone';lang['message'] = 'Contenu du message';lang['send'] = 'Soumettre maintenant';
131                    break;
132            }
133            var css = '<style type=\'text/css\' id=\'Pop_Ups_css\'>#pups_from{position:fixed;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);-moz-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%);max-height:80%;width:500px;max-width:90%;
133-o-box-shadow:0 0 10px rgba(0,0,0,0.1);-webkit-box-shadow:0 0 10px rgba(0,0,0,0.1);box-shadow:0 0 10px rgba(0,0,0,0.1);z-index:22;background:white;padding:30px;overflow:auto}#pups_from h4{font-size:18px;color:#222;text-transform:capitalize;line-height:1;font-weight:bold;position: absolute;left: 0;width: 100%;top: 0;padding: 15px 20px;background: #f5f5f5;-moz-box-shadow: 0 0 5px rgba(0,0,0,.1);-o-box-shadow: 0 0 5px rgba(0,0,0,.1);box-shadow: 0 0 5px rgba(0,0,0,.1);}#pups_from form {margin-top: 40px;}#pups_from i.close{width:30px;height:30px;position:absolute;top:10px;right:10px;background:#eee;cursor:pointer;cursor:hand;-webkit-transition: .5s;-moz-transition: .5s;-ms-transition: .5s;-o-transition: .5s;transition: .5s;}#pups_from i.close:after,#pups_from i.close:before{content:\'\';-webkit-transition: .5s;-moz-transition: .5s;-ms-transition: .5s;-o-transition: .5s;transition: .5s;width:70%;height:2px;margin-top:-1px;background:black;position:absolute;top:50%;left:15%;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}#pups_from i.close:after{-webkit-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg)}#pups_from i.close:hover{background: #6076f1;}#pups_from i.close:hover:after,#pups_from i.close:hover:before{background: white;}#pups_from form ul li{margin-bottom:10px;position:relative}#pups_from form ul li label{font-size:14px;margin-bottom: 10px;display: block;}#pups_from form ul li label em{color:red;margin-right:2px}#pups_from form ul li input,#pups_from form ul li textarea{width:100%;line-height:24px;padding:6px 15px;border:1px solid #eee;-webkit-transition:.5s;-moz-transition:.5s;transition:.5s;font-size:16px}#pups_from form ul li input:focus,#pups_from form ul li textarea:focus{border-color:#6076f1}#pups_from form ul li textarea{height:80px}#pups_from form ul li input[type="submit"]{width:auto;padding:6px 40px;display:inline-block;background:#6076f1;color:white;-webkit-transition: .5s;-moz-transition: .5s;-ms-transition: .5s;-o-transition: .5s;transition: .5s;}#pups_from form ul li input[type="submit"]:hover{opacity: .7}#pups_from form ul li:last-child{margin-bottom:0}#Pop_UpsBtn{width: 60px;height: 60px;line-height: 60px;text-align: center;position: fixed;border-radius: 100%;background: #6076f1;color:white;right: 2%;bottom: 5%;font-size: 24px;-moz-box-shadow: 0 2px 7px rgba(0,0,0,.3);-o-box-shadow: 0 2px 7px rgba(0,0,0,.3);box-shadow: 0 2px 7px rgba(0,0,0,.3);cursor: pointer;cursor: hand;-webkit-transition: .5s;-moz-transition: .5s;-ms-transition: .5s;-o-transition: .5s;transition: .5s;}#Pop_UpsBtn:hover{background: #889aff;}</style>',
134                html = '<div id="pups_from" hidden>\n' +
135                    '        <h4>'+lang.title+'<i class="close"></i></h4>\n' +
136                    '        <form onsubmit="return false;"><input type="hidden" name="your-message" value=""><input type="hidden" name="your-email" value="">\n' +
137                    '            <ul>\n' +
138                    '                <li>\n' +
139                    '                    <label><em>*</em>'+lang.name+':</label>\n' +
140                    '                    <input type="text" autocomplete="off" name="name" placeholder="">\n' +
141                    '                </li>\n' +
142                    '                <li>\n' +
143                    '                    <label><em>*</em>'+lang.mail+':</label>\n' +
144                    '                    <input type="text" autocomplete="off" name="mail" placeholder="">\n' +
145                    '                </li>\n' +
146                    '                <li>\n' +
147                    '                    <label><em>*</em>'+lang.phone+':</label>\n' +
148                    '                    <input type="text" autocomplete="off" name="phone" placeholder="">\n' +
149                    '                </li>\n' +
150                    '                <li>\n' +
151                    '                    <label><em>*</em>'+lang.message+':</label>\n' +
152                    '                    <textarea autocomplete="off" name="content" placeholder=""></textarea>\n' +
153                    '                </li>\n' +
154                    '                <li>\n' +
155                    '                    <input type="submit" value="'+lang.send+'">\n' +
156                    '                </li>\n' +
157                    '            </ul>\n' +
158                    '        </form>\n' +
159                    '    </div>',
160                btn = '<div id="Pop_UpsBtn"><i class="fa fa-comments-o"></i></div>',
161                lock = true,
162                model_form = false,
163                model_url = '';
164            $("body").append(css).append(html);
165            $.getScript('/static/js/layer/layer.js',function (response,status) {
166                if (status==='success') {
167                    lock = false;
168                }
169            });
170            if (btn_) {
171                $("body").append(btn);
172            }
173            (obj?obj:$("#Pop_UpsBtn")).on('click',function (e) {
174                if (model && !model_form) {
175                    e.preventDefault();
176                    e.stopPropagation();
177                    model_url = $(this).attr('href')?$(this).attr('href'):$(this).find('a').attr('href');
178                }
179                if (!model_form)
180                    $("#pups_from").stop().fadeToggle(200);
181            });
182            $("#pups_from i.close").on('click',function () {
183                $("#pups_from").stop().fadeToggle(200);
184            });
185            $("#pups_from form input[type=submit]").on('click',function () {
186                layer.load(0,{shade:0.1,shadeClose:false});
187                $.ajax({
188                    type: 'post',
189                    url: '/Api/contact/submit/uid/1.html',
190                    data: $("#pups_from form").serialize(),
191                    dataType: 'json',
192                    success: function (data) {
193                        layer.closeAll();
194                        if (data.status == 200) {
195                            layer.msg(data.result,{icon:1,time:4000});
196                            if (model && !model_form) {
197                                model_form = true;
198                                $("#pups_from").stop().fadeToggle(200);
199                                var a = document.createElement('a');
200                                a.setAttribute('href',model_url);
201                                a.setAttribute('download','');
202                                document.body.appendChild(a);
203                                a.click();
204                                a.remove();
205                            }
206                        } else {
207                            layer.msg(data.result,{icon:2,time:4000})
208                        }
209                    }
210                })
211            });
212        },
213        Line_curve: function (obj, origin, coordinate, color,img, speed) {
214            if (!speed)
215                speed = 0.01;
216            if (!color)
217                color = '#000';
218            var con = document.getElementById(obj).appendChild(document.createElement('canvas'));
219            var ctx = con.getContext('2d');
220            con.width = document.getElementById(obj).offsetWidth ? document.getElementById(obj).offsetWidth : window.innerWidth;
221            con.height = document.getElementById(obj).offsetHeight ? document.getElementById(obj).offsetHeight : window.innerHeight;
222            var percent = 0;
223            ctx.lineWidth = 2;
224            origin = [origin[0] * (con.width / 100), origin[1] * (con.height / 100)];
225
226            function animate() {
227                ctx.clearRect(0, 0, con.width, con.height);
228                ctx.drawImage(img,0,0,con.width,con.height);
229                for (var i = 0; i < coordinate.length; i++) {
230                    var x0 = coordinate[i][0][0] * (con.width / 100);
231                    var y0 = coordinate[i][0][1] * (con.height / 100);
232                    var x1 = coordinate[i][1][0] * (con.width / 100);
233                    var y1 = coordinate[i][1][1] * (con.height / 100);
234                    ctx.strokeStyle = color;
235                    ctx.beginPath();
236                    formula(ctx, origin, [x0, y0], [x1, y1], percent);
237                    ctx.stroke();
238                }
239                if (percent < 1)
240                    percent += speed;
241                else {
242                    return;
243                }
244                requestAnimationFrame(animate);
245            }
246
247            function formula(ctx, start, end, control, percent) {
248//            二次贝塞尔曲线坐标计算公式
249                var v01 = [control[0] - start[0], control[1] - start[1]];     // 向量<p0, p1>
250                var v12 = [end[0] - control[0], end[1] - control[1]];     // 向量<p1, p2>
251                var q0 = [start[0] + v01[0] * percent, start[1] + v01[1] * percent];
252                var q1 = [control[0] + v12[0] * percent, control[1] + v12[1] * percent];
253                var v = [q1[0] - q0[0], q1[1] - q0[1]];       // 向量<q0, q1>
254                var b = [q0[0] + v[0] * percent, q0[1] + v[1] * percent];
255                ctx.moveTo(start[0], start[1]);
256                ctx.quadraticCurveTo(
257                    q0[0], q0[1],
258                    b[0], b[1]
259                );
260            }
261
262            animate();
263        },
264        shopping_cart: function (text_, element, cart_page = false) {
265            // 对象数据汇总
266            if (!element) {
267                element = {
268                    shopping_cart: '.shopping_cart',
269                    shopping_form: '.shopping_form',
270                    shopping_list: '.shopping_list',
271                    product_box: '.product_box', //多增加一个data-id 属性
272                    product_name: '.product_name',
273                    product_link: '.product_link',
274                    product_det: '.product_det',
275                    product_img: '.product_img',
276                    product_tag: '.product_tag',
277                    product_add: '.product_add'
278                };
279            }
280            if (!text_) {
281                text_ = {
282                    close: 'Close All',
283                    title: 'Feedback',
284                    submit: 'Send',
285                    number: 'Number:',
286                    cart: 'There are no products, just add them!',
287                    required: 'Can not be empty!'
288                }
289            }
290            var css = '<style type=\'text/css\' id=\'\'>#cart{position:fixed;max-width:100%;width:1000px;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);-moz-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);-o-transform:translate(-50%,-50%);transform:translate(-50%,-50%);max-height:80%;overflow:auto;padding: 15px;z-index:100;background:white;-moz-box-shadow:0 0 10px rgba(0,0,0,.2);
290-o-box-shadow:0 0 10px rgba(0,0,0,.2);box-shadow:0 0 10px rgba(0,0,0,.2);}#cart.active{position:static;width:auto;top:0;left:0;-webkit-transform:translate(0);-moz-transform:translate(0);-ms-transform:translate(0);-o-transform:translate(0);transform:translate(0);max-height:none;overflow:unset}#cart .left{padding-right:15px;color:black}#cart .left ul{max-height:560px;overflow:auto}#cart .left ul li{margin-bottom:15px;padding:15px;background:#f9f9f9}#cart .left ul li .box2{position:relative}#cart .left ul li .img{width:25%;overflow:hidden;vertical-align:middle;max-height:140px}#cart .left ul li .img img{min-height:140px;width:auto;min-width:100%}#cart .left ul li .text{width:75%;padding-left:3%;vertical-align:middle}#cart .left ul li .text h4{font-size:18px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}#cart .left ul li .text p{display:inline-block;max-width:50%;padding-right:15px}#cart .left ul li .text input{width:50%;max-width:80px;color:black;padding:5px;display:inline-block;border:1px solid #eee}#cart .left ul li .text textarea{width:100%;padding:10px;color:black;margin-top:10px;border:1px solid #eee}#cart .left ul li i.del{position:absolute;top:-8px;right:-5px;font-size:16px;cursor:pointer;cursor:hand}#cart .left span.close_all{display:inline-block;line-height:40px;height:40px;padding:0 25px;background:#111;color:white;font-size:15px;cursor:pointer;cursor:hand;margin-top:10px}#cart .right{padding-left:15px}#cart .right .shopping_form{background:#f9f9f9;color:black;padding:15px}#cart .right h4{font-size:24px}#cart .right ul li label{display:block;font-size:14px;margin:10px 0 5px}#cart .right ul li input,#cart .right ul li textarea{width:100%;padding:5px 15px;border:1px solid #eee;font-size:14px}#cart .right ul li textarea{height:160px}#cart .right ul li input[type="submit"]{max-width:200px;background:#111;border:0;font-size:18px;margin-top:20px;padding:10px;color:white}#cart i.fa-close{position:absolute;right:15px;top:15px;font-size:16px;width:30px;height:30px;line-height:30px;text-align:center;background:#000;color:white;cursor:pointer;cursor:hand}@media screen and (max-width:1000px){#cart .left{width:100%;padding-right:0}#cart .right{width:100%;padding-left:0;padding-top:20px}#cart .left ul{overflow:unset;max-height:none}}</style>',
291                html = '<div id="cart" hidden><div class="box grid-box two"><div class="left column"><ul class="shopping_list"></ul><span class="close_all">' + text_.close + '</span></div><div class="right column"><div class="shopping_form"><h4>' + text_.title + '</h4><form onsubmit="return false;"><ul><li><label for="company">The company:</label><input type="text" id="company" name="name" placeholder=""></li><li><label for="phone">Phone:</label><input type="text" id="phone" name="phone" placeholder=""></li><li><label for="mail">E-mail:</label><input type="text" id="mail" name="mail" placeholder=""></li><li><label for="content">Detailed message:</label><textarea id="content" name="content" placeholder=""></textarea></li><li><input type="submit" value="' + text_.submit + '"></li></ul></form></div></div></div><i class="close fa fa-close"></i></div>';
292
293
294            // 初始化
295            var data = [], lock = true;
296            if ($.cookie !== undefined) {
297                if ($.cookie('the_product_info') !== undefined && $.cookie('the_product_info') !== '') {
298                    data = $.cookie('the_product_info').split('?');
299                }
300            } else {
301                alert('需要cookie插件支持!');
302                return;
303            }
304            $(element.shopping_cart).find('em').html(data.length);
305
306
307            // 列表
308            function click_car(T) {
309                lock = true;
310                var name = T.parents(element.product_box).find(element.product_name).length ? T.parents(element.product_box).find(element.product_name).text() : '',
311                    url = T.parents(element.product_box).find(element.product_link).length ? T.parents(element.product_box).find(element.product_link).attr('href') : '',
312                    det = T.parents(element.product_box).find(element.product_det).length ? T.parents(element.product_box).find(element.product_det).text() : '',
313                    img = T.parents(element.product_box).find(element.product_img).length ? T.parents(element.product_box).find(element.product_img).attr('src') : '',
314                    tag = T.parents(element.product_box).find(element.product_tag).length ? T.parents(element.product_box).find(element.product_tag).children('*') : '';
315                if ($.isArray(data)) {
316                    data.map(function (value, index) {
317                        var key = Object.keys(JSON.parse(value))[0];
318                        if (key === T.parents(element.product_box).attr('data-id')) {
319                            lock = false;
320                            data.splice(index, 1);
321                        }
322                    });
323                }
324
325                var tag_arr = [];
326                if (tag !== '') {
327                    tag.filter(function () {
328                        tag_arr.push($(this).text())
329                    });
330                }
331
332                var text = '{"' + T.parents(element.product_box).attr('data-id') + '":{"name":"' + name.replace(/\s/g, " ") + '","url":"' + url + '","det":"' + det + '","img":"' + img + '","tag":"' + tag_arr.join('/') + '"}}';
333                if (lock) {
334                    data.push(text);
335                }
336                $(element.shopping_cart).find('em').html(data.length);
337                $.cookie('the_product_info', data.join('?'), {path: '/'});
338            }
339
340            $(document).on('click', element.product_add, function (e) {
341                click_car($(this));
342                $(this).toggleClass('active');
343            });
344
345            function cart_detect() {
346                data.map(function (value, index) {
347                    var detect = JSON.parse(value);
348                    $(element.product_box).filter(function () {
349                        if (detect[Object.keys(detect)[0]] === $(this).attr('data-id')) {
350                            $(this).find(element.product_add).addClass('active')
351                        }
352                    })
353                });
354            }
355
356            //购物车
357            function Structure_injection() {
358                $(element.shopping_list).html('');
359                var data_ = [];
360                data.map(function (value, index) {
361                    data_ = JSON.parse(value);
362                    $(element.shopping_list).append('<li>\n' +
363                        '               <div class="box2 grid-box">\n' +
364                        '                   <div class="img column"><a href="' + data_[Object.keys(data_)[0]].url + '"><img src="' + data_[Object.keys(data_)[0]].img + '?imageView2/2/w/400/h/400/format/jpg/q/80" alt=""></a></div>\n' +
365                        '                   <div class="text column">\n' +
366                        '                       <h4><a href="' + data_[Object.keys(data_)[0]].url + '">' + data_[Object.keys(data_)[0]].name + '</a></h4><p>' + text_.number + '</p>\n' +
367                        '                       <input class="num" type="number" value="1"/><div class="Item" hidden>' + data_[Object.keys(data_)[0]].tag + '</div>\n' +
368                        '                       <textarea class="msg" placeholder=""></textarea>\n' +
369                        '                       <i class="del fa fa-trash"></i>\n' +
370                        '                   </div>\n' +
371                        '               </div>\n' +
372                        '           </li>')
373                });
374                if (cart_page) {
375                    return data_;
376                }
377            }
378            function cart() {
379                if (!cart_page) {
380                    $('body').append(html,css);
381                    $.getScript('/static/js/layer/layer.js');
382                    Structure_injection();
383                    $(document).on('click','#cart i.del', function (e) {
384                        var info_ = $(this).parents('li');
385                        if (data.length) {
386                            data.splice(info_.index(), 1);
387                            $(element.shopping_cart).find('em').html(data.length);
388                            $.cookie('the_product_info', data.join('?'), {path: '/'});
389                            info_.remove();
390                            if (!data.length) {
391                                $(element.shopping_list).html(text_.cart);
392                            }
393                        }
394                    });
395                    $(document).on('blur','#cart input', function (e) {
396                        if ($(this).val() === '') {
397                            layer.msg(text_.required, {icon: 2, time: 4000});
398                        }
399                    })
400                    $(document).on('click','#cart input[type=\'submit\']', function (e) {
401                        e.preventDefault();
402                        var content = '';
403                        $(element.shopping_list).find('li').filter(function () {
404                            content += '\n' + $(this).find('h4').text() + '\n' +
405                                'Qty:' + $(this).find('input').val() + '\n' +
406                                'Message:' + $(this).find('textarea').val() + '\n' +
407                                'Url:' + $(this).find('a').attr('href') + '\n' +
408                                '-------------------------------------------\n'
409                        });
410                        var textarea = $(element.shopping_form).find("textarea").val();
411                        $(element.shopping_form).find("textarea").val(textarea + content);
412                        layer.load(0, {shade: 0.1, shadeClose: false});
413                        $.ajax({
414                            type: 'post',
415                            url: '/Api/contact/submit/uid/1.html',
416                            data: $(element.shopping_form).find('form').serialize(),
417                            dataType: 'json',
418                            success: function (ret) {
419                                layer.closeAll();
420                                $(element.shopping_form).find("textarea").val(textarea);
421                                if (ret.status == 200) {
422                                    layer.msg(ret.result, {icon: 1, time: 4000});
423                                    $(element.shopping_cart).find('em').html(0);
424                                    $.cookie('the_product_info', '', {path: '/'});
425                                } else {
426                                    layer.msg(ret.result, {icon: 2, time: 4000})
427                                }
428                            }
429                        })
430                    });
431                    $(document).on('click','#cart span.close_all', function (e) {
432                        $(element.shopping_list).find('li').remove();
433                        $(element.shopping_cart).find('em').html(0);
434                        $.cookie('the_product_info', '', {path: '/'});
435                    });
436                    $(document).on('click',element.shopping_cart, function (e) {
437                        $("#cart").fadeIn(300);
438                        Structure_injection();
439                    })
440                    $(document).on('click','#cart i.fa-close', function (e) {
441                        $("#cart").fadeOut(300)
442                    })
443                }else {
444                    data_(Structure_injection())
445                }
446            }
447
448            cart_detect();
449            cart();
450        }
451    };
452	
453	
454	let lang = {'en' : 'English', 'ru' : 'русский', 'fr' : 'Français', 'la' : 'Latine', 'jp' : '日本語', 'kr' : '한국어', 'vi' : 'Tiếng Việt', 'th' : 'ไทย', 'af' : 'Boer (Afrikaans)', 'sq' : 'Shqiptare', 'am' : 'አማርኛ', 'sa' : 'عربى', 'hy' : 'հայերեն', 'az' : 'Azərbaycan dili', 'eu' : 'Euskara', 'be' : 'Беларуская', 'bn' : 'বাংলা', 'bs' : 'Bosanski', 'bg' : 'български', 'ca' : 'Català', 'ceb' : 'Sugbuanon', 'ny' : 'Chichewa', 'cn' : '中文简体', 'tw' : '中文繁体', 'co' : 'Corsu','hr' : 'Hrvatski','cs' : 'čeština','da' : 'dansk','nl' : 'Nederlands','eo' : 'Esperanto','et' : 'Eestlane','tl' : 'Pilipino','fi' : 'Suomalainen','fy' : 'Frysk','gl' : 'Galego','ka' : 'ქართველი','de' : 'Deutsche','el' : 'Ελληνικά','gu' : 'ગુજરાતી','ht' : 'Kreyòl ayisyen','ha' : 'Hausa','haw' : 'Ōlelo Hawaiʻi','iw' : 'עִברִית','hi' : 'हिंदी','hmn' : 'Hmong','hu' : 'Magyar','is' : 'Íslenska','ig' : 'Igbo','id' : 'bahasa Indonesia','ga' : 'Gaeilge','it' : 'italiano','jw' : 'Wong jawa','kn' : 'ಕನ್ನಡ','kk' : 'Қазақ','km' : 'ជនជាតិខ្មែរ','ku' : 'Kurdî','ky' : 'Кыргызча','lo' : 'ລາວ','lv' : 'Latvietis','lt' : 'Lietuvis','lb' : 'Lëtzebuergesch','mk' : 'Македонски','mg' : 'Malagasy','ms' : 'Bahasa Melayu','ml' : 'മലയാളം','mt' : 'Malti','mi' : 'Maori','mr' : 'मराठी','mn' : 'Монгол','my' : 'ဗမာ','ne' : 'नेपाली','no' : 'norsk','ps' : 'پښتو','fa' : 'فارسی','pl' : 'Polskie','pt' : 'Português','pa' : 'ਪੰਜਾਬੀ','ro' : 'Română','sm' : 'Faasamoa','gd' : 'Gàidhlig na h-Alba','sr' : 'Српски','st' : 'Sesotho','sn' : 'Shona','sd' : 'سنڌي','si' : 'සිංහල','sk' : 'Slovák','sl' : 'Slovenščina','so' : 'Soomaali','es' : 'Español','su' : 'Bahasa Indonesia Bahasa Indonesia','sw' : 'Kiswahil
454i','sv' : 'svenska','tg' : 'Тоҷикӣ','ta' : 'தமிழ்','te' : 'తెలుగు','tr' : 'Türk','uk' : 'Український','ur' : 'اردو','uz' : 'O\'zbek','cy' : 'Cymraeg','xh' : 'UmXhosa wesiXhosa','yi' : 'יידיש','yo' : 'Yoruba','zu' : 'Zulu waseNingizimu Afrika','fil' : 'Pilipino'};
455	$("ul.lang em").filter(function () {
456		$(this).text(lang[$(this).attr('data-name')])
457	})
458
459    /**
460     * 全局效果说明
461     * ---------------------Dividing line--------------------
462     * @num_plus 数字相加
463     * 参数 (obj,set_num,speed = 60)
464     * 详解 obj
465     *      获取容器对象
466     *     set_num
467     *      设置相加比例 公式: 数字 / set_num = 每次相加数字(整数)
468     *     speed
469     *      动画速度 默认 60ms
470     * html 结构
471     *      <ul>
472     *          <li>*<em data-num="Number">0</em>*</li>
473     *      </ul>
474     *
475     * ---------------------Dividing line--------------------
476     * @BG_parallax 背景视差
477     * 参数 (obj,speed = 0.5)
478     * 详解 obj
479     *      获取容器对象
480     *     speed
481     *      动画速度 默认 0.5
482     *
483     * ---------------------Dividing line--------------------
484     * @Interval_Fun 区间判断
485     * 参数 (obj,means,cycle,position)
486     * 详解 obj
487     *      获取容器对象
488     *     means
489     *      执行方法
490     *     cycle
491     *      是否多次执行  boolean值
492     *     position
493     *      当容器自身多少出现在屏幕中时执行 公式:容器高度 / position
494     *
495     * ---------------------Dividing line--------------------
496     * @Video_open 视频弹窗
497     * 参数 (obj,url,btn,img)
498     * 详解 obj
499     *       获取点击对象 ( html标签 data-src="视频地址" data-img="video第一帧" data-btn="关闭按钮颜色")
500     *      method
501     *       切换模式 (video / iframe) false / true
502     *
503     * ---------------------Dividing line--------------------
504     * @Line_curve 画曲线
505     * 参数 (obj,origin,coordinate,color,speed)
506     * 详解 obj
507     *       获取ID属性
508     *     origin
509     *       中心点 (数组) 百分比
510     *     coordinate
511     *       其它点 (控制点+终点)
512     *       [
513     *          [[终点],[控制点]] 百分比
514     *       ]
515     *     color
516     *       线条颜色
517     *     img
518     *       图片
519     *     speed
520     *       速度
521     * @shopping_cart 伪购物车
522     * 参数 (text_, element, cart_page = false)
523     * 详解 text_ = {
524                    close: 'Close All',
525                    title: 'Feedback',
526                    submit: 'Send',
527                    number: 'Number:',
528                    cart: 'There are no products, just add them!',
529                    required: 'Can not be empty!'
530                }
531     cart_page 是否启用自定义购物弹窗
532     data_ 不启用时 返回数据
533     注意 若提交失败 检查是否存在对应字段
534     *
535     */
536
537
538})

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.