PageSourceSearch

https://hipsurgery.co.il/rus/wp-content/themes/hip-surgery/common/js/custom-common.js?ver=1.0

js hipsurgery.co.il collected 2026-10-09 01:13:12 UTC 12,538 bytes, 327 lines download raw bytes

1(function ($) {
2    "use strict";
3
4    var $window = $(window),
5        $body = $('body'),
6        isRtl = $body.hasClass('rtl');
7
8    /*-----------------------------------------------------------------------------------*/
9    /*	Flex Slider
10    /*  You can learn more about its options from http://www.woothemes.com/flexslider/
11    /*-----------------------------------------------------------------------------------*/
12    if (jQuery().flexslider) {
13
14        // Flex Slider for gallery detail page
15        $('#carousel').flexslider({
16            animation: "slide",
17            controlNav: false,
18            animationLoop: false,
19            reverse: false,
20            slideshow: false,
21            itemWidth: 123,
22            minItems: 4,
23            itemMargin: 10,
24            asNavFor: '#slider'
25        });
26
27        $('#slider').flexslider({
28            animation: "slide",
29            controlNav: false,
30            animationLoop: false,
31            slideshow: false,
32            sync: "#carousel"
33        });
34
35        // Flex Slider Three for home testimonial section
36        $('.flexslider-three').flexslider({
37            animation: "fade",
38            controlNav: false,
39            directionNav: true,
40            pauseOnHover: true,
41            pauseOnAction: false,
42            smoothHeight: true
43        });
44
45        // Flex Slider for services single
46        $('.services-single .flexslider').flexslider({
47            animation: "fade",
48            controlNav: true,
49            directionNav: false,
50            pauseOnHover: true,
51            pauseOnAction: false,
52            smoothHeight: true
53        });
54    }
55
56    /*-----------------------------------------------------------------*/
57    /* Select2 - https://select2.github.io/
58    /*-----------------------------------------------------------------*/
59    $(window).on("load", function () {
60        $('.woocommerce-ordering .orderby, .woocommerce .variations select, #calc_shipping_country, #product_cat').select2();
61    });
62
63
64    /*-----------------------------------------------------------------*/
65    /* Isotopes Effects
66    /*-----------------------------------------------------------------*/
67    if (jQuery().isotope) {
68        var $isotopeContainer = $('#isotope-container');
69
70        $window.on('load', function () {
71            $isotopeContainer.isotope({
72                itemSelector: '.isotope-item',
73                layoutMode: 'fitRows'
74            });
75        });
76
77        $('#filters').not('.no-isotope').on('click', 'a', function (event) {
78
79            event.preventDefault();
80
81            var $this = $(this),
82                filterValue = $this.attr('data-filter');
83
84            $(this).parents('li').addClass('active').siblings().removeClass('active');
85
86            $isotopeContainer.isotope({
87                filter: filterValue
88            });
89        });
90    }
91
92    /*-----------------------------------------------------------------*/
93    /* For FAQ Groups Filtering
94    /*-----------------------------------------------------------------*/
95    var singleItem = $('#filters a.no-isotope'),
96        faqsWrapper = $('.toggle-main.faq'),
97        $questions = $('.toggle-main.faq').find('.toggle');
98    $(this).parents('li').addClass('active').siblings().removeClass('active');
99    singleItem.on( 'click', function (e) {
100        e.preventDefault();
101        var selector = $(this).attr('data-filter');
102        faqsWrapper.animate({opacity: 0}, 300, function(){
103            if (selector == '*') {
104                $questions.show();
105            } else {
106                $questions.not(selector).hide().end().filter(selector).show();
107            }
108            faqsWrapper.animate({opacity: 1});
109        });
110    });
111
112
113    /*----------------------------------------------------*/
114    /* Tabs for tab widget
115    /*----------------------------------------------------*/
116    $('.tabs .tabs-content').first().css('display', 'block');
117    $(".tabs .tab-head").on( 'click', function () {
118        $(this).siblings().removeClass("active").end().andSelf().addClass("active");
119        var tab = $(this).index();
120        var content = $('.tabs-content');
121        content.stop(true, true).hide().velocity({opacity: 0}, 500);
122        $('.tabs-content:eq(' + tab + ')').stop(true, true).show().velocity({opacity: 1}, 500);
123    });
124
125    /*-----------------------------------------------------------------------------------*/
126    /* Tabs
127    /*-----------------------------------------------------------------------------------*/
128    $(function () {
129
130        var $tabsNav = $('.tabs-nav'),
131            $tabsNavLis = $tabsNav.children('li');
132
133        $tabsNav.each(function () {
134            var $this = $(this);
135            $this.next().children('.tab-content').stop(true, true).hide()
136                .first().show();
137            $this.children('li').first().addClass('active').stop(true, true).show();
138        });
139
140        $tabsNavLis.on('click', function (e) {
141            var $this = $(this);
142            if (!$this.hasClass('active')) {
143                $this.siblings().removeClass('active').end()
144                    .addClass('active');
145                var idx = $this.parent().children().index($this);
146                $this.parent().next().children('.tab-content').stop(true, true).hide().eq(idx).fadeIn();
147            }
148            e.preventDefault();
149        });
150
151    });
152
153    /*-----------------------------------------------------------------*/
154    /* Toggle
155    /*-----------------------------------------------------------------*/
156    $('.toggle-main .toggle:first-child').addClass('current')
157        .find('i.fa').removeClass('fa-plus').addClass('fa-minus').end()
158        .children('.toggle-content').css('display', 'block');
159
160    $('.toggle-title').on('click', function () {
161        var parent_toggle = $(this).closest('.toggle');
162        if (parent_toggle.hasClass('current')) {
163            $(this).find('i.fa').removeClass('fa-minus').addClass('fa-plus');
164            parent_toggle.removeClass('current').children('.toggle-content').slideUp(300);
165        } else {
166            $(this).find('i.fa').removeClass('fa-plus').addClass('fa-minus');
167            parent_toggle.addClass('current').children('.toggle-content').slideDown(300);
168        }
169    });
170
171
172    /*-----------------------------------------------------------------*/
173    /* Accordion
174    /*-----------------------------------------------------------------*/
175    $('.accordion-main .accordion:first-child').addClass('current')
176        .children('.accordion-content').css('display', 'block').end()
177        .find('i.fa').removeClass('fa-plus').addClass('fa-minus');
178
179    $('.accordion-title').on('click', function () {
180        var parent_accordion = $(this).closest('.accordion');
181        if (parent_accordion.hasClass('current')) {
182            $(this).find('i.fa').removeClass('fa-minus').addClass('fa-plus');
183            parent_accordion.removeClass('current').children('.accordion-content').slideUp(300);
184        } else {
185            $(this).find('i.fa').removeClass('fa-plus').addClass('fa-minus');
186            parent_accordion.addClass('current').children('.accordion-content').slideDown(300);
187        }
188        var siblings = parent_accordion.siblings('.accordion');
189        siblings.find('i.fa').removeClass('fa-minus').addClass('fa-plus');
190        siblings.removeClass('current').children('.accordion-content').slideUp(300);
191    });
192
193    /*-----------------------------------------------------------------------------------*/
194    /* Scroll to Top
195    /*-----------------------------------------------------------------------------------*/
196    $(function () {
197        $(window).on( 'scroll', function () {
198            if (!$('body').hasClass('probably-mobile')) {
199                if ($(this).scrollTop() > 250) {
200                    $('a#scroll-top').fadeIn();
201                } else {
202                    $('a#scroll-top').fadeOut();
203                }
204            }
205            else {
206                $('a#scroll-top').fadeOut();
207            }
208        });
209
210        $('a#scroll-top').on('click', function (event) {
211            event.preventDefault();
212            $('html, body').velocity("scroll", {duration: 750, easing: "swing"});
213        });
214    });
215
216    /*-----------------------------------------------------------------*/
217    /* Swipe Box
218    /*-----------------------------------------------------------------*/
219    if ($().swipebox) {
220        // Initialize the Lightbox automatically for any links to images with extensions .jpg, .jpeg, .png or .gif
221        $('.clone .swipebox').removeClass('swipebox');
222        $( '.swipebox' ).swipebox();
223    }
224
225    /*-----------------------------------------------------------------*/
226    /* Date Picker
227    /*-----------------------------------------------------------------*/
228    if (jQuery().datepicker) {
229        $("#datepicker").datepicker();
230        $("#appointment-modal-form-datepicker").datepicker({ minDate: 0 });
231    }
232
233    /*-----------------------------------------------------------------*/
234    /* Message
235    /*-----------------------------------------------------------------*/
236    $('.message .close').on('click', function (e) {
237        $(this).closest('.message').slideUp(300);
238    });
239
240    /*-----------------------------------------------------------------*/
241    /* Animations Effects
242    /*-----------------------------------------------------------------*/
243    $('.animated').appear();
244
245    $(document.body).on('appear', '.fade', function () {
246        $(this).each(function () {
247            $(this).addClass('ae-animation-fade');
248        });
249    });
250    $(document.body).on('appear', '.slide-animate', function () {
251        $(this).each(function () {
252            $(this).addClass('ae-animation-slide-animate');
253        });
254    });
255    $(document.body).on('appear', '.hatch', function () {
256        $(this).each(function () {
257            $(this).addClass('ae-animation-hatch');
258        });
259    });
260    $(document.body).on('appear', '.entrance', function () {
261        $(this).each(function () {
262            $(this).addClass('ae-animation-entrance');
263        });
264    });
265    $(document.body).on('appear', '.tada', function () {
266        $(this).each(function () {
267            $(this).addClass('ae-animation-tada');
268        });
269    });
270    $(document.body).on('appear', '.rotate-up', function () {
271        $(this).each(function () {
272            $(this).addClass('ae-animation-rotate-up');
273        });
274    });
275    $(document.body).on('appear', '.rotate-down', function () {
276        $(this).each(function () {
277            $(this).addClass('ae-animation-rotate-down');
278        });
279    });
280    $(document.body).on('appear', '.fadeInDown', function () {
281        $(this).each(function () {
282            $(this).addClass('ae-animation-fadeInDown');
283        });
284    });
285    $(document.body).on('appear', '.fadeInUp', function () {
286        $(this).each(function () {
287            $(this).addClass('ae-animation-fadeInUp');
288        });
289    });
290    $(document.body).on('appear', '.fadeInLeft', function () {
291        $(this).each(function () {
292            $(this).addClass('ae-animation-fadeInLeft');
293        });
294    });
295    $(document.body).on('appear', '.fadeInRight', function () {
296        $(this).each(function () {
297            $(this).addClass('ae-animation-fadeInRight');
298        });
299    });
300    $(document.body).on('appear', '.fadeInDownBig', function () {
301        $(this).each(function () {
302            $(this).addClass('ae-animation-fadeInDownBig');
303        });
304    });
305    $(document.body).on('appear', '.fadeInUpBig', function () {
306        $(this).each(function () {
307            $(this).addClass('ae-animation-fadeInUpBig');
308        });
309    });
310    $(document.body).on('appear', '.fadeInLeftBig', function () {
311        $(this).each(function () {
312            $(this).addClass('ae-animation-fadeInLeftBig');
313        });
314    });
315    $(document.body).on('appear', '.fadeInRightBig', function () {
316        $(this).each(function () {
317            $(this).addClass('ae-animation-fadeInRightBig');
318        });
319    });
320
321
322    if (navigator.userAgent.indexOf('Safari') != -1 && navigator.userAgent.indexOf('Chrome') == -1) {
323        // Yep, it's Safari =)
324        $('body').addClass('safari');
325    }
326
327})(jQuery);

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.