"); } //DOC MOD EVENTS $(".upcomingevents").modEvents({ columns:"yes", monthLong:"no" }); eventsByDay(".upcomingevents .ui-articles"); if($("div.ui-widget.app.upcomingevents .ui-article-description").text() == "There are no upcoming events to display.") { $("div.ui-widget.app.upcomingevents .ui-article-description").css("padding","0px"); } //APPLY RESPONSIVE DIMENSIONS TO CONTENT IMAGES $("div.ui-widget.app .ui-widget-detail img") .not($("div.ui-widget.app.cs-rs-multimedia-rotator .ui-widget-detail img")) .not($("div.ui-widget.app.gallery.json .ui-widget-detail img")) .not($("div.ui-widget.app.headlines .ui-widget-detail img")) .each(function() { if ($(this).attr('width') !== undefined && $(this).attr('height') !== undefined || $(this).parent('p').attr('style') == 'text-align: center;' ) { // IMAGE HAS INLINE DIMENSIONS $(this).css({"width": $(this).attr("width") + "px", "max-width": "100%", "height": "auto", "max-height": $(this).attr("height") + "px"}); } }); //DOC ADD READ FULL STORY BUTTON TO EACH HEADLINE $(".ui-widget.app.headlines").each(function(){ $(".ui-article", this).each(function(){ var headlineURL = $("h1 a", this).attr("href"); $(".ui-article-description", this).append('Learn More'); }); }); $(".hp.column.four .ui-widget.app.headlines .ui-widget-detail .ui-articles .ui-article h1.ui-article-title").hide(); $(".hp.column.four .ui-widget.app.headlines .ui-widget-detail .ui-articles .ui-article p.ui-article-description").hide(); //DOC HIDE HP-CONTENT-LOWER IF THERE ARE NO APPS IN REGION F AND G if(!$("#sw-content-container5 .ui-widget.app").length && !$("#sw-content-container6 .ui-widget.app").length){ $("#hp-content-lower").hide(); } //DOC IF THERE IS NO PHOTO GALLERY APP IN REGION A AND THE GALLERY TOGGLE IS SET TO TRUE, HIDE THE GLOBAL ICONS AND ADJUST COLUMN ONE MARGIN if(!$("#sw-content-container10 .ui-widget.app").length){ $(".hp #gb-global-icons").hide(); $(".hp.column.one.true").css("margin-top","0px"); } //DOC IF NO APPS IN REGION G, HIDE REGION G AND MAKE REGION F SPAN 100% if(!$("#sw-content-container6 .ui-widget.app").length){ $("#hp-content-lower .hp.column.three").css("width","100%"); $("#hp-content-lower .hp.column.four").hide(); } //DOC IF NO APPS IN REGION F, HIDE REGION F AND MAKE REGION G SPAN 100% if(!$("#sw-content-container5 .ui-widget.app").length){ $("#hp-content-lower .hp.column.four").css("width","100%"); $("#hp-content-lower .hp.column.three").hide(); } //DOC HIDE HP-CONTENT-UPPER IF THERE ARE NO APPS IN REGIONS B,C,D & E if(!$("#sw-content-container1 .ui-widget.app").length && !$("#sw-content-container2 .ui-widget.app").length && !$("#sw-content-container3 .ui-widget.app").length && !$("#sw-content-container4 .ui-widget.app").length){ $("#hp-content-upper").hide(); } //DOC move view all link in headlines scroller to app footer if($(".hp.column.four .ui-widget.app.headlines .more-link").length) { $(".hp.column.four .ui-widget.app.headlines").each(function() { var thisApp = this; var thisAppFooter = $(".more-link",this).parent().parent().next(); $(".more-link",thisApp).prependTo(thisAppFooter); }); } // ********** FOOTER ********** // $(".gb.footer.two #social-icons .social-icon").each(function(){ $(this).hover(function(){ $(this).siblings().not(this).css("opacity",".6"); }, function(){ $(this).siblings().not(this).css("opacity","1"); });	}); //DOC SHOW PHONE AND FAX NUMBERS IF THEY EXIST if("585-262-8100" != "") { $(".cs-contact-phone").removeClass("hidden"); } if("" != "") { $(".cs-contact-fax").removeClass("hidden"); } //DOC GET SCHOOLWIRES FOOTER LINKS var feedbackText = $("div#sw-footer-links li:eq(0) a").text(); var termsURL = $("div#sw-footer-links li:eq(2) a").attr("href"); var termsText = $("div#sw-footer-links li:eq(2) a").text(); var policyURL = $("div#sw-footer-links li:eq(1) a").attr("href"); var policyText = $("div#sw-footer-links li:eq(1) a").text(); var copyrightText = $("#sw-footer-outer #sw-footer-copyright").text(); var swbbLogo = $("#sw-footer-outer #sw-footer-logo img").attr("src"); var swbbLogoAlt = $("#sw-footer-outer #sw-footer-logo img").attr("alt"); //$(".cs-sw-footer-logo img").attr("src",swbbLogo).attr("alt", swbbLogoAlt); $("#cs-sw-footer .cs-sw-footer-logo").html($("#sw-footer-logo").html()); $("#cs-sw-footer-links").html("" + feedbackText + "" + termsText + "" + policyText + "" + copyrightText + ""); } function eventsByDay(container) { var countLi = 0; $(".ui-article", container).each(function(){ if (!$(this).find("h1.ui-article-title.sw-calendar-block-date").size()){ var moveArticle = $(this).html(); $(this).parent().prev().children().children().next().append(moveArticle); $(this).parent().remove(); }; }); $(".ui-article .ui-article-description", container).each(function(){ $(".sw-calendar-block-title", this).insertBefore($(".sw-calendar-block-time", this)); }); $(".ui-article", container).each(function(){ var newDateTime = $('.upcoming-column.left h1', this).html().split(""); var dayName = newDateTime[0].split("<"); if( dayName[0] != 'undefined' ){ //add a zero to the date if it is a single digit if( newDateTime[1].length == 1 ) newDateTime[1] = "0" + newDateTime[1]; //wrap the date in a new tag var newDate = '' + newDateTime[1] + ''; //manipulate the month to only allow a max of 4 letters in the month name var newMonth = newDateTime[0].split('>'); newMonth = ((newMonth[1].length > 4 ) ? newMonth[1].substr(0, 3) : newMonth[1]); //add in the month newDate += '' + newMonth + ''; //append the date and month back into their columns $('.upcoming-column.left h1', this).html(newDate); } }); } function globalIconsNew() { $(".global-icon").each(function(){ $(this).addClass("closed"); var gbTextWidth = $(".text",this).width(); $(this).off().stop(true, true).hover(function(){ if($(this).hasClass("closed")) { $(this).stop(true,true).animate({ width: gbTextWidth + 60, right: gbTextWidth + 30 }, 400, 'swing') $(this).removeClass("closed").addClass("open");	} else { $(this).stop(true,true).animate({ width: '30px', right: '0px' }, 400) $(this).removeClass("open").addClass("closed");	} }); $(this).focusin(function(){ if($(this).hasClass("closed")) { $(this).stop(true,true).animate({ width: gbTextWidth + 60, right: gbTextWidth + 30 }, 400, 'swing') $(this).removeClass("closed").addClass("open");	} else { $(this).stop(true,true).animate({ width: '30px', right: '0px' }, 400) $(this).removeClass("open").addClass("closed");	} }); $(this).focusout(function(){ $(this).stop(true,true).animate({ width: '30px', right: '0px' }, 400) $(this).removeClass("open").addClass("closed");	}); }); } function searchText() { //DOC CUSTOM MYSTART SEARCH PLACEHOLDER //SEARCH TEXT $("div#sw-mystart-search input#sw-search-input").removeAttr("placeholder"); $("div#sw-mystart-search input#sw-search-input").attr("value", "Search"); $("div#sw-mystart-search input#sw-search-input").focus(function() { if($(this).val() == "Search") { $(this).val(""); } }); $("div#sw-mystart-search input#sw-search-input").blur(function() { if($(this).val() == "") { $(this).val("Search"); } }); } function calendarListView(){ //DOC auto click function for schoolwires calendar list view for small mobile devices if(!$("a.ui-btn-toggle.list").hasClass("active")){ $("a.ui-btn-toggle.list").click(); } } function headerLinks(){ //DOC SET UP THE CHECK VARIABLES var hasLink = 0; var linkCheck = [ ["one","At Your Service"], ["two","Parent Resources"], ["three","Enroll your child"], ["four","Schools and Programs"], ["five","Transportation"], ["six","Breakfast and Lunch Menus"], ["seven","PreKindergarten Programs"], ["eight","Employment"], ["nine","Superintendent"], ["ten","Board of Education"] ] for(var i = 0; i < 10; i++) { if(!linkCheck[i][1] == "") { $("#gb-header-links .links-body li a.link." + linkCheck[i][0]).removeClass("hidden"); hasLink = 1; } } // SHOW THE TITLE IF THERE ARE ANY if(hasLink == 1){ $("#gb-header-links .links-header").removeClass("hidden"); } } function footerLinks(){ //DOC SET UP THE CHECK VARIABLES var linkCheckFooter = [ ["one","Schools and Programs"], ["two","Employment Opportunities"], ["three","Volunteer"] ] for(var i = 0; i < 3; i++) { if(!linkCheckFooter[i][1] == "") { $(".gb.footer.two .footer-link." + linkCheckFooter[i][0]).removeClass("hidden"); } } //DOC HIDE DIVIDER FROM LAST LINK IF SITEMAP IS HIDDEN if($(".gb-sitemap.false").length && !$(".footer-link.one.hidden").length && $(".footer-link.two.hidden").length && $(".footer-link.three.hidden").length) { $(".footer-link.one .divider").hide(); } if($(".gb-sitemap.false").length && !$(".footer-link.one.hidden").length && !$(".footer-link.two.hidden").length && $(".footer-link.three.hidden").length) { $(".footer-link.two .divider").hide(); } if($(".gb-sitemap.false").length && !$(".footer-link.one.hidden").length && !$(".footer-link.two.hidden").length && !$(".footer-link.three.hidden").length) { $(".footer-link.three .divider").hide(); } if($(".gb-sitemap.false").length && $(".footer-link.one.hidden").length && !$(".footer-link.two.hidden").length && $(".footer-link.three.hidden").length) { $(".footer-link.two .divider").hide(); } if($(".gb-sitemap.false").length && $(".footer-link.one.hidden").length && !$(".footer-link.two.hidden").length && !$(".footer-link.three.hidden").length) { $(".footer-link.three .divider").hide(); } if($(".gb-sitemap.false").length && $(".footer-link.one.hidden").length && $(".footer-link.two.hidden").length && !$(".footer-link.three.hidden").length) { $(".footer-link.three .divider").hide(); } if($(".gb-sitemap.false").length && !$(".footer-link.one.hidden").length && $(".footer-link.two.hidden").length && !$(".footer-link.three.hidden").length) { $(".footer-link.three .divider").hide(); } } function headlinesMod(){ //WRAP THE HEADLINES TITLE AND CAPTION IN A DIV FOR STYLING $('.hp.column.four .ui-widget.app.headlines .ui-widget-detail .ui-articles .ui-article').each(function(){ if($(".ui-article-thumb img",this).attr("src")){ var linkHREF = $(".ui-article-title > a",this).attr("href"); var imgWidth = $(".ui-article-thumb img",this).width(); $("h1.ui-article-title", this).next('p.ui-article-description').andSelf().wrapAll('