jQuery.cookie=function(name,value,options){if(typeof value!='undefined'){options=options||{};if(value===null){value='';options.expires=-1}var expires='';if(options.expires&&(typeof options.expires=='number'||options.expires.toUTCString)){var date;if(typeof options.expires=='number'){date=new Date();date.setTime(date.getTime()+(options.expires*24*60*60*1000))}else{date=options.expires}expires='; expires='+date.toUTCString()}var path=options.path?'; path='+(options.path):'';var domain=options.domain?'; domain='+(options.domain):'';var secure=options.secure?'; secure':'';document.cookie=[name,'=',encodeURIComponent(value),expires,path,domain,secure].join('')}else{var cookieValue=null;if(document.cookie&&document.cookie!=''){var cookies=document.cookie.split(';');for(var i=0;i 0) { printRecipe(); enlargeImage(); lightbox(); $('.nutritionInfo tr:even').addClass('row1'); // CF: alternate row stripping in nutrition tables } else { // do not load these functions } featuredRecipe(); // featured recipe page recipeSearch(); if ($('#ctl00_ctl00_ctl00_varietyTarget').length > 0) //cereal product page specific functions { currentCereal(); nutritionDetailToggle(); cerealBox(); // Scriptmanager runs all javascript so much faster that the dom replacement to add the cereal flash is too slow. // Any functions that only fire if the flash is loaded depend upon the function call to be slowed down for them to find the flash. t = setTimeout(flashLinks,1000); noFlash(); } else { // do not load these functions } tabToggle(); rememberFAQTab(); contactVerification(); if ($('#ctl00_heritage').length > 0) { heritage(); } else { // do nothing } }); // ************ Global Functions ************** function doNoticeCount(siteName) { // 3 counts of popup with legal message regarding Ralcorp purchase of Post var count = $.cookie('post_purchase_notice_'+siteName); if(count===null) { count = 0; } else { // do nothing } if(count<3) { window.open("/legal_notice.aspx", "legal_notice","menubar=no,width=430,height=200,toolbar=no"); count++; $.cookie('post_purchase_notice_'+siteName, count, { path: '/', expires: 10000 }); } else { // do nothing } } function jsEnabled() { //add a class to the body tag to help style elements when javascript is enabled vs disabled $('body').addClass('jsEnabled'); } function styleSafari() { // helper for styling safari seperately when needed if ($.browser.safari) { $('body').addClass('safari'); } else { // do nothing } } function initSubNavToggle() { var version = parseInt(jQuery.browser.version); if ((jQuery.browser.msie) && (version < 7)) { $('#nav').before(''); } else { $('#header').prepend(''); } $('#sn1').css({'display':'block'}); var mask_height = $('#subnav_mask').css('height'); $('#nav li:first a').hover( function() { if (nav_hover_obj || menu_hover_obj) { nav_hover_obj = menu_hover_obj = null; } else { // do nothing } if ((jQuery.browser.msie) && (version < 7)) { // IE below 7 subnavIE6(); } else { subnav(); } function subnavIE6() { $('div#subnav_mask').css({'z-index':'11', 'position':'relative'}); $('#nav').css({'z-index':'12'}); $('#nav li .subNav').css({'z-index':'15'}); } function subnav() { // if first nav item "Our Brands" is hovered over, display subnav $('div#subnav_mask').animate( {height: '0px'} , 'fast'); } }, function() { //leave open on hover out }); $('div.subNav .close a').click( function() { if ((jQuery.browser.msie) && (version < 7)) { // IE below 7 subnavCloseIE6(); } else { subnavClose(); } function subnavCloseIE6() { $('div#subnav_mask').css({'z-index':'15'}); $('#nav li .subNav').css({'z-index':'11'}); } function subnavClose() { $('div#subnav_mask').animate( {height : mask_height} , 'fast'); } //Do not use the href in the HTML so page does not jump to the anchor return false; }); } // ************ Page Specific Functions ************** // ******** Recipe Details Page Only ********** function printRecipe() { var urlSearch = document.location.search.toString(); var urlSearchSplit = urlSearch.split('&'); var recipeURL,toStrip,returnURL; $('.print').click(function() { // On recipe detail page, when print is clicked, show print version using css and apply a return link. $('.printWrapper').show(); }); $('a.return').click(function() { $('#wrapper').removeClass('printWrapper'); $('a.return').remove(); }); for (x=0; xReturn'); recipeURL = document.location.toString(); toStrip = recipeURL.indexOf("p=print"); returnURL = recipeURL.slice(0,[toStrip - 1]); $('a.return').attr('href', returnURL); $('#wrapper').show(); } else { $('#wrapper').removeClass('printWrapper'); $('a.return').remove(); $('#wrapper').show(); } } } function lightbox() { if ($('#recipeExtras').length > 0) { // Leandro Version $("a[rel='lightbox']").lightBox({ imageBtnClose: '/img/close.gif', imageLoading: '/img/loading.gif', overlayOpacity: 0.8 }); $('#ctl00_ctl00_pageContent_cph_MainColumn_EnlargeImage').click( function() { $('#lightbox-nav').remove(); $('#lightbox-secNav').hide(); $('#lightbox-secNav').appendTo('#lightbox-container-image-box'); $('#lightbox-container-image-box').hover( function() { $('#lightbox-container-image-box #lightbox-secNav').fadeIn(); }, function() { $('#lightbox-secNav').fadeOut(); }); }); } else { //do nothing } } function enlargeImage() { // if the default recipe image is being used, do not show the link to enlarge it if ($('#ctl00_ctl00_pageContent_cph_MainColumn_EnlargeImage').attr('href') == '../../img/recipe_photos/defaultimg_lg.jpg') { // leave it hidden } else { // show the enlarge image link $('#ctl00_ctl00_pageContent_cph_MainColumn_EnlargeImage').show(); } } // ******** Recipe Landing (Featured Recipes) Page Only ********** function featuredRecipe() { if ($('#ctl00_ctl00_featuredRecipes').length > 0) { //get recipe (featured recipe landing) - square box link list functionality var sq_nav_arr = $('#square_nav li a'); sq_nav_arr.click(function(e) { var theLink = $(this); var theTarget = $(this).attr('class'); //class of the clicked square equals the recipe ID to show sq_nav_arr.removeClass('active'); //old link is no longer active $(this).addClass('active'); //make clicked link active $('#recipe_0,#recipe_1,#recipe_2,#recipe_3,#recipe_4').hide(); //hide everyone initially $('#' + theTarget).show(); //show only the recipe ID associated with the clicked square //Do not jump to anchor e.preventDefault(); return false; }); } else { // do nothing } } // ******** Recipe Search Results Page Only ********** function recipeSearch() { $('.recipeTTL').each(function(i) { var recipeLink = $(this); recipeLink.parent().prev().wrap(''); recipeLink.parent().prev().attr('href', recipeLink.attr('href')); }); } // ******** Post Heritage Page Only ********** function heritage() { //Post Heritage flash - swfobject 2 for dom replacement //Also uses swfaddress // if there is a timeline div, embed the flash otherwise do not. if ($('#timeline').length > 0) { var flashvars = {}; var params = { wmode: "opaque", bgcolor: "#ffffff", menu: 'false' }; var attributes = { id: 'timeline' }; var address = window.location.toString(); var parentDirectory = address.lastIndexOf('/'); var thePage = unescape(window.location.toString()); if (thePage.indexOf('?') !== -1) { thePage = thePage.substring(0,thePage.indexOf('?')); } else { //do nothing } thePage = thePage.substr(thePage.lastIndexOf('/') + 1); if (thePage !== "") { //Page URL does not end with a "/" thus swfaddress will cause probelms. Show the HTML version. Can apply a link here to show the flash version and then the back button will not be broken to visitors. makeTimelineVisible(); } else { //all variables needed for flash to function have been checked. Embed the flash. showHeritageFlash(); } } else { //do nothing } function showHeritageFlash() { swfobject.embedSWF("/flash/RalcorpHeritage.swf", "timeline", "910", "740", "9.0.0", "/flash/expressInstall.swf", flashvars, params, attributes); makeTimelineVisible(); } function makeTimelineVisible() { //Reset visibility that was hidden in page to stop flicker of unstyled content before full page load. var f = document.getElementById('timeline'); if (f != undefined) { f.style.visibility = "visible"; } else { //do nothing as it is already visible } } } // ************ Product Pages Only Functions ************** function currentCereal() { //product detail page - prevent current product variety from reloading page if clicked $('#otherVarietiesContainer li.current a').attr('href','#'); } function noFlash() { //put the product image back if flash does not load. Covering people with JavaScript installed but not Flash. var flashLoaded = $('object#Main').html(); if (flashLoaded === null) { // flash has not loaded unhide the background image hidden in the page to stop flicker $('#flashContainer').removeClass('hideMainBg'); } else { //do nothing } } function cerealBox() { //product page flash - swfobject 2 dom replacement var flashvars = {}; var params = { allowscriptaccess: "sameDomain" }; var attributes = {}; var varietyFlash = $('#thisVariety').text(); swfobject.embedSWF("/flash/Main.swf?xmlPath=/flash/data/" + varietyFlash, "Main", "240", "403", "9.0.0", "/flash/expressInstall.swf", flashvars, params, attributes); } function ExecuteWhenFlashIsLoaded(flashMovie, callback) { var checkIsLoaded = function() { if (flashMovie.PercentLoaded() == 100) { callback(); } else { setTimeout(checkIsLoaded, 50); } }; checkIsLoaded(); } function thisMovie(movieName) { //Product page flash needs to be passed the moviename so the tab links will show the proper portion of the flash return document[movieName]; } function nutritionLink(num) { //product detail page - pass flash the toggled link var m = thisMovie("Main"); if (m !== undefined) { m.sendToFlashNutritionLink(num); } else { // do nothing } } function flashLinks() { var mainTag = document.getElementById('Main').tagName; mainTag = mainTag.toString().toLowerCase(); if (mainTag == 'object') { $('#nutriToggleNav').show(); //pass flash nutrition sub nav selected links $('#togNutriInfo a, #nutrifacts a').click(function() { return nutritionLink(0); //tell flash to show nutrition label }); $('#togOverview a').click(function() { return nutritionLink(-1); //"close" flash and return to overview }); $('#vitamin a').click(function() { return nutritionLink(1); //tell flash to jump down to vitamins and minerals }); $('#ingredients a').click(function() { return nutritionLink(2); //tell flash to jump down to ingredients }); } else { $('#togNutriInfo a, #nutrifacts a, #togOverview a, #vitamin a, #ingredients a').click(function() { //return false; }); } } function nutritionDetailToggle() { if ($('#nutriToggleNav').length > 0) { $('#nutriToggleNav li').click(function() { //Change nutrition sub nav class on product detail $('#nutriToggleNav li').removeClass('current'); $(this).addClass('current'); //Do not jump to anchor return false; }); } else { // do nothing } } function tabToggle() { //product detail page - right side nutrition tips should start closed. on click the description opens $('#nutritionTipsContainer li').addClass('closed'); $('#nutritionTipsContainer li li').removeClass('closed'); // remember if siteLinkContainer is hidden initially so that toggleNav does not set it to shown if ($('#siteLinkContainer').html() !== null) { var rememberSiteLinkState = $('#siteLinkContainer').html().length > 0 ? 'shown' : 'hidden'; } else { // do nothing } // init nutrition detail togglets $('#nutritionTipsContainer li').toggle( function() { $(this).removeClass('closed'); }, function() { $(this).addClass('closed'); } ); // cereal product pages - toggle between overview, nutrition, and promotional content // faq page - toggle between post cereals, general nutrition and sweepstakes $('.toggleNav li').click(function() { var currentTab; $('.toggleNav li').removeClass('current'); $(this).addClass('current'); if ($(this).attr('id') == 'togNutriInfo') { //click to view nutrition info // set first nutrition detail link to current state $('#nutriToggleNav li').removeClass('current'); $('#nutriToggleNav li:first').addClass('current'); $('#nutritionTipsContainer,#nutrition').show(); $('#overview,#promotion,#promoContainer,#siteLinkContainer,#featuredRecipiesContainer,#otherProductsContainer,#post,#sweepstakes').hide(); $('#varietyContent').css("background-position","400px 400px"); currentTab = 'second'; } else if ($(this).attr('id') == 'togOverview') { //click to view overview $('#nutritionTipsContainer,#nutrition,#sweepstakes').hide(); $('#overview,#promoContainer,#featuredRecipiesContainer,#otherProductsContainer,#post').show(); if (rememberSiteLinkState == 'shown') { $('#siteLinkContainer').show(); } else { $('#siteLinkContainer').hide(); } $('#varietyContent').css("background-position","0 0"); currentTab = 'first'; } else { // click to view promotion $('#nutritionTipsContainer,#nutrition,#overview,#post').hide(); $('#promotion,#sweepstakes').show(); currentTab = 'third'; } if ($('#ctl00_ctl00_faqs') !== null) { // do nothing } else { // Do not jump to anchor return false; } $.cookie('post_tab', currentTab, { path: '/', expires: 10 }); }); } function rememberFAQTab() { if ($('#ctl00_ctl00_faqs').length > 0) { // retrieve cookie so that invalid recipe search does not switch back to default faq tab var tab = $.cookie('post_tab'); if (tab === null) { $('#togOverview').addClass('current'); $('#post').show(); } else { $('.toggleNav li').removeClass('current'); switch (tab) { case 'second': $('#togNutriInfo').addClass('current'); $('#post,#sweepstakes').hide(); $('#nutrition').show(); break; case 'third': $('#togPromo').addClass('current'); $('#nutrition,#post').hide(); $('#sweepstakes').show(); break; default: // first $('#togOverview').addClass('current'); $('#nutrition,#sweepstakes').hide(); $('#post').show(); break; } } } else { // do nothing } } function contactVerification() { if (($('#ctl00_ctl00_feedback').length > 0) || ($('#ctl00_ctl00_contact').length > 0)) { var invalidMsg = $('#ctl00_ctl00_pageContent_cph_MainColumn_RequiredFieldValidatorEmailInvalid'); var reqMsg = $('#ctl00_ctl00_pageContent_cph_MainColumn_RequiredFieldValidatorEmail'); function toggleMsgs() { if ((reqMsg.css('visibility') == 'hidden') && (invalidMsg.css('visibility') == 'hidden')) { // both are invisible - email is either correct or form has not been submitted // display none one of them so there is only a height between form elements for one message (consistent space between form elements) invalidMsg.addClass('none').removeClass('block'); } else if ((reqMsg.css('visibility') == 'hidden') && (invalidMsg.css('visibility') == 'visible')) { // email is invalid (invalid message replaces required message) reqMsg.addClass('none').removeClass('block'); invalidMsg.addClass('block').removeClass('none'); } else if ((reqMsg.css('visibility') == 'visible') && (invalidMsg.css('visibility') == 'hidden')) { // email is required message (submitted without an email address) invalidMsg.addClass('none').removeClass('block'); reqMsg.addClass('block').removeClass('none'); } else { // both are set to visible which should not be possible but just in case... reqMsg.addClass('none').removeClass('block'); invalidMsg.addClass('block').removeClass('none'); } } toggleMsgs(); // run it onload $('#ctl00_ctl00_pageContent_cph_MainColumn_Submit').click(function() { // run it again on submit toggleMsgs(); }); } else { // do nothing } } /* * jQuery Cycle Plugin (with Transition Definitions) * Examples and documentation at: http://malsup.com/jquery/cycle/ * Copyright (c) 2007-2008 M. Alsup * Version: 2.28 * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html */ ;eval(function(p,a,c,k,e,r){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}(';(4($){8 q=\'2.28\';8 r=$.2p.24&&/3G 6.0/.1A(4n.4m);4 1r(){7(2v.27&&2v.27.1r)2v.27.1r(\'[B] \'+3w.3v.3F.3E(2X,\'\'))};$.E.B=4(m){8 n=2X[1];O x.1t(4(){7(m===3t||m===P)m={};7(m.25==2C){3s(m){2a\'3r\':7(x.S)1v(x.S);x.S=0;$(x).1I(\'B.1R\',\'\');O;2a\'2h\':x.1g=1;O;2a\'2L\':x.1g=0;7(n===2l){m=$(x).1I(\'B.1R\');7(!m){1r(\'2O 1n 2S, 2T 1n 2L\');O}7(x.S){1v(x.S);x.S=0}1l(m.1X,m,1,1)}O;3W:m={1o:m}}}Q 7(m.25==47){8 c=m;m=$(x).1I(\'B.1R\');7(!m){1r(\'2O 1n 2S, 2T 1n 22 2Z\');O}7(c<0||c>=m.1X.L){1r(\'4l 2Z 1L: \'+c);O}m.N=c;7(x.S){1v(x.S);x.S=0}1l(m.1X,m,1,c>=m.1f);O}7(x.S)1v(x.S);x.S=0;x.1g=0;8 d=$(x);8 e=m.2r?$(m.2r,x):d.3i();8 f=e.3h();7(f.L<2){1r(\'3g; 3o 3k 3n: \'+f.L);O}8 g=$.3p({},$.E.B.2E,m||{},$.2F?d.2F():$.3q?d.1I():{});7(g.2e)g.2d=g.2f||f.L;d.1I(\'B.1R\',g);g.1w=x;g.1X=f;g.I=g.I?[g.I]:[];g.1j=g.1j?[g.1j]:[];g.1j.2J(4(){g.2i=0});7(g.1z)g.1j.J(4(){1l(f,g,0,!g.1x)});7(r&&g.21&&!g.2N)2m(e);8 h=x.3D;g.D=T((h.1F(/w:(\\d+)/)||[])[1])||g.D;g.C=T((h.1F(/h:(\\d+)/)||[])[1])||g.C;g.V=T((h.1F(/t:(\\d+)/)||[])[1])||g.V;7(d.u(\'1Z\')==\'3V\')d.u(\'1Z\',\'3R\');7(g.D)d.D(g.D);7(g.C&&g.C!=\'20\')d.C(g.C);7(g.1a)g.1a=T(g.1a);7(g.1k){g.1q=[];1J(8 i=0;i=f.L)g.1a=0;8 j=g.1a||0;e.u({1Z:\'32\',A:0,9:0}).W().1t(4(i){8 z=j?i>=j?f.L-(i-j):j-i:f.L-i;$(x).u(\'z-1L\',z)});$(f[j]).u(\'1h\',1).U();7($.2p.24)f[j].35.2A(\'2t\');7(g.1m&&g.D)e.D(g.D);7(g.1m&&g.C&&g.C!=\'20\')e.C(g.C);7(g.2h)d.2z(4(){x.1g=1},4(){x.1g=0});8 k=$.E.B.M[g.1o];7($.2B(k))k(d,e,g);Q 7(g.1o!=\'2w\')1r(\'3f 3e: \'+g.1o);e.1t(4(){8 a=$(x);x.Y=(g.1m&&g.C)?g.C:a.C();x.12=(g.1m&&g.D)?g.D:a.D()});g.y=g.y||{};g.H=g.H||{};g.G=g.G||{};e.1n(\':26(\'+j+\')\').u(g.y);7(g.1e)$(e[j]).u(g.1e);7(g.V){g.V=T(g.V);7(g.19.25==2C)g.19=$.1o.3j[g.19]||T(g.19);7(!g.1N)g.19=g.19/2;3m((g.V-g.19)<3l)g.V+=g.19}7(g.2b)g.1O=g.1P=g.2b;7(!g.1u)g.1u=g.19;7(!g.1G)g.1G=g.19;g.2D=f.L;g.1f=j;7(g.1k){g.N=g.1f;7(++g.14==f.L)g.14=0;g.N=g.1q[g.14]}Q g.N=g.1a>=(f.L-1)?0:g.1a+1;8 l=e[j];7(g.I.L)g.I[0].1Q(l,[l,l,g,2l]);7(g.1j.L>1)g.1j[1].1Q(l,[l,l,g,2l]);7(g.1H&&!g.18)g.18=g.1H;7(g.18)$(g.18).2c(\'1H\',4(){O 22(f,g,g.1x?-1:1)});7(g.29)$(g.29).2c(\'1H\',4(){O 22(f,g,g.1x?1:-1)});7(g.1p)2H(f,g);g.3u=4(a){8 b=$(a),s=b[0];7(!g.2f)g.2d++;f.J(s);7(g.1c)g.1c.J(s);g.2D=f.L;b.u(\'1Z\',\'32\').2G(d);7(r&&g.21&&!g.2N)2m(b);7(g.1m&&g.D)b.D(g.D);7(g.1m&&g.C&&g.C!=\'20\')e.C(g.C);s.Y=(g.1m&&g.C)?g.C:b.C();s.12=(g.1m&&g.D)?g.D:b.D();b.u(g.y);7(g.1p)$.E.B.2g(f.L-1,s,$(g.1p),f,g);7(1V g.11==\'4\')g.11(b)};7(g.V||g.1z)x.S=1S(4(){1l(f,g,0,!g.1x)},g.1z?10:g.V+(g.2I||0))})};4 1l(a,b,c,d){7(b.2i)O;8 p=b.1w,1y=a[b.1f],18=a[b.N];7(p.S===0&&!c)O;7(!c&&!p.1g&&((b.2e&&(--b.2d<=0))||(b.1T&&!b.1k&&b.N=a.L){7(b.1T)O 23;b.N=0}}7(b.1W&&1V b.1W==\'4\')b.1W(c>0,b.N,a[b.N]);1l(a,b,1,c>=0);O 23};4 2H(a,b){8 c=$(b.1p);$.1t(a,4(i,o){$.E.B.2g(i,o,c,a,b)});$.E.B.2k(b.1p,b.1a)};$.E.B.2g=4(i,a,b,c,d){8 e=(1V d.2n==\'4\')?$(d.2n(i,a)):$(\'\'+(i+1)+\'\');7(e.3C(\'3B\').L==0)e.2G(b);e.2c(d.2Q,4(){d.N=i;8 p=d.1w,V=p.S;7(V){1v(V);p.S=0}7(1V d.2o==\'4\')d.2o(d.N,c[d.N]);1l(c,d,1,d.1f=0){8 a=v.1F(/\\d+/g);O\'#\'+1M(a[0])+1M(a[1])+1M(a[2])}7(v&&v!=\'3P\')O v}O\'#3O\'};b.1t(4(){$(x).u(\'2V-2U\',2R(x))})};$.E.B.2w=4(a,b,c,d,e){8 f=$(a),$n=$(b);$n.u(c.y);8 g=e?1:c.1u;8 h=e?1:c.1G;8 i=e?P:c.1O;8 j=e?P:c.1P;8 k=4(){$n.1Y(c.H,g,i,d)};f.1Y(c.G,h,j,4(){7(c.K)f.u(c.K);7(!c.1N)k()});7(c.1N)k()};$.E.B.M={2W:4(a,b,c){b.1n(\':26(\'+c.1a+\')\').u(\'1h\',0);c.I.J(4(){$(x).U()});c.H={1h:1};c.G={1h:0};c.y={1h:0};c.K={R:\'X\'}}};$.E.B.3Q=4(){O q};$.E.B.2E={1o:\'2W\',V:3U,1z:0,19:3S,1u:P,1G:P,18:P,29:P,1W:P,1p:P,2o:P,2Q:\'1H\',2n:P,I:P,1j:P,2j:P,2b:P,1O:P,1P:P,1K:P,H:P,G:P,y:P,K:P,1U:P,C:\'20\',1a:0,1N:1,1k:0,1m:0,2h:0,2P:0,2e:0,2f:0,2I:0,2r:P,21:0,1T:0,2K:0}})(2Y);(4($){$.E.B.M.3T=4(d,e,f){d.u(\'17\',\'1b\');f.I.J(4(a,b,c){$(x).U();c.y.A=b.1B;c.G.A=0-a.1B});f.1e={A:0};f.H={A:0};f.K={R:\'X\'}};$.E.B.M.3Z=4(d,e,f){d.u(\'17\',\'1b\');f.I.J(4(a,b,c){$(x).U();c.y.A=0-b.1B;c.G.A=a.1B});f.1e={A:0};f.H={A:0};f.K={R:\'X\'}};$.E.B.M.3X=4(d,e,f){d.u(\'17\',\'1b\');f.I.J(4(a,b,c){$(x).U();c.y.9=b.1C;c.G.9=0-a.1C});f.1e={9:0};f.H={9:0}};$.E.B.M.3Y=4(d,e,f){d.u(\'17\',\'1b\');f.I.J(4(a,b,c){$(x).U();c.y.9=0-b.1C;c.G.9=a.1C});f.1e={9:0};f.H={9:0}};$.E.B.M.41=4(f,g,h){f.u(\'17\',\'1b\').D();h.I.J(4(a,b,c,d){$(x).U();8 e=a.1C,2q=b.1C;c.y=d?{9:2q}:{9:-2q};c.H.9=0;c.G.9=d?-e:e;g.1n(a).u(c.y)});h.1e={9:0};h.K={R:\'X\'}};$.E.B.M.40=4(f,g,h){f.u(\'17\',\'1b\');h.I.J(4(a,b,c,d){$(x).U();8 e=a.1B,2s=b.1B;c.y=d?{A:-2s}:{A:2s};c.H.A=0;c.G.A=d?e:-e;g.1n(a).u(c.y)});h.1e={A:0};h.K={R:\'X\'}};$.E.B.M.43=4(d,e,f){f.I.J(4(a,b,c){$(a).u(\'F\',1)});f.11=4(a){a.W()};f.y={F:2};f.H={D:\'U\'};f.G={D:\'W\'}};$.E.B.M.44=4(d,e,f){f.I.J(4(a,b,c){$(a).u(\'F\',1)});f.11=4(a){a.W()};f.y={F:2};f.H={C:\'U\'};f.G={C:\'W\'}};$.E.B.M.1K=4(g,h,j){8 w=g.u(\'17\',\'30\').D();h.u({9:0,A:0});j.I.J(4(){$(x).U()});j.19=j.19/2;j.1k=0;j.1K=j.1K||{9:-w,A:15};j.1c=[];1J(8 i=0;i35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(9($){$.1v.C=9(o){z 4.1b(9(){3p r(4,o)})};8 q={Z:F,25:1,21:1,u:7,1c:3,15:7,1K:\'2X\',2c:\'2Q\',1q:0,B:7,1j:7,1G:7,2F:7,2B:7,2z:7,2x:7,2v:7,2s:7,2p:7,1S:\'

\',1Q:\'

\',2m:\'2l\',2k:\'2l\',1O:7,1L:7};$.C=9(e,o){4.5=$.16({},q,o||{});4.Q=F;4.D=7;4.H=7;4.t=7;4.U=7;4.R=7;4.N=!4.5.Z?\'1H\':\'26\';4.E=!4.5.Z?\'24\':\'23\';8 a=\'\',1e=e.K.1e(\' \');1r(8 i=0;i<1e.I;i++){6(1e[i].2y(\'C-2w\')!=-1){$(e).1E(1e[i]);8 a=1e[i];1p}}6(e.2t==\'3o\'||e.2t==\'3n\'){4.t=$(e);4.D=4.t.19();6(4.D.1o(\'C-H\')){6(!4.D.19().1o(\'C-D\'))4.D=4.D.B(\'

\');4.D=4.D.19()}10 6(!4.D.1o(\'C-D\'))4.D=4.t.B(\'

\').19()}10{4.D=$(e);4.t=$(e).3h(\'>2o,>2n,P>2o,P>2n\')}6(a!=\'\'&&4.D.19()[0].K.2y(\'C-2w\')==-1)4.D.B(\'

\');4.H=4.t.19();6(!4.H.I||!4.H.1o(\'C-H\'))4.H=4.t.B(\'

\').19();4.R=$(\'.C-11\',4.D);6(4.R.u()==0&&4.5.1Q!=7)4.R=4.H.1z(4.5.1Q).11();4.R.V(4.K(\'C-11\'));4.U=$(\'.C-17\',4.D);6(4.U.u()==0&&4.5.1S!=7)4.U=4.H.1z(4.5.1S).11();4.U.V(4.K(\'C-17\'));4.H.V(4.K(\'C-H\'));4.t.V(4.K(\'C-t\'));4.D.V(4.K(\'C-D\'));8 b=4.5.15!=7?1k.1P(4.1m()/4.5.15):7;8 c=4.t.32(\'1F\');8 d=4;6(c.u()>0){8 f=0,i=4.5.21;c.1b(9(){d.1I(4,i++);f+=d.S(4,b)});4.t.y(4.N,f+\'T\');6(!o||o.u===J)4.5.u=c.u()}4.D.y(\'1y\',\'1A\');4.U.y(\'1y\',\'1A\');4.R.y(\'1y\',\'1A\');4.2G=9(){d.17()};4.2b=9(){d.11()};4.1U=9(){d.2q()};6(4.5.1j!=7)4.5.1j(4,\'2a\');6($.2A.28){4.1f(F,F);$(27).1u(\'2I\',9(){d.1t()})}10 4.1t()};8 r=$.C;r.1v=r.2H={C:\'0.2.3\'};r.1v.16=r.16=$.16;r.1v.16({1t:9(){4.A=7;4.G=7;4.X=7;4.13=7;4.14=F;4.1d=7;4.O=7;4.W=F;6(4.Q)z;4.t.y(4.E,4.1s(4.5.21)+\'T\');8 p=4.1s(4.5.25);4.X=4.13=7;4.1i(p,F);$(27).22(\'2E\',4.1U).1u(\'2E\',4.1U)},2D:9(){4.t.2C();4.t.y(4.E,\'3u\');4.t.y(4.N,\'3t\');6(4.5.1j!=7)4.5.1j(4,\'2D\');4.1t()},2q:9(){6(4.O!=7&&4.W)4.t.y(4.E,r.M(4.t.y(4.E))+4.O);4.O=7;4.W=F;6(4.5.1G!=7)4.5.1G(4);6(4.5.15!=7){8 a=4;8 b=1k.1P(4.1m()/4.5.15),N=0,E=0;$(\'1F\',4.t).1b(9(i){N+=a.S(4,b);6(i+14.5.u)a=4.5.u;1r(8 j=i;j<=a;j++){8 e=4.L(j);6(!e.I||e.1o(\'C-1a-1D\'))z F}z 1h},L:9(i){z $(\'.C-1a-\'+i,4.t)},2u:9(i,s){8 e=4.L(i),20=0,2u=0;6(e.I==0){8 c,e=4.1B(i),j=r.M(i);1n(c=4.L(--j)){6(j<=0||c.I){j<=0?4.t.2r(e):c.1X(e);1p}}}10 20=4.S(e);e.1E(4.K(\'C-1a-1D\'));1R s==\'3l\'?e.3k(s):e.2C().3j(s);8 a=4.5.15!=7?1k.1P(4.1m()/4.5.15):7;8 b=4.S(e,a)-20;6(i>0&&i<4.A)4.t.y(4.E,r.M(4.t.y(4.E))-b+\'T\');4.t.y(4.N,r.M(4.t.y(4.N))+b+\'T\');z e},1V:9(i){8 e=4.L(i);6(!e.I||(i>=4.A&&i<=4.G))z;8 d=4.S(e);6(i<4.A)4.t.y(4.E,r.M(4.t.y(4.E))+d+\'T\');e.1V();4.t.y(4.N,r.M(4.t.y(4.N))-d+\'T\')},17:9(){4.1C();6(4.O!=7&&!4.W)4.1T(F);10 4.1c(((4.5.B==\'1Z\'||4.5.B==\'G\')&&4.5.u!=7&&4.G==4.5.u)?1:4.A+4.5.1c)},11:9(){4.1C();6(4.O!=7&&4.W)4.1T(1h);10 4.1c(((4.5.B==\'1Z\'||4.5.B==\'A\')&&4.5.u!=7&&4.A==1)?4.5.u:4.A-4.5.1c)},1T:9(b){6(4.Q||4.14||!4.O)z;8 a=r.M(4.t.y(4.E));!b?a-=4.O:a+=4.O;4.W=!b;4.X=4.A;4.13=4.G;4.1i(a)},1c:9(i,a){6(4.Q||4.14)z;4.1i(4.1s(i),a)},1s:9(i){6(4.Q||4.14)z;6(4.5.B!=\'18\')i=i<1?1:(4.5.u&&i>4.5.u?4.5.u:i);8 a=4.A>i;8 b=r.M(4.t.y(4.E));8 f=4.5.B!=\'18\'&&4.A<=1?1:4.A;8 c=a?4.L(f):4.L(4.G);8 j=a?f:f-1;8 e=7,l=0,p=F,d=0;1n(a?--j>=i:++j=1&&(4.5.u==7||j<=4.5.u))))b=a?b+d:b-d}8 g=4.1m();8 h=[];8 k=0,j=i,v=0;8 c=4.L(i-1);1n(++k){e=4.L(j);p=!e.I;6(e.I==0){e=4.1B(j).V(4.K(\'C-1a-1D\'));c.I==0?4.t.2r(e):c[a?\'1z\':\'1X\'](e)}c=e;8 d=4.S(e);6(d==0){3f(\'3e: 3d 1H/26 3c 1r 3b. 3a 39 38 37 36 35. 34...\');z 0}6(4.5.B!=\'18\'&&4.5.u!==7&&j>4.5.u)h.33(e);10 6(p)l+=d;v+=d;6(v>=g)1p;j++}1r(8 x=0;x0){4.t.y(4.N,4.S(4.t)+l+\'T\');6(a){b-=l;4.t.y(4.E,r.M(4.t.y(4.E))-l+\'T\')}}8 n=i+k-1;6(4.5.B!=\'18\'&&4.5.u&&n>4.5.u)n=4.5.u;6(j>n){k=0,j=n,v=0;1n(++k){8 e=4.L(j--);6(!e.I)1p;v+=4.S(e);6(v>=g)1p}}8 o=n-k+1;6(4.5.B!=\'18\'&&o<1)o=1;6(4.W&&a){b+=4.O;4.W=F}4.O=7;6(4.5.B!=\'18\'&&n==4.5.u&&(n-k+1)>=1){8 m=r.Y(4.L(n),!4.5.Z?\'1l\':\'1N\');6((v-m)>g)4.O=v-g-m}1n(i-->o)b+=4.S(4.L(i));4.X=4.A;4.13=4.G;4.A=o;4.G=n;z b},1i:9(p,a){6(4.Q||4.14)z;4.14=1h;8 b=4;8 c=9(){b.14=F;6(p==0)b.t.y(b.E,0);6(b.5.B==\'1Z\'||b.5.B==\'G\'||b.5.u==7||b.G=4.5.u)n=4.O!=7&&!4.W}6(p==J||p==7){8 p=!4.Q&&4.5.u!==0&&((4.5.B&&4.5.B!=\'G\')||4.A>1);6(!4.Q&&(!4.5.B||4.5.B==\'G\')&&4.5.u!=7&&4.A==1)p=4.O!=7&&4.W}8 a=4;4.U[n?\'1u\':\'22\'](4.5.2m,4.2G)[n?\'1E\':\'V\'](4.K(\'C-17-1w\')).1J(\'1w\',n?F:1h);4.R[p?\'1u\':\'22\'](4.5.2k,4.2b)[p?\'1E\':\'V\'](4.K(\'C-11-1w\')).1J(\'1w\',p?F:1h);6(4.U.I>0&&(4.U[0].1g==J||4.U[0].1g!=n)&&4.5.1O!=7){4.U.1b(9(){a.5.1O(a,4,n)});4.U[0].1g=n}6(4.R.I>0&&(4.R[0].1g==J||4.R[0].1g!=p)&&4.5.1L!=7){4.R.1b(9(){a.5.1L(a,4,p)});4.R[0].1g=p}},1M:9(a){8 b=4.X==7?\'2a\':(4.X<4.A?\'17\':\'11\');4.12(\'2F\',a,b);6(4.X!==4.A){4.12(\'2B\',a,b,4.A);4.12(\'2z\',a,b,4.X)}6(4.13!==4.G){4.12(\'2x\',a,b,4.G);4.12(\'2v\',a,b,4.13)}4.12(\'2s\',a,b,4.A,4.G,4.X,4.13);4.12(\'2p\',a,b,4.X,4.13,4.A,4.G)},12:9(a,b,c,d,e,f,g){6(4.5[a]==J||(1R 4.5[a]!=\'2h\'&&b!=\'2i\'))z;8 h=1R 4.5[a]==\'2h\'?4.5[a][b]:4.5[a];6(!$.2W(h))z;8 j=4;6(d===J)h(j,c,b);10 6(e===J)4.L(d).1b(9(){h(j,4,d,c,b)});10{1r(8 i=d;i<=e;i++)6(i!==7&&!(i>=f&&i<=g))4.L(i).1b(9(){h(j,4,i,c,b)})}},1B:9(i){z 4.1I(\'<1F>\',i)},1I:9(e,i){8 a=$(e).V(4.K(\'C-1a\')).V(4.K(\'C-1a-\'+i));a.1J(\'2V\',i);z a},K:9(c){z c+\' \'+c+(!4.5.Z?\'-2U\':\'-Z\')},S:9(e,d){8 a=e.2g!=J?e[0]:e;8 b=!4.5.Z?a.1x+r.Y(a,\'2f\')+r.Y(a,\'1l\'):a.2e+r.Y(a,\'2d\')+r.Y(a,\'1N\');6(d==J||b==d)z b;8 w=!4.5.Z?d-r.Y(a,\'2f\')-r.Y(a,\'1l\'):d-r.Y(a,\'2d\')-r.Y(a,\'1N\');$(a).y(4.N,w+\'T\');z 4.S(a)},1m:9(){z!4.5.Z?4.H[0].1x-r.M(4.H.y(\'2T\'))-r.M(4.H.y(\'2S\')):4.H[0].2e-r.M(4.H.y(\'2R\'))-r.M(4.H.y(\'3i\'))},2P:9(i,s){6(s==J)s=4.5.u;z 1k.2O((((i-1)/s)-1k.2N((i-1)/s))*s)+1}});r.16({3m:9(d){z $.16(q,d||{})},Y:9(e,p){6(!e)z 0;8 a=e.2g!=J?e[0]:e;6(p==\'1l\'&&$.2A.28){8 b={\'1y\':\'1A\',\'2M\':\'2L\',\'1H\':\'1q\'},1Y,1W;$.29(a,b,9(){1Y=a.1x});b[\'1l\']=0;$.29(a,b,9(){1W=a.1x});z 1W-1Y}z r.M($.y(a,p))},M:9(v){v=2K(v);z 2J(v)?0:v}})})(3v);',62,218,'||||this|options|if|null|var|function||||||||||||||||||||list|size||||css|return|first|wrap|jcarousel|container|lt|false|last|clip|length|undefined|className|get|intval|wh|tail|div|locked|buttonPrev|dimension|px|buttonNext|addClass|inTail|prevFirst|margin|vertical|else|prev|callback|prevLast|animating|visible|extend|next|circular|parent|item|each|scroll|timer|split|buttons|jcarouselstate|true|animate|initCallback|Math|marginRight|clipping|while|hasClass|break|auto|for|pos|setup|bind|fn|disabled|offsetWidth|display|before|block|create|stopAuto|placeholder|removeClass|li|reloadCallback|width|format|attr|animation|buttonPrevCallback|notify|marginBottom|buttonNextCallback|ceil|buttonPrevHTML|typeof|buttonNextHTML|scrollTail|funcResize|remove|oWidth2|after|oWidth|both|old|offset|unbind|top|left|start|height|window|safari|swap|init|funcPrev|easing|marginTop|offsetHeight|marginLeft|jquery|object|onAfterAnimation|startAuto|buttonPrevEvent|click|buttonNextEvent|ol|ul|itemVisibleOutCallback|reload|prepend|itemVisibleInCallback|nodeName|add|itemLastOutCallback|skin|itemLastInCallback|indexOf|itemFirstOutCallback|browser|itemFirstInCallback|empty|reset|resize|itemLoadCallback|funcNext|prototype|load|isNaN|parseInt|none|float|floor|round|index|swing|borderTopWidth|borderRightWidth|borderLeftWidth|horizontal|jcarouselindex|isFunction|normal|clearTimeout|1000|setTimeout|onBeforeAnimation|children|push|Aborting|loop|infinite|an|cause|will|This|items|set|No|jCarousel|alert|class|find|borderBottomWidth|append|html|string|defaults|OL|UL|new|has|unlock|lock|10px|0px|jQuery'.split('|'),0,{})) //DEBUG jQuery(function($) { initLearnMore(); initPromoCycle(); initSquareNav(); initCarousel(); }); function initPromoCycle() { $('#promo_container').cycle( { sync: 1, speed: 1000, timeout: 6000, pause: 1, after: updateSquareNav }); } function initLearnMore() { var insertPromoNav; insertPromoNav = '
'; insertPromoNav += '
    '; insertPromoNav += '
  • '; insertPromoNav += '
  • '; insertPromoNav += '
'; insertPromoNav += 'Learn More'; insertPromoNav += '
'; $('#promo_container').after(insertPromoNav); } function updateSquareNav() { var curr_url = $(this).attr('id'); //this is handed to us by jquery.cycle var nav_arr = $('#square_nav li a'); var img_arr = $('#promo_container img'); var curr_img = $('#' + curr_url + ' img'); nav_arr.removeClass('active'); $.each(img_arr, function(i, obj) { if ($(obj).attr('src') == curr_img.attr('src')) $(nav_arr[i]).addClass('active'); }); var activePromo = $('#square_nav li a.active').attr('id'); switch (activePromo) { //use url from active promotion in promo_container to populate the learn more button case "promo_2": $('#promo_nav_container #btn_learn_more').attr('href', $('#promo_container #promo2').attr('href')); break; case "promo_1": default: $('#promo_nav_container #btn_learn_more').attr('href', $('#promo_container #promo1').attr('href')); break; } } function initSquareNav() { var promo_img_arr = $('#promo_container img'); var sq_nav_arr = $('#square_nav li a'); sq_nav_arr.click(function(e){ var theLink = $(this); sq_nav_arr.removeClass('active'); $.each(sq_nav_arr, function(i, obj){ if($(obj).attr('id') == theLink.attr('id')) { $(this).addClass('active'); $('#promo_container').cycle(i); return false; e.preventDefault(); } }); return false; }); } function initCarousel() { var ul = document.getElementById('feature_carousel'); if (ul != undefined) { ul.style.visibility = 'visible'; } var item_width = 298; var feature_carousel = $('#feature_carousel'); feature_carousel.jcarousel({ scroll: 3 }); //need to set a fixed width based on the number of items for Chrome and Safari var num_items = feature_carousel.find('li'); var w = (num_items.length * (item_width + 2)); feature_carousel.width(w); //Turn off arrows when at beginning or end $('.jcarousel-prev-horizontal').hide(); //default $('.jcarousel-next-horizontal').click(function() { $('.jcarousel-prev-horizontal').show(); $('.jcarousel-next-horizontal').hide(); }); $('.jcarousel-prev-horizontal').click(function() { $('.jcarousel-next-horizontal').show(); $('.jcarousel-prev-horizontal').hide(); }); } if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded();