PageSourceSearch

https://cricketmedia.com/wp-content/themes/genesischild/scripts.js

js cricketmedia.com collected 2026-10-03 21:38:15 UTC 65,988 bytes, 900 lines download raw bytes

1jQuery(document).ready(function() {
2
3	
4    jQuery('*[class$="_display_callback"]').each(function() {
5        var newid = jQuery(this).attr('id');
6        newid = newid.substring(0, newid.indexOf("-copy-"));
7        jQuery(this).attr('id', newid);
8        console.log(newid);
9    });
10
11
12    if (ajax_object.page == 'Licensing')
13        jQuery('#sf_country').val('UNITED STATES');
14    if (ajax_object.page == 'Home') {
15        jQuery('.home-meta-1').show();
16        jQuery('.home-meta-2').hide();
17    }
18    if (ajax_object.page == 'Single') {
19        jQuery('#s2_form_widget-3 .search input[name="subscribe"]').val("SUBSCRIBE");
20        jQuery('#s2_form_widget-3 .search input[name="unsubscribe"]').val("UNSUBSCRIBE");
21        jQuery("#s2email").attr("placeholder", "YOUR EMAIL ADDRESS");
22        if (jQuery(".next-post").html() == '')
23            jQuery(".next-post").html('<a class="pagination-disabled" rel="next">NEXT</a><a class="pagination-disabled" rel="next">»</a>');
24        if (jQuery(".prev-post").html() == '')
25            jQuery(".prev-post").html('<a class="pagination-disabled" rel="next">«</a><a class="pagination-disabled" rel="next">BACK</a>');
26
27        /**if(jQuery("#count_cats").val() >= 4 && jQuery("#count_ages").val() >= 4){
28         jQuery( ".entry-banner-bar" ).css( "height", "66" );
29         }else{
30         if(jQuery("#count_cats").val() >= 4 && jQuery("#count_ages").val() < 4){
31         jQuery( ".entry-banner-bar" ).css( "height", "33" );
32         }else{
33         if(jQuery("#count_cats").val() < 4 && jQuery("#count_ages").val() >= 4){
34         jQuery( ".entry-banner-bar" ).css( "height", "33" );
35         }
36         }
37         }*/
38
39        if (jQuery("#count_cats").val() >= 43 && jQuery("#count_ages").val() >= 43) {
40            jQuery(".entry-banner-bar").css("height", "66");
41            jQuery("#cat-topics").removeClass("col-xs-6 col-sm-6 col-md-6")
42            jQuery("#cat-ages").removeClass("col-xs-6 col-sm-6 col-md-6")
43            jQuery("#cat-topics").addClass("col-xs-12 col-sm-12 col-md-12");
44            jQuery("#cat-ages").addClass("col-xs-12 col-sm-12 col-md-12");
45        } else {
46            if (jQuery("#count_cats").val() >= 70 && jQuery("#count_ages").val() >= 8) {
47                jQuery(".entry-banner-bar").css("height", "66");
48                jQuery("#cat-topics").removeClass("col-xs-6 col-sm-6 col-md-6")
49                jQuery("#cat-ages").removeClass("col-xs-6 col-sm-6 col-md-6")
50                jQuery("#cat-topics").addClass("col-xs-12 col-sm-12 col-md-12");
51                jQuery("#cat-ages").addClass("col-xs-12 col-sm-12 col-md-12");
52            } else {
53                if (jQuery("#count_cats").val() >= 43 && jQuery("#count_ages").val() < 20) {
54                    jQuery("#cat-topics").removeClass("col-xs-6 col-sm-6 col-md-6")
55                    jQuery("#cat-ages").removeClass("col-xs-6 col-sm-6 col-md-6")
56                    jQuery("#cat-topics").addClass("col-xs-8 col-sm-8 col-md-8");
57                    jQuery("#cat-ages").addClass("col-xs-4 col-sm-4 col-md-4");
58                } else {
59                    if (jQuery("#count_cats").val() < 20 && jQuery("#count_ages").val() >= 43) {
60                        jQuery("#cat-topics").removeClass("col-xs-6 col-sm-6 col-md-6")
61                        jQuery("#cat-ages").removeClass("col-xs-6 col-sm-6 col-md-6")
62                        jQuery("#cat-topics").addClass("col-xs-4 col-sm-4 col-md-4");
63                        jQuery("#cat-ages").addClass("col-xs-8 col-sm-8 col-md-8");
64                    } else {
65                        if (jQuery("#count_cats").val() >= 43 && jQuery("#count_ages").val() <= 30) {
66                            jQuery("#cat-topics").removeClass("col-xs-6 col-sm-6 col-md-6")
67                            jQuery("#cat-ages").removeClass("col-xs-6 col-sm-6 col-md-6")
68                            jQuery("#cat-topics").addClass("col-xs-7 col-sm-7 col-md-7");
69                            jQuery("#cat-ages").addClass("col-xs-5 col-sm-5 col-md-5");
70                        }
71                    }
72                }
73            }
74        }
75
76    }
77    if (ajax_object.page == 'Other') {
78        jQuery("#s2email").attr("placeholder", "YOUR EMAIL ADDRESS");
79        jQuery('main .entry-content > form > p > input[name="subscribe"]').val("SUBSCRIBE");
80        jQuery('main .entry-content > form > p > input[name="unsubscribe"]').val("UNSUBSCRIBE");
81    }
82
83    if (ajax_object.page == 'Blog') {
84        jQuery("#s2email").attr("placeholder", "YOUR EMAIL ADDRESS");
85        jQuery('#s2_form_widget-2 .search input[name="subscribe"]').val("SUBSCRIBE");
86        jQuery('#s2_form_widget-2 .search input[name="unsubscribe"]').val("UNSUBSCRIBE");
87        jQuery.post(ajax_object.ajaxurl, {
88            action: 'load_selects'
89        }, function(data) {
90            console.log(data);
91            var $response = jQuery(data);
92            var blog_left = $response.filter('#categories-blog').html();
93            jQuery('#categories-blog').html(blog_left);
94            jQuery("#cat1").on("change", function() {
95                jQuery('#blog-left').html('');
96                jQuery('#blog-right').html('');
97                jQuery('#loading').show();
98
99                jQuery('#cat1').attr('disabled', 'disabled');
100                jQuery('#cat2').attr('disabled', 'disabled');
101                loading_posts(1, (jQuery("#cat1").val()), jQuery("#cat2").val());
102            });
103
104            jQuery("#cat2").on("change", function() {
105                jQuery('#blog-left').html('');
106                jQuery('#blog-right').html('');
107                jQuery('#loading').show();
108                jQuery('#cat1').attr('disabled', 'disabled');
109                jQuery('#cat2').attr('disabled', 'disabled');
110                loading_posts(1, jQuery("#cat1").val(), jQuery("#cat2").val());
111            });
112        });
113        loading_posts(1, 0, 0);
114    }
115
116    if (ajax_object.page == 'Product') {
117        //getScreenResolution();
118        //on load
119        responsive_change_box_order();
120
121        //on resize
122        //window.addEventListener('resize', responsive_change_box_order);
123
124        if (window.attachEvent) {
125            window.attachEvent('onresize', function() {
126                responsive_change_box_order();
127                console.log('Call3');
128            });
129        }
130        else
131        if (window.addEventListener) {
132            window.addEventListener('resize', function() {
133                responsive_change_box_order();
134                console.log('Call1');
135            }, true);
136        }
137        else {
138            console.log('The browser does not support Javascript event binding');
139            console.log('Call2');
140        }
141
142
143
144
145
146        /**jQuery(window).resize(function() {
147         responsive_change_box_order();
148         });*/
149
150    }
151
152    jQuery("#login-btn").on("click", function() {
153        jQuery(".top-header-sidebar-popup").toggle();
154    });
155    jQuery("#nav_menu-11 .menu-footer-cricket-media-container > ul > li > a").each(function() {
156        var sitedomain = 'http:\/\/' + document.domain;
157        var urlpage = document.URL;
158        var menulink = jQuery(this).attr('href');
159
160        var thisurl = urlpage.replace(sitedomain, '');
161
162        var thislink = menulink.replace(sitedomain, '');
163
164        if (thislink === thisurl) {
165            jQuery(this).addClass("current-link");
166        }
167    });
168    jQuery(".hide-intro > img").on("click", function() {
169        jQuery("#welcome-to-sidebar").slideUp();
170    });
171    jQuery("#single-share-button").on("click", function() {
172        jQuery(".addtoany_share_save_container").each(function(){
173            jQuery("#single-share-button").parent().html(jQuery(this));
174            jQuery(this).toggle();
175            return false;
176        });
177        /*jQuery(this).parent().html(jQuery(".addtoany_share_save_container"));
178        jQuery(".addtoany_share_save_container").toggle();*/
179    });
180    jQuery("#entry-share-button").on("click", function() {
181        jQuery(".addtoany_share_save_container").each(function(){
182            jQuery("#entry-share-button").parent().html(jQuery(this));
183            jQuery(this).toggle();
184            return false;
185        });
186        /*jQuery(this).parent().html(jQuery(".addtoany_share_save_container"));
187        jQuery(".addtoany_share_save_container").toggle();*/
188    });
189
190    jQuery("#text-52 .textwidget > ul > li > a").each(function() {
191        if (jQuery(this).attr('href') === document.URL) {
192            jQuery(this).addClass("current-link");
193        }
194    });
195
196    jQuery("nav_menu-18").on("click", function() {
197        window.location.href = '/blog/';
198    });
199
200    jQuery('.post-3308').on("click", function(e) {
201        e.preventDefault();
202        window.location.href = "http://bit.ly/1OLOMsV";
203    });
204
205    /**
206     * Scripts for New Design CricketMedia Site 2016
207     * */
208
209    /**Feb2016
210     * Change for Labels for Salesforce Form Request Price Quote
211     * */
212    jQuery('#sf_form_salesforce_w2l_lead_5').find('label').each(function() {
213        var newLabel = jQuery.trim(jQuery(this.outerHTML).text());
214        if (newLabel.indexOf("*") > 0) {
215            jQuery(this.outerHTML).text();
216            newLabel = jQuery.trim(newLabel.slice(0, -2)) + '<sup><span class="required">*</span></sup>';
217            jQuery(this).text('');
218            jQuery(this).append(newLabel);
219        }
220    });
221
222    /* get actual page and set Order Now button */
223
224    var actualPage = window.location.pathname;
225    if (actualPage.slice(1, 10) == "classroom") {
226        var magazine = actualPage.split("/");
227        if (actualPage == "/classroom") {
228            jQuery("#order-now-button").attr("href", "https://shop.cricketmedia.com/bulk");
229        }
230        else if (magazine[2] == "babybug-magazine") {
231            jQuery("#order-now-button").attr("href", "https://shop.cricketmedia.com/babybug-bulk");
232        } else if (magazine[2] == "ladybug-magazine") {
233            jQuery("#order-now-button").attr("href", "https://shop.cricketmedia.com/ladybug-bulk-discount?_ga=1.79460113.445359935.1431022832");
234            jQuery("#bg").attr("src", "https://aws.cricketmedia.com/media/20160601212833/LYB1507_issue.pdf.jpg");
235            jQuery("#sm1").attr("src", "https://aws.cricketmedia.com/media/20160601212819/LYB1509_Booklet.pdf.jpg");
236            jQuery("#sm2").attr("src", "https://aws.cricketmedia.com/media/20160601212809/LYB1510_Booklet.pdf.jpg");
237            jQuery("#sm3").attr("src", "https://aws.cricketmedia.com/media/20160601212803/LYB1601Booklet.pdf.jpg");
238            jQuery("#sm4").attr("src", "https://aws.cricketmedia.com/media/20160601212751/LYB1602_issue.pdf.jpg");
239        } else if (magazine[2] == "click-magazine") {
240            jQuery("#order-now-button").attr("href", "https://shop.cricketmedia.com/click-bulk-discount?_ga=1.120142733.445359935.1431022832");
241            jQuery("#bg").attr("src", "https://aws.cricketmedia.com/media/20160329193451/1-clk1509.jpg");
242            jQuery("#sm1").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160314154811/2-clk0401_01.jpg");
243            jQuery("#sm2").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160314154823/3-clk0204_01_bobbarner.jpg");
244            jQuery("#sm3").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160314154832/4-clk1507.jpg");
245            jQuery("#sm4").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160314154839/5-clk0911.jpg");
246        } else if (magazine[2] == "ask-magazine") {
247            jQuery("#order-now-button").attr("href", "https://shop.cricketmedia.com/ask-bulk-discount?_ga=1.73629591.445359935.1431022832");
248            jQuery("#bg").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160314200601/1-ask1507_cover.jpg");
249            jQuery("#sm1").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160314200615/2-ask-jan-2002.jpg");
250            jQuery("#sm2").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160314200633/3-ask0112.cover_.jpg");
251            jQuery("#sm3").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160314200646/4-ask1402.jpg");
252            jQuery("#sm4").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160314200657/5-ask1509.jpg");
253        } else if (magazine[2] == "spider-magazine") {
254            jQuery("#order-now-button").attr("href", "https://shop.cricketmedia.com/spider-bulk-discount?_ga=1.106200838.445359935.1431022832");
255            jQuery("#bg").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160314200706/1-sdr1509_artistanniewon.jpg");
256            jQuery("#sm1").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160314200717/2-spr1104_robertmeganck.jpg");
257            jQuery("#sm2").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160314200734/3-spr0807_davidsmall.
257jpg");
258            jQuery("#sm3").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160314200754/4-sdr1502.jpg");
259            jQuery("#sm4").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160314200823/5-sdr9509.jpg");
260        } else if (magazine[2] == "cricket-magazine") {
261            jQuery("#order-now-button").attr("href", "https://shop.cricketmedia.com/cricket-bulk-discount?_ga=1.149500083.445359935.1431022832");
262            jQuery("#bg").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160314200844/1-04-2008-stephen-costanza.jpg");
263            jQuery("#sm1").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160314200912/2-1403_susan-farrington.jpg");
264            jQuery("#sm2").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160314200930/3-01-2007-jo-lynn-alcorn.jpg");
265            jQuery("#sm3").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160314200953/4-ckt1309.jpg");
266            jQuery("#sm4").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160314201022/5-ckt8804.jpg");
267        } else if (magazine[2] == "cobblestone-magazine") {
268            jQuery("#order-now-button").attr("href", "https://shop.cricketmedia.com/cobblestone-bulk-discount?_ga=1.119749645.445359935.1431022832");
269            jQuery("#bg").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160314201051/1-cob1502_cover_lisa-fields.jpg");
270            jQuery("#sm1").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160314201123/2-cob1003_00cvr1.jpg");
271            jQuery("#sm2").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160314201147/3-cob0512_00cvr1.jpg");
272            jQuery("#sm3").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160314201201/4-cob1402.jpg");
273            jQuery("#sm4").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160314201213/5-cob1510.jpg");
274        } else if (magazine[2] == "muse-magazine") {
275            jQuery("#order-now-button").attr("href", "https://shop.cricketmedia.com/muse-bulk-discount?_ga=1.106200838.445359935.1431022832");
276            jQuery("#bg").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160315205234/1-mus1501_cover.jpg");
277            jQuery("#sm1").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160315205243/2-mus1505_00c1.jpg");
278            jQuery("#sm2").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160315205253/3-mus0901_cover.jpg");
279            jQuery("#sm3").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160315205126/4-mus1111.jpg");
280            jQuery("#sm4").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160315205133/5-mus1510.jpg");
281        } else if (magazine[2] == "faces-magazine") {
282            jQuery("#order-now-button").attr("href", "https://shop.cricketmedia.com/faces-bulk-discount?_ga=1.79460113.445359935.1431022832");
283            jQuery("#bg").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160315205313/1-fac1505_00cvr1.jpg");
284            jQuery("#sm1").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160315205319/2-fac1511_00cvr1.jpg");
285            jQuery("#sm2").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160315205335/3-fac1501_01.jpg");
286            jQuery("#sm3").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160315205358/4-fac1509.jpg");
287            jQuery("#sm4").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160315205412/5-fac1505.jpg");
288        } else if (magazine[2] == "dig-magazine") {
289            jQuery("#order-now-button").attr("href", "https://shop.cricketmedia.com/dig-bulk-discount?_ga=1.149500083.445359935.1431022832");
290            jQuery("#bg").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160315205425/1-dig1505_00c1.jpg");
291            jQuery("#sm1").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160315205442/2-dig1502_00c1_artist-bob-berry.jpg");
292            jQuery("#sm2").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160315205509/3-dig1501_00c1_cover.jpg");
293            jQuery("#sm3").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160315205529/4-dig1510.jpg");
294            jQuery("#sm4").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160315205547/5-dig1505.jpg");
295        } else if (magazine[2] == "cicada-magazine") {
296            jQuery("#order-now-button").attr("href", "https://shop.cricketmedia.com/cicada-bulk");
297        }
298    }
299
300    var actualPage2 = window.location.pathname;
301    //console.log(actualPage2);
302    //if (actualPage2.slice(1, 9) == "childrens-magazines") {
303        var magazine = actualPage.split("/");
304        //console.log(magazine);
305        if (magazine[1] == "Babybug-stories-for-babies-and-toddlers-magazine") {
306            jQuery("#subscribe-button").attr("href", "https://shop.cricketmedia.com/subscriptions/Babybug-Magazine-for-Babies.html");
307            jQuery("#bg").attr("src", "https://aws.cricketmedia.com/media/20160818230341/1-babybug-cover.png");
308            jQuery("#sm1").attr("src", "https://aws.cricketmedia.com/media/20160818230323/2-babybug-cover.png");
309            jQuery("#sm2").attr("src", "https://aws.cricketmedia.com/media/20160818230309/3-babybug-cover.png");
310            jQuery("#sm3").attr("src", "https://aws.cricketmedia.com/media/20160818230259/4-babybug-cover.png");
311            jQuery("#sm4").attr("src", "https://aws.cricketmedia.com/media/20160818230244/5-babybug-cover.png");
312            jQuery("#sm1,#sm2,#sm3,#sm4").css("height","auto");
313            jQuery("#sample-issue-link").attr("href", "http://cm-cdn.cricketmag.com/ProductImages/pdfs/sample%20issues/BBB1503.pdf");
314            jQuery("#for-educators-link").css('display','none');
315            jQuery("#landing-orders-container-p br").css('display','none');
316            jQuery("#quote-text").text("“A simple mix of fantasy and real life-based subject matter, it features short-short stories, activities, and poems, accompanied by colorful illustrations and photographs... [The Guide for Caregivers] offers ways that parents and other caregivers can enhance the reading experience for their baby or toddler, with more suggestions at the magazine's digital site.”");
317            jQuery("#quote-author").text("—Parents’ Choice Awards, BABYBUG 2016 GOLD Award Winner");
318        } else if (magazine[1] == "Ladybug-songs-and-stories-for-kids") {
319            jQuery("#subscribe-button").attr("href", "https://shop.cricketmedia.com/subscriptions/LADYBUG-Magazine-for-Kids.html");
320            jQuery("#bg").attr("src", "https://aws.cricketmedia.com/media/20160601212809/LYB1510_Booklet.pdf.jpg");
321            jQuery("#sm1").attr("src", "https://aws.cricketmedia.com/media/20160601212803/LYB1601Booklet.pdf.jpg");
322            jQuery("#sm2").attr("src", "https://aws.cricketmedia.com/media/20160818194324/2-ladybug-cover.png");
323            jQuery("#sm3").attr("src", "https://aws.cricketmedia.com/media/20160818194640/3-ladybug-cover.png");
324            jQuery("#sm4").attr("src", "https://aws.cricketmedia.com/media/20160818194911/4-ladybug-cover.png");
325            jQuery("#sample-issue-link").attr("href", "https://cricketmedia-wordpress.s3.amazonaws.com/pdfs/LYB/LYB0609.pdf");
326            jQuery("#for-educators-link").attr("href", "/classroom/ladybug-magazine");
327            jQuery("#quote-text").text("“Well-designed to foster an interest in reading and language, LADYBUG is Cricket Media's enjoyably accessible literary magazine for the younger set, chock full of crafts, poems, songs, “I Spy” and “Spot the Differences” activities, stories and comic strips, all fueled by a winning combination of lively writing and eclectic illustrations from top-notch professionals.”");
328            jQuery("#quote-author").text("—Parents’ Choice Awards, LADYBUG 2016 GOLD Award Winner");
329        } else if (magazine[1] == "Click-science-for-kids-magazine") {
330            jQuery("#subscribe-button").attr("href", "https://shop.cricketmedia.com/subscriptions/Click-Magazine-for-Kids.html");
331            jQuery("#bg").attr("src", "https://aws.cricketmedia.com/media/20160329193451/1-clk1509.jpg");
332            jQuery("#sm1").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160314154811/2-clk0401_01.jpg");
333            jQuery("#sm2").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160314154823/3-clk0204_01_bobbarner.jpg");
334            jQuery("#sm3").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160314154832/4-clk1507.jpg");
335            jQuery("#sm4").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160314154839/5-clk0911.jpg");
336            jQuery("#sample-issue-link").attr("href", "https://cricketmedia-wordpress.s3.amazonaws.com/20160307230158/CLK1510.pdf");
337            jQuery("#for-educators-link").attr("href", "/classroom/click-magazine");
338            jQuery("#quote-text").text("“Budding scientists will find plenty to think about in this dynamic, ‘opening windows for young minds’ publication, geared to the preschool and kindergarten set... Each themed magazine provides ample opportunity for fascinating (and at times, unexpected) avenues of discovery through photographs, illustrations and clearly written fiction and non-fiction.”");
339            jQuery("#quote-author").text("—Parents’ Choice Awards, CLICK 2015 GOLD Award Winner");
340        } else if (magazine[1] == "Ask-science-magazine-for-kids") {
341            jQuery("#subscribe-button").attr("href", "https://shop.cricketmedia.com/subscriptions/ASK-Magazine-for-Kids.html");
342            jQuery("#bg").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160314200601/1-ask1507_cover.jpg");
343            jQuery("#sm1").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160314200615/2-ask-jan-2002.jpg");
344            jQuery("#sm2").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160314200633/3-ask0112.cover_.jpg");
345            jQuery("#sm3").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160314200646/4-ask1402.jpg");
346            jQuery("#sm4").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160314200657/5-ask1509.jpg");
347            jQuery("#sample-issue-link").attr("href", "https://cricketmedia-wordpress.s3.amazonaws.com/20160314164745/ASK1602.pdf");
348            jQuery("#for-educators-link").attr("href", "/classroom/ask-magazine");
349            jQuery("#quote-text").text("“The editors of ASK clearly know how to appeal to their target audience... Genetics isn't easy to explain, but a feature on Gregor Mendel for the probability issue explains the mechanics of breeding pea plants quite cogently, complete with a pretty Punnet square for illustration.”");
350            jQuery("#quote-author").text("—Parents’ Choice Awards, ASK 2016 GOLD Award Winner");
351        } else if (magazine[1] == "Spider-stories-for-children-magazine") {
352            jQuery("#subscribe-button").attr("href", "https://shop.cricketmedia.com/subscriptions/SPIDER-Magazine-for-Kids.html");
353            jQuery("#bg").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160314200706/1-sdr1509_artistanniewon.jpg");
354            jQuery("#sm1").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160314200717/2-spr1104_robertmeganck.jpg");
355            jQuery("#sm2").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160314200734/3-spr0807_davidsmall.
355jpg");
356            jQuery("#sm3").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160314200754/4-sdr1502.jpg");
357            jQuery("#sm4").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160314200823/5-sdr9509.jpg");
358            jQuery("#sample-issue-link").attr("href", "https://cricketmedia-wordpress.s3.amazonaws.com/20160316150618/SDR1511.pdf");
359            jQuery("#for-educators-link").attr("href", "/classroom/spider-magazine");
360            jQuery("#quote-text").text("“Writers and illustrators are first-rate, and imagination soars ... Another signature touch: the host of comical creepy crawlies, headed by cheeky Spider, who act out their own goofy stories, cleverly embedded with vocabulary lessons along the way, moving across the bottom of the magazine's pages.”");
361            jQuery("#quote-author").text("—Parents’ Choice Awards, SPIDER 2016 GOLD Award Winner");
362        } else if (magazine[1] == "Cricket-literary-magazine") {
363            jQuery("#subscribe-button").attr("href", "https://shop.cricketmedia.com/subscriptions/CRICKET-Magazine-for-Kids.html");
364            jQuery("#bg").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160314200844/1-04-2008-stephen-costanza.jpg");
365            jQuery("#sm1").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160314200912/2-1403_susan-farrington.jpg");
366            jQuery("#sm2").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160314200930/3-01-2007-jo-lynn-alcorn.jpg");
367            jQuery("#sm3").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160314200953/4-ckt1309.jpg");
368            jQuery("#sm4").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160314201022/5-ckt8804.jpg");
369            jQuery("#sample-issue-link").attr("href", "https://cricketmedia-wordpress.s3.amazonaws.com/20160314165355/CKT1603.pdf");
370            jQuery("#for-educators-link").attr("href", "/classroom/cricket-magazine");
371            jQuery("#quote-text").text("“Judging by CRICKET's fiercely loyal and engaged readers—as reflected on the magazine's letters pages—children and teens haven't succumbed entirely to the lures of electronic media, either, enjoying this superlative print magazine. And no wonder. [It] began in the early 1970s (and has launched numerous top-notch specialized magazines for different age ranges), but it is ever fresh.”");
372            jQuery("#quote-author").text("—Parents’ Choice Awards, CRICKET 2016 GOLD Award Winner");
373        } else if (magazine[1] == "Cobblestone-american-history-magazine") {
374            jQuery("#subscribe-button").attr("href", "https://shop.cricketmedia.com/subscriptions/Cobblestone-Magazine-for-Kids.html");
375            jQuery("#bg").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160314201051/1-cob1502_cover_lisa-fields.jpg");
376            jQuery("#sm1").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160314201123/2-cob1003_00cvr1.jpg");
377            jQuery("#sm2").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160314201147/3-cob0512_00cvr1.jpg");
378            jQuery("#sm3").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160314201201/4-cob1402.jpg");
379            jQuery("#sm4").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160314201213/5-cob1510.jpg");
380            jQuery("#sample-issue-link").attr("href", "https://cricketmedia-wordpress.s3.amazonaws.com/20160314171029/COB1601.pdf");
381            jQuery("#for-educators-link").attr("href", "/classroom/cobblestone-magazine");
382            jQuery("#quote-text").text("“American history is never dull in the pages of COBBLESTONE... Opportunities for participation include brainteaser quizzes, and requests for reader-generated essays and art.”");
383            jQuery("#quote-author").text("—Parents’ Choice Awards, COBBLESTONE 2016 GOLD Award Winner");
384        } else if (magazine[1] == "Muse-science-magazine") {
385            jQuery("#subscribe-button").attr("href", "https://shop.cricketmedia.com/subscriptions/MUSE-Magazine-for-Kids.html");
386            jQuery("#bg").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160315205243/2-mus1505_00c1.jpg");
387            jQuery("#sm1").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160315205234/1-mus1501_cover.jpg");
388            jQuery("#sm2").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160315205253/3-mus0901_cover.jpg");
389            jQuery("#sm3").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160315205126/4-mus1111.jpg");
390            jQuery("#sm4").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160315205133/5-mus1510.jpg");
391            jQuery("#sample-issue-link").attr("href", "https://cricketmedia-wordpress.s3.amazonaws.com/20160316145632/MUS1601.pdf");
392            jQuery("#for-educators-link").attr("href", "/classroom/muse-magazine");
393            jQuery("#quote-text").text("“The merger of MUSE with sister publication ODYSSEY in 2015 has brought changes that, while not diminishing the magazine's overall quality, have in some ways altered its nature. The new design... seems to skew more toward the older age range of the MUSE readership, while more closely adhering to public education-focused S.T.E.M. (Science, Technology, Engineering, and Mathematics). The high caliber of the magazine's intelligent, informative content... remains the same.”");
394            jQuery("#quote-author").text("—Parents’ Choice Awards, MUSE 2016 GOLD Award Winner");
395        } else if (magazine[1] == "Faces-travel-magazine-for-kids") {
396            jQuery("#subscribe-button").attr("href", "https://shop.cricketmedia.com/subscriptions/FACES-Magazine-for-Kids.html");
397            jQuery("#bg").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160315205313/1-fac1505_00cvr1.jpg");
398            jQuery("#sm1").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160315205319/2-fac1511_00cvr1.jpg");
399            jQuery("#sm2").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160315205335/3-fac1501_01.jpg");
400            jQuery("#sm3").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160315205358/4-fac1509.jpg");
401            jQuery("#sm4").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160315205412/5-fac1505.jpg");
402            jQuery("#sample-issue-link").attr("href", "https://cricketmedia-wordpress.s3.amazonaws.com/20160314172930/FAC1602.pdf");
403            jQuery("#for-educators-link").attr("href", "/classroom/faces-magazine");
404            jQuery("#quote-text").text("“Drawing content from around the world, FACES fosters curiosity and a sense of human connection through cohesive subject matter, text, photographs, and illustrations, and through plentiful opportunities for reader participation.”");
405            jQuery("#quote-author").text("—Parents’ Choice Awards, FACES 2016 GOLD Award Winner");
406        } else if (magazine[1] == "Dig-Into-History-for-kids") {
407            jQuery("#subscribe-button").attr("href", "https://shop.cricketmedia.com/subscriptions/Dig-Magazine-for-Kids.html");
408            jQuery("#bg").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160315205425/1-dig1505_00c1.jpg");
409            jQuery("#sm1").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160315205442/2-dig1502_00c1_artist-bob-berry.jpg");
410            jQuery("#sm2").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160315205509/3-dig1501_00c1_cover.jpg");
411            jQuery("#sm3").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160315205529/4-dig1510.jpg");
412            jQuery("#sm4").attr("src", "https://cricketmedia-wordpress.s3.amazonaws.com/20160315205547/5-dig1505.jpg");
413            jQuery("#sample-issue-link").attr("href", "https://cricketmedia-wordpress.s3.amazonaws.com/20160314171938/DIG1601.pdf");
414            jQuery("#for-educators-link").attr("href", "/classroom/dig-magazine");
415            jQuery("#quote-text").text("“[The] magazine is willing to go far afield of archaeology to explore any number of compelling topics... Smart and curious students in late-elementary and early middle-school grades who thrive on digging deeper to learn something new will dig this magazine.”");
416            jQuery("#quote-author").text("—Parents’ Choice Awards, DIG INTO HISTORY 2016 GOLD Award Winner");
417        } else if (magazine[1] == "Cicada-teen-magazine") {
418            jQuery("#subscribe-button").attr("href", "http://cicadamag.com");
419            jQuery("#bg").attr("src", "https://aws.cricketmedia.com/media/20180223165240/cicada-thumbn
419ail-1.jpg");
420            jQuery("#sm1").attr("src", "https://aws.cricketmedia.com/media/20180228145941/cicada-thumbnail-2.jpg");
421            jQuery("#sm2").attr("src", "https://aws.cricketmedia.com/media/20180228145944/cicada-thumbnail-3.jpg");
422            jQuery("#sm3").attr("src", "https://aws.cricketmedia.com/media/20180228145947/cicada-thumbnail-4.jpg");
423            jQuery("#sm4").attr("src", "https://aws.cricketmedia.com/media/20180228145949/cicada-thumbnail-5.jpg");
424            jQuery("#sample-issue-link").attr("href", "http://cicadamag.com/index.php?/cic1701/");
425            jQuery("#for-educators-link").css('display','none');
426            jQuery("#landing-orders-container-p br").css('display','none');
427            jQuery("#quote-text").text("“This superb literary arts magazine for teens and adults, featuring a feast of work by established and up-and-coming authors, graphic artists, and poets—as well as interviews, recommended zines and comics lists, reader polls, �and writings—is one to savor, cover to cover... CICADA deepens reader involvement with ‘The Slam,’ its inclusive, nurturing online writing lab.”");
428            jQuery("#quote-author").text("—Parents’ Choice Awards, CICADA 2016 GOLD Award Winner");
429        }
430        else if (magazine[1] == "StoryBug-interactive-stories-app-for-toddlers") {
431            jQuery("#subscribe-button").attr("href", "https://itunes.apple.com/us/app/story-bug-read-books-together/id892990715");
432            jQuery("#bg").attr("src", "https://aws.cricketmedia.com/media/20160818221022/1-story-bug-cover.png");
433            jQuery("#sm1").attr("src", "https://aws.cricketmedia.com/media/20160818221013/2-story-bug-cover.png");
434            jQuery("#sm2").attr("src", "https://aws.cricketmedia.com/media/20160818221000/3-story-bug-cover.png");
435            jQuery("#sm3").attr("src", "https://aws.cricketmedia.com/media/20160818220950/4-story-bug-cover.png");
436            jQuery("#sm4").attr("src", "https://aws.cricketmedia.com/media/20160818220934/5-story-bug-cover.png");
437            jQuery("#sm1,#sm2,#sm3,#sm4").css("height","auto");
438            jQuery("#sample-issue-link").css('display','none');
439            jQuery("#for-educators-link").css('display','none');
440            jQuery("#landing-orders-container-p br").css('display','none');
441            jQuery(".button-order").css("padding-bottom","0px");
442            jQuery("#quote-text").text("“My kids tried this app with their grandparents and an aunt and uncle that live out of state and we absolutely LOVED IT!!! It was so fun to be able to share a story with them and the kids love the idea that they can ‘call’ them for a story anytime they want... Even if you are lucky enough to live close to each other, it is a fun and easy way to communicate and share some quality time together reading.”");
443            jQuery("#quote-author").text("—Monica, theiphonemom.com");
444
445        }
446        else if (magazine[1] == "hamilton"){
447            jQuery("#bg").attr("src", "https://aws.cricketmedia.com/media/20161003173539/hamilton-cover-1.jpg");
448            jQuery("#sm1").attr("src", "https://aws.cricketmedia.com/media/20161003173543/hamilton-cover-2.jpg");
449            jQuery("#sm2").attr("src", "https://aws.cricketmedia.com/media/20161003173546/hamilton-cover-3.jpg");
450            jQuery("#sm3").attr("src", "https://aws.cricketmedia.com/media/20161003173550/hamilton-cover-4.jpg");
451            jQuery("#sm4").attr("src", "https://aws.cricketmedia.com/media/20161003173554/hamilton-cover-5.jpg");
452            if (screen.width <= 480) {
453                jQuery(".hamilton-header-name").attr("src", "https://aws.cricketmedia.com/media/20160929230739/hamilton-header-name-mobile.png");
454            }
455        }
456        else if (magazine[1] == "holidaybook" && magazine.length == 2){
457            jQuery("#bg").attr("src", "https://aws.cricketmedia.com/media/20161116113444/holidaybook-cover-1.png");
458            jQuery("#sm1").attr("src", "https://aws.cricketmedia.com/media/20161116113458/holidaybook-cover-2.png");
459            jQuery("#sm2").attr("src", "https://aws.cricketmedia.com/media/20161116113532/holidaybook-cover-3.png");
460            jQuery("#sm3").attr("src", "https://aws.cricketmedia.com/media/20161116113600/holidaybook-cover-4.png");
461            jQuery("#sm4").attr("src", "https://aws.cricketmedia.com/media/20161116113611/holidaybook-cover-5.png");
462            /*if (screen.width <= 480) {
463                jQuery(".hamilton-header-name").attr("src", "https://aws.cricketmedia.com/media/20160929230739/hamilton-header-name-mobile.png");
464            }*/
465        }
466        else if (magazine[2] == "ophelias-holiday-hooray-fudge"){
467            jQuery("#bg").attr("src", "https://aws.cricketmedia.com/media/20161116194654/fudge-cover1.png");
468            jQuery("#sm1").css("display", "none");
469            jQuery("#sm2").css("display", "none");
470            jQuery("#sm3").css("display", "none");
471            jQuery("#sm4").css("display", "none");
472            jQuery(".button-price a").attr("href", "https://aws.cricketmedia.com/media/20161116203130/Holiday-Fudge-Recipe.pdf");
473            /*if (screen.width <= 480) {
474                jQuery(".hamilton-header-name").attr("src", "https://aws.cricketmedia.com/media/20160929230739/hamilton-header-name-mobile.png");
475            }*/
476        }
477        else if (magazine[2] == "a-hanukkah-game"){
478            jQuery("#bg").attr("src", "https://aws.cricketmedia.com/media/20161116204927/hanukkah-cover1.png");
479            jQuery("#sm1").attr("src", "https://aws.cricketmedia.com/media/20161116204914/hanukkah-cover2.png");
480            jQuery("#sm2").css("display", "none");
481            jQuery("#sm3").css("display", "none");
482            jQuery("#sm4").css("display", "none");
483            jQuery(".button-price a").attr("href", "https://aws.cricketmedia.com/media/20161116205104/Hanukkah-Dreidle-Game.pdf");
484            /*if (screen.width <= 480) {
485                jQuery(".hamilton-header-name").attr("src", "https://aws.cricketmedia.com/media/20160929230739/hamilton-header-name-mobile.png");
486            }*/
487        }
488        else if (magazine[1] == "ask-magic-of-books"){
489            /*jQuery("#bg").attr("src", "https://aws.cricketmedia.com/media/20170104212239/ask-cover-1.png");
490            jQuery("#sm1").attr("src", "https://aws.cricketmedia.com/media/20170104212226/ask-cover-2.png");
491            jQuery("#sm2").attr("src", "https://aws.cricketmedia.com/media/20170104212218/ask-cover-3.png");
492            jQuery("#sm3").attr("src", "https://aws.cricketmedia.com/media/20170104212209/ask-cover-4.png");
493            jQuery("#sm4").attr("src", "https://aws.cricketmedia.com/media/20170104212159/ask-cover-5.png");*/
494
495            jQuery("#bg").attr("src", "https://aws.cricketmedia.com/media/20170120132414/ask-cover-1.jpg");
496            jQuery("#sm1").attr("src", "https://aws.cricketmedia.com/media/20170120132407/ask-cover-2.jpg");
497            jQuery("#sm2").attr("src", "https://aws.cricketmedia.com/media/20170120132402/ask-cover-3.jpg");
498            jQuery("#sm3").attr("src", "https://aws.cricketmedia.com/media/20170120132357/ask-cover-4.jpg");
499            jQuery("#sm4").attr("src", "https://aws.cricketmedia.com/media/20170120132353/ask-cover-5.jpg");
500            /*if (screen.width <= 480) {
501                jQuery(".hamilton-header-name").attr("src", "https://aws.cricketmedia.com/media/20160929230739/hamilton-header-name-mobile.png");
502            }*/
503        }
504    /* ------  Image slide  --------- */
505
506    //jQuery('.gallery-magazines img').click(function() {
507      jQuery('.gallery-magazines img').on('click touchstart', function(e) {  
508        e.preventDefault();
509        e.stopImmediatePropagation();
510        console.log("stop propagation");
511        var img = jQuery(this).attr('src');
512        var bigImg = jQuery('.content-magazines img').attr('src');
513        console.log(bigImg);
514        jQuery('.content-magazines img').fadeOut(200, function() {
515            jQuery('.content-magazines img').attr('src', img);
516        }).fadeIn(200);
517        //
518        var index = jQuery(this).parent().data("id");
519        console.log(index);
520        var lastImg;
521        for (i = 1; i <= index; i++) {
522
523            if (i == 1) {
524                lastImg = jQuery("#img-" + i + " img").attr("src");
525                jQuery("#img-" + i + " img").attr("src", bigImg);
526            }
527            else {
528                console.log("last image " + lastImg);
529                var oldSrc = jQuery("#img-" + i + " img").attr("src");
530                jQuery("#img-" + i + " img").attr("src", lastImg);
531                lastImg = oldSrc
532                console.log("last image " + lastImg);
533            }
534        }
535
536    });
537
538
539
540
541    /* ----- Google analytics in form ------- */
542    if (window.location.pathname == "/classroom/price-quote-page") {
543        jQuery(".salesforce_w2l_lead .w2linput.submit").click(function(e) {
544            dataLayer.push({'event': 'formSubmit', 'formDesc': 'classroomLead', 'numStudents': jQuery('#sf_student_responsible').val()});
545        });
546    }
547
548    /* Carousel buttons change */
549    /*jQuery('#myCarousel').on('slide.bs.carousel', function(e) {
550        if (e.relatedTarget.id == 'two') {
551            jQuery("#b1").attr('src', 'https://cricketmedia-wordpress.s3.amazonaws.com/20160226064334/families-hi.png');
552            jQuery("#b2").attr('src', 'https://cricketmedia-wordpress.s3.amazonaws.com/20160226064332/educators-no.png');
553            jQuery("#b3").attr('src', 'https://cricketmedia-wordpress.s3.amazonaws.com/20160226064342/licensing-no.png');
554        } else if (e.relatedTarget.id == 'three') {
555            jQuery("#b1").attr('src', 'https://cricketmedia-wordpress.s3.amazonaws.com/20160226064337/families-no.png');
556            jQuery("#b2").attr('src', 'https://cricketmedia-wordpress.s3.amazonaws.com/20160226064329/educators-hi.png');
557            jQuery("#b3").attr('src', 'https://cricketmedia-wordpress.s3.amazonaws.com/20160226064342/licensing-no.png');
558        } else if (e.relatedTarget.id == 'four') {
559            jQuery("#b1").attr('src', 'https://cricketmedia-wordpress.s3.amazonaws.com/20160226064337/families-no.png');
560            jQuery("#b2").attr('src', 'https://cricketmedia-wordpress.s3.amazonaws.com/20160226064332/educators-no.png');
561            jQuery("#b3").attr('src', 'https://cricketmedia-wordpress.s3.amazonaws.com/20160226064339/lice
561nsing-hi.png');
562        } else if (e.relatedTarget.id == 'one') {
563            jQuery("#b1").attr('src', 'https://cricketmedia-wordpress.s3.amazonaws.com/20160226064337/families-no.png');
564            jQuery("#b2").attr('src', 'https://cricketmedia-wordpress.s3.amazonaws.com/20160226064332/educators-no.png');
565            jQuery("#b3").attr('src', 'https://cricketmedia-wordpress.s3.amazonaws.com/20160226064342/licensing-no.png');
566        }
567
568    });*/
569
570    jQuery('#myCarousel').on('slide.bs.carousel', function(e) {
571        if (e.relatedTarget.id == 'two') {
572            jQuery("#b1").attr('src', 'https://aws.cricketmedia.com/media/20160914172157/families-hi.png');
573            jQuery("#b2").attr('src', 'https://aws.cricketmedia.com/media/20160914172152/educators-no.png');
574            jQuery("#b3").attr('src', 'https://aws.cricketmedia.com/media/20160914171128/licensing-no.png');
575        } else if (e.relatedTarget.id == 'three') {
576            jQuery("#b1").attr('src', 'https://aws.cricketmedia.com/media/20160914172202/families-no.png');
577            jQuery("#b2").attr('src', 'https://aws.cricketmedia.com/media/20160914172148/educators-hi.png');
578            jQuery("#b3").attr('src', 'https://aws.cricketmedia.com/media/20160914171128/licensing-no.png');
579        } else if (e.relatedTarget.id == 'four') {
580            jQuery("#b1").attr('src', 'https://aws.cricketmedia.com/media/20160914172202/families-no.png');
581            jQuery("#b2").attr('src', 'https://aws.cricketmedia.com/media/20160914172152/educators-no.png');
582            jQuery("#b3").attr('src', 'https://aws.cricketmedia.com/media/20160914171132/licensing-hi.png');
583        } else if (e.relatedTarget.id == 'one') {
584            jQuery("#b1").attr('src', 'https://aws.cricketmedia.com/media/20160914172202/families-no.png');
585            jQuery("#b2").attr('src', 'https://aws.cricketmedia.com/media/20160914172152/educators-no.png');
586            jQuery("#b3").attr('src', 'https://aws.cricketmedia.com/media/20160914171128/licensing-no.png');
587        } else if (e.relatedTarget.id == 'five') {
588            jQuery("#b1").attr('src', 'https://aws.cricketmedia.com/media/20160914172157/families-hi.png');
589            jQuery("#b2").attr('src', 'https://aws.cricketmedia.com/media/20160914172152/educators-no.png');
590            jQuery("#b3").attr('src', 'https://aws.cricketmedia.com/media/20160914171128/licensing-no.png');
591        }
592
593
594    });
595
596    jQuery("#b1")
597        .mouseover(function() { 
598            jQuery(this).attr("src", "https://aws.cricketmedia.com/media/20170227141910/childrens-home-button-over.png");
599        })
600        .mouseout(function() {
601            jQuery(this).attr("src", "https://aws.cricketmedia.com/media/20170227141920/childrens-home-button.png");
602        });
603    jQuery("#b2")
604        .mouseover(function() { 
605            jQuery(this).attr("src", "https://aws.cricketmedia.com/media/20170227141905/educator-home-button-over.png");
606        })
607        .mouseout(function() {
608            jQuery(this).attr("src", "https://aws.cricketmedia.com/media/20170227141917/educator-home-button.png");
609        });
610    jQuery("#b3")
611        .mouseover(function() { 
612            jQuery(this).attr("src", "https://aws.cricketmedia.com/media/20170227141901/content-home-button-over.png");
613        })
614        .mouseout(function() {
615            jQuery(this).attr("src", "https://aws.cricketmedia.com/media/20170227141913/content-home-button.png");
616        });        
617
618    /* Mobile Carousel buttons change */
619    /*jQuery('#mobileCarousel').on('slide.bs.carousel', function(e) {
620        if (e.relatedTarget.id == 'mobile-two') {
621            jQuery("#mb1").attr('src', 'https://cricketmedia-wordpress.s3.amazonaws.com/20160226064334/families-hi.png');
622            jQuery("#mb2").attr('src', 'https://cricketmedia-wordpress.s3.amazonaws.com/20160226064332/educators-no.png');
623            jQuery("#mb3").attr('src', 'https://cricketmedia-wordpress.s3.amazonaws.com/20160226064342/licensing-no.png');
624        } else if (e.relatedTarget.id == 'mobile-three') {
625            jQuery("#mb1").attr('src', 'https://cricketmedia-wordpress.s3.amazonaws.com/20160226064337/families-no.png');
626            jQuery("#mb2").attr('src', 'https://cricketmedia-wordpress.s3.amazonaws.com/20160226064329/educators-hi.png');
627            jQuery("#mb3").attr('src', 'https://cricketmedia-wordpress.s3.amazonaws.com/20160226064342/licensing-no.png');
628        } else if (e.relatedTarget.id == 'mobile-four') {
629            jQuery("#mb1").attr('src', 'https://cricketmedia-wordpress.s3.amazonaws.com/20160226064337/families-no.png');
630            jQuery("#mb2").attr('src', 'https://cricketmedia-wordpress.s3.amazonaws.com/20160226064332/educators-no.png');
631            jQuery("#mb3").attr('src', 'https://cricketmedia-wordpress.s3.amazonaws.com/20160226064339/lice
631nsing-hi.png');
632        } else if (e.relatedTarget.id == 'mobile-one') {
633            jQuery("#mb1").attr('src', 'https://cricketmedia-wordpress.s3.amazonaws.com/20160226064337/families-no.png');
634            jQuery("#mb2").attr('src', 'https://cricketmedia-wordpress.s3.amazonaws.com/20160226064332/educators-no.png');
635            jQuery("#mb3").attr('src', 'https://cricketmedia-wordpress.s3.amazonaws.com/20160226064342/licensing-no.png');
636        }
637
638    });*/
639
640    jQuery('#mobileCarousel').on('slide.bs.carousel', function(e) {
641        if (e.relatedTarget.id == 'mobile-two') {
642            jQuery("#mb1").attr('src', 'https://aws.cricketmedia.com/media/20160914172157/families-hi.png');
643            jQuery("#mb2").attr('src', 'https://aws.cricketmedia.com/media/20160914172152/educators-no.png');
644            jQuery("#mb3").attr('src', 'https://aws.cricketmedia.com/media/20160914171128/licensing-no.png');
645        } else if (e.relatedTarget.id == 'mobile-three') {
646            jQuery("#mb1").attr('src', 'https://aws.cricketmedia.com/media/20160914172202/families-no.png');
647            jQuery("#mb2").attr('src', 'https://aws.cricketmedia.com/media/20160914172148/educators-hi.png');
648            jQuery("#mb3").attr('src', 'https://aws.cricketmedia.com/media/20160914171128/licensing-no.png');
649        } else if (e.relatedTarget.id == 'mobile-four') {
650            jQuery("#mb1").attr('src', 'https://aws.cricketmedia.com/media/20160914172202/families-no.png');
651            jQuery("#mb2").attr('src', 'https://aws.cricketmedia.com/media/20160914172152/educators-no.png');
652            jQuery("#mb3").attr('src', 'https://aws.cricketmedia.com/media/20160914171132/licensing-hi.png');
653        } else if (e.relatedTarget.id == 'mobile-one') {
654            jQuery("#mb1").attr('src', 'https://aws.cricketmedia.com/media/20160914172202/families-no.png');
655            jQuery("#mb2").attr('src', 'https://aws.cricketmedia.com/media/20160914172152/educators-no.png');
656            jQuery("#mb3").attr('src', 'https://aws.cricketmedia.com/media/20160914171128/licensing-no.png');
657        }
658
659    });
660
661    /** Mobile Menu (SlickNav) Events */
662    jQuery('.slicknav_btn').click(function() {
663        jQuery(".slicknav_open").find(".slicknav_icon").find('span').remove();
664        jQuery(".slicknav_open").find(".slicknav_icon").html('<div class="slicknav_icon_x text-center" style="color:#fff;font-family:Open Sans, sans-serif;margin-top:-2px;font-size:15pt">✕</div>');
665
666        jQuery(".slicknav_collapsed").find(".slicknav_icon").find('div').remove();
667        jQuery(".slicknav_collapsed").find(".slicknav_icon").html('<span class="slicknav_icon-bar"></span><span class="slicknav_icon-bar"></span><span class="slicknav_icon-bar"></span>');
668    });
669
670//search and join us effect slide out
671
672
673    var JoinIcon = jQuery('#header-joinus-button-image');
674    var CloseButtonContainer = jQuery('#header-close-button-container');
675    var CloseButton = jQuery('#header-close-button');
676    var JoinBox = jQuery('#header-join-us-form-container');
677    var JoinInput= jQuery('#header-join-us-form-container input[type="email"]');
678    var SearchIcon = jQuery('#header-search-button-image');
679    var SearchBox = jQuery('#header-search-form-container');
680    var SearchInput = jQuery('#header-search-form-container input[type="search"]');
681    var formSubscribe = jQuery('#form_bronto');
682    var isJoinOpen = false;
683    var isSearchOpen = false;
684    
685    JoinIcon.click(function(){
686        var m = "new";
687    });
688
689    CloseButton.click(function(){
690        JoinBox.removeClass('open');
691        CloseButtonContainer.removeClass('open');
692        JoinIcon.fadeOut(300,function(){
693                JoinIcon.attr('src','https://aws.cricketmedia.com/media/20161020191110/subscribe-newsletter-button.png');
694            }).fadeIn(300);
695        isJoinOpen = false;
696    });
697
698    SearchIcon.click(function(){
699        if(isSearchOpen == false){
700            SearchBox.addClass('open');
701            SearchInput.val('');
702            isSearchOpen = true;
703        } else {
704            SearchBox.removeClass('open');
705            isSearchOpen = false;
706        }
707        
708    });
709
710    setCarouselShadow();
711    /*PRODUCTS SUB-MENU*/
712    //var subMenuWidth = jQuery('#myCarousel').css('width');
713    //jQuery('.mega-sub-menu').width(subMenuWidth);
714
715    /*new mobile header*/
716    //Search Box
717    //jQuery('.slicknav_nav').append('<li id="header-search-mobile-button" class="menu-item menu-item-type-post_type menu-item-object-page" style="position:relative;"><div style="padding:5px 10px;margin:2px 5px;font-size:13pt;font-weight:bold;"><img id="header-mobile-search-button-image" src="https://aws.cricketmedia.com/media/20161107160724/search-mobile-icon.png" />SEARCH</div><div id="header-mobile-search-form-container"><form method="get" action="https://www.cricketmedia.com/" role="search"><input type="search" name="s" placeholder="Enter your search term..."><input type="submit" value=""></form><div id="header-mobile-search-close-button-container"><img id="header-mobile-search-close-button" src="https://aws.cricketmedia.com/media/20161107174001/header-mobile-search-close-button.png"/></div></div></li>');
718    jQuery('.slicknav_nav').append('<li id="header-search-mobile-button" class="menu-item menu-item-type-post_type menu-item-object-page" style="position:relative;"><div style="padding:5px 10px;margin:2px 5px;font-size:13pt;font-weight:bold;"><img id="header-mobile-search-button-image" src="https://aws.cricketmedia.com/media/20161107160724/search-mobile-icon.png" />SEARCH</div><div id="header-mobile-search-form-container"><form method="get" action="https://www.cricketmedia.com/" role="search"><input type="search" name="s" placeholder="Enter your search term..."><img id="header-mobile-search-close-button" src="https://aws.cricketmedia.com/media/20161107174001/header-mobile-search-close-button.png"/><input type="submit" value=""></form></div></li>');
719    //Subscribe box
720    //jQuery('.slicknav_nav').append('<li id="header-subscribe-mobile-button" class="menu-item menu-item-type-post_type menu-item-object-page" style="position:relative;"><div style="padding:5px 10px;margin:2px 5px;font-size:13pt;font-weight:bold;">SUBSCRIBE TO OUR NEWSLETTER</div><div id="header-mobile-subscribe-form-container"><form id="form_bronto" action="https://app.bronto.com/public/webform/process/" method="post"><input type="hidden" name="fid" value="ar6793gb3xv6l3h5bexbt9z8cklq6"><input type="hidden" name="sid" value="7db0988fcd1cf3ce0eff40f5c56cb9e3"><input type="hidden" name="delid" value=""><input type="hidden" name="subid" value=""><input type="hidden" name="td" value=""><input type="hidden" name="formtype" value="addcontact"><script type="text/javascript">var fieldMaps = {};</script><div class="" id="row_22276"><div class="" id="column_28799" ><div class="email field_block"><span><input type="email" id="email-bronto" placeholder="Enter your email address..." class="text field fb-email" name="64161" value=""><input type="submit" value=""></span></div><input type="hidden" name="64250[440364]" value="true"></div></div></form><div id="header-mobile-subscribe-close-button-container"><img id="header-mobile-subscribe-close-button" src="https://aws.cricketmedia.com/media/20161107174001/header-mobile-search-close-button.png"/></div></div></li>');
721    jQuery('.slicknav_nav').append('<li id="header-subscribe-mobile-button" class="menu-item menu-item-type-post_type menu-item-object-page" style="position:relative;"><div style="padding:5px 10px;margin:2px 5px;font-size:13pt;font-weight:bold;">SUBSCRIBE TO OUR NEWSLETTER</div><div id="header-mobile-subscribe-form-container"><form id="form_bronto" action="https://app.bronto.com/public/webform/process/" method="post"><input type="hidden" name="fid" value="ar6793gb3xv6l3h5bexbt9z8cklq6"><input type="hidden" name="sid" value="7db0988fcd1cf3ce0eff40f5c56cb9e3"><input type="hidden" name="delid" value=""><input type="hidden" name="subid" value=""><input type="hidden" name="td" value=""><input type="hidden" name="formtype" value="addcontact"><script type="text/javascript">var fieldMaps = {};</script><div class="" id="row_22276"><div class="" id="column_28799" ><div class="email field_block"><span><input type="email" id="email-bronto" placeholder="Enter your email address..." class="text field fb-email" name="64161" value=""><img id="header-mobile-subscribe-close-button" src="https://aws.cricketmedia.com/media/20161107174001/header-mobile-search-close-button.png"/><input type="submit" value=""></span></div><input type="hidden" name="64250[440364]" value="true"></div></div></form></div></li>');
722    //Social Icons
723    jQuery('.slicknav_nav').append('<li class="menu-item menu-item-type-post_type menu-item-object-page"><div style="padding:5px 10px;margin:2px 5px;font-size:13pt;font-weight:bold;" id="header-mobile-social-buttons"><a href="https://www.facebook.com/cricketmedia" target="_blank"><img class="alignnone size-full wp-image-596" src="https://www.cricketmedia.com/wp-content/uploads/2015/06/facebook_32x32.png" alt="facebook_32x32" width="32" height="32" /></a><a href="https://twitter.com/cricketmediainc" target="_blank"><img class="alignnone size-full wp-image-602" src="https://www.cricketmedia.com/wp-content/uploads/2015/06/twitter_32x32.png" alt="twitter_32x32" width="32" height="32" /></a><a href="https://www.instagram.com/cricketmediainc/" target="_blank"><img class="alignnone size-full wp-image-602" src="https://aws.cricketmedia.com/media/20161107154853/instagram-mobile-icon.png" alt="instagram_32x32" style="width:35px;" /></a><a href="https://www.pinterest.com/CricketMediainc" target="_blank"><img class="alignnone size-full wp-image-601" src="https://www.cricketmedia.com/wp-content/uploads/2015/06/pinterest_32x32.png" alt="pinterest_32x32" width="32" height="32" /></a><a href="https://www.linkedin.com/company/cricket-media" target="_blank"><img class="alignnone size-full wp-image-600" src="https://www.cricketmedia.com/wp-content/uploads/2015/06/linkedin_32x32.png" alt="linkedin_32x32" width="32" height="32" /></a></div></li>');
724
725    var SearchMobileIcon = jQuery('#header-search-mobile-button');
726    var SearchMobileImage = jQuery('#header-mobile-search-button-image');
727    var SearchMobileBox = jQuery('#header-mobile-search-form-container');
728    var SearchMobileInput = jQuery('#header-mobile-search-form-container input[type="search"]');
729    var CloseSearchMobileButton = jQuery('#header-mobile-search-close-button');
730    var CloseSearchMobileButtonContainer = jQuery('#header-mobile-search-close-button-container');
731    //var isSearchMobileOpen = false;
732
733    SearchMobileIcon.click(function(){
734            SearchMobileBox.addClass('open');
735            SearchMobileInput.val('');
736            SearchMobileIcon.css('background','#5786B1');
737            SearchMobileImage.attr("src","https://aws.cricketmedia.com/media/20161107183208/search-mobile-icon-open.png");
738            CloseSearchMobileButton.delay(300).show(300);
739            //CloseSearchMobileButtonContainer.addClass('open');
740    });
741
742    CloseSearchMobileButton.click(function(e){
743            SearchMobileBox.removeClass('open');
744            SearchMobileIcon.css('background','#3A6CA2');
745            SearchMobileImage.attr("src","https://aws.cricketmedia.com/media/20161107160724/search-mobile-icon.png");
746            //CloseSearchMobileButtonContainer.removeClass('open');
747            CloseSearchMobileButton.hide();
748            e.stopPropagation();
749    });
750
751    var SubscribeMobileIcon = jQuery('#header-subscribe-mobile-button');
752    //var SearchMobileImage = jQuery('#header-mobile-search-button-image');
753    var SubscribeMobileBox = jQuery('#header-mobile-subscribe-form-container');
754    var SubscribeMobileInput = jQuery('#header-mobile-subscribe-form-container input[type="email"]');
755    var CloseSubscribeMobileButton = jQuery('#header-mobile-subscribe-close-button');
756    var CloseSubscribeMobileButtonContainer = jQuery('#header-mobile-subscribe-close-button-container');
757    //var isSearchMobileOpen = false;
758
759    SubscribeMobileIcon.click(function(){
760            SubscribeMobileBox.addClass('open');
761            //CloseSubscribeMobileButtonContainer.addClass('open');
762            SubscribeMobileInput.val('');
763            SubscribeMobileIcon.css('background','#5786B1');
764            //SearchMobileImage.attr("src","https://aws.cricketmedia.com/media/20161107183208/search-mobile-icon-open.png");
765            CloseSubscribeMobileButton.delay(300).show(300);
766    });
767
768    CloseSubscribeMobileButton.click(function(e){
769            SubscribeMobileBox.removeClass('open');
770            //CloseSubscribeMobileButtonContainer.removeClass('open');
771            SubscribeMobileIcon.css('background','#3A6CA2');
772            //SearchMobileImage.attr("src","https://aws.cricketmedia.com/media/20161107160724/search-mobile-icon.png");
773            CloseSubscribeMobileButton.hide();
774            e.stopPropagation();
775    });
776
777
778
779}); //End Document Ready
780
781function setCarouselShadow(){
782    /*Carousel shadow*/
783    var greenHeight = jQuery('.site-header').css('height');
784    var carouselWidth;
785    var carouselHeight;
786    if(jQuery('#myCarousel').css('display') == 'block')
787    {   
788        carouselWidth = jQuery('#myCarousel').css('width');
789        carouselHeight = jQuery('#myCarousel').css('height');
790    }
791    else if(jQuery('#mobileCarousel').css('display') == 'block')
792    {
793        var carouselWidth = jQuery('#myCarousel').css('width');
794        var carouselHeight = jQuery('#myCarousel').css('height');
795        greenHeight = 0;
796    }    
797    var documentWidth = jQuery(document).width();
798    var shadowHeight = parseInt(carouselHeight) - parseInt(greenHeight);
799
800    /*jQuery('#carousel-shadow').css('position','absolute');
801    jQuery('#carousel-shadow').css('top',greenHeight);
802    jQuery('#carousel-shadow').css('z-index','99');
803    jQuery('#carousel-shadow').css('width',documentWidth);
804    //jQuery('#carousel-shadow').css('height', shadowHeight + 'px');
805    jQuery('#carousel-shadow').css('height', '100px');
806    jQuery('#carousel-shadow').css('-webkit-box-shadow','inset 0px 11px 26px -8px rgba(0,0,0,0.75)');
807    jQuery('#carousel-shadow').css('-moz-box-shadow','inset 0px 11px 26px -8px rgba(0,0,0,0.75)');
808    jQuery('#carousel-shadow').css('box-shadow','inset 0px 11px 26px -8px rgba(0,0,0,0.75)');*/
809    
810    jQuery('#carousel-shadow').css('position','absolute');
811    jQuery('#carousel-shadow').css('top',greenHeight);
812    jQuery('#carousel-shadow').css('z-index','99');
813    jQuery('#carousel-shadow').css('width',documentWidth);
814    //jQuery('#carousel-shadow').css('height', shadowHeight + 'px');
815    if(jQuery('#mobileCarousel').css('display') == 'block')
816    {
817            jQuery('#carousel-shadow').css('height', shadowHeight + 'px');
818            jQuery('#carousel-shadow').css('width',carouselWidth);
819            jQuery('#carousel-shadow').css('display','none');
820    }
821    else
822        jQuery('#carousel-shadow').css('height', '100px');
823    /*jQuery('#carousel-shadow').css('-webkit-box-shadow','inset 0px 11px 26px -16px rgba(0,0,0,0.75)');
824    jQuery('#carousel-shadow').css('-moz-box-shadow','inset 0px 11px 26px -16px rgba(0,0,0,0.75)');
825    jQuery('#carousel-shadow').css('box-shadow','inset 0px 11px 26px -16px rgba(0,0,0,0.75)');*/
826    /*
827    : ;
828    : ;
829    : ;
830    */
831    jQuery('#carousel-shadow').css('-webkit-box-shadow','inset 0 20px 20px -20px rgba(0,0,0,0.8)');
832    jQuery('#carousel-shadow').css('-moz-box-shadow','inset 0 20px 20px -20px rgba(0,0,0,0.8)');
833    jQuery('#carousel-shadow').css('box-shadow','inset 0 20px 20px -20px rgba(0,0,0,0.8)');
834    
835}
836
837
838jQuery(window).on('resize', function(){
839    setCarouselShadow();
840      
841});
842
843function loading_posts(pageNumber, selectTopic, selectAges) {
844    jQuery.post(ajax_object.ajaxurl, {
845        action: 'load_content',
846        page: pageNumber,
847        topic: selectTopic,
848        ages: selectAges
849    }, function(data) {
850        var $response = jQuery(data);
851        var blog_left = $response.filter('#blog-left').html();
852        var blog_right = $response.filter('#blog-right').html();
853        var pagination = $response.filter('#pagination').html();
854        jQuery('#loading').hide();
855        jQuery('#blog-left').append(blog_left);
856        jQuery('#blog-right').append(blog_right);
857        jQuery('#pagination').html(pagination);
858        jQuery('#cat1').removeAttr('disabled');
859        jQuery('#cat2').removeAttr('disabled');
860        jQuery("#pagination .load > a").on("click", function() {
861            jQuery('#loading').show();
862            loading_posts(jQuery("#pagination .load > a").data("page"), jQuery("#cat1").val(), jQuery("#cat2").val());
863        });
864    });
865}
866
867function suggestionsMessage() {
868    jQuery(".topic-suggestions").toggle();
869    jQuery('#suggestions-submit-button').toggle();
870    jQuery('#zendesk-submit-button').toggle();
871}
872
873/**function getScreenResolution() {
874 var screenWidth = screen.width;
875 var screenHeight = screen.height;
876 
877 jQuery.post(ajax_object.ajaxurl, {
878 action: 'get_resolution',
879 width: screenWidth,
880 height: screenHeight
881 }, function(data) {
882 var response = JSON.parse(data);
883 console.log(response.resolution);
884 });
885 }*/
886
887
888function responsive_change_box_order() {
889    if (window.matchMedia("(max-width: 768px)").matches || window.matchMedia("(max-width: 420px)").matches) {
890        jQuery(".sidebar-primary").remove().insertBefore(jQuery(".content-sidebar-wrap"));
891        jQuery(".sidebar-secondary").remove().insertBefore(jQuery(".content"));
892        console.log('Event1');
893    }
894    else {
895        jQuery(".sidebar-primary").remove().prependTo(jQuery(".content-sidebar-wrap"));
896        jQuery(".sidebar-secondary").remove().insertBefore(jQuery(".content"));
897        console.log('Event2');
898    }
899
900}

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.