(function(D){var C={moreLinkClass:"moreLink",hilightClass:"hilite",enableModalWindow:true,windowTitle:""},B="moreBox";function A(){var H=D(this);if(H.text()==="more �"){H.html("less &raquo;")}else{H.html("more &raquo;")}}function G(J,K,L,N){var O,P,I,M="<a href='#' class='"+K.moreLinkClass+" trigger"+L+"'>more &raquo;</a>",H=J.find(".fullText"),R,Q,S;if(H.html()){H.css({display:"block"});R=H.html();Q=H.height();S=J.find(".exerpt");S.hide();P=R.substring(0,N);H.html(P);I=H.height();H.html(R).height(I).find(".hilite").removeAttr("class");J.parent().append(M);J.css({overflow:"hidden"});D(".trigger"+L+"").bind("click.moreBoxSlider",function(){O=D(this);if(O.hasClass("opened")){J.animate({height:I},500,function(){O.html("more &raquo;").removeClass("opened")})}else{J.animate({height:Q},500,function(){O.html("less &raquo;").addClass("opened")})}A.call(O);return false})}}function E(I,J,K){var O,L,M,H,N,P=J.windowTitle?J.windowTitle:I.parent().prev().html();if(I.find(".fullText").html()){N=I.find(".fullText").html();O="<a href='#' class='"+J.moreLinkClass+" trigger"+K+"'>more &raquo; </a>";I.parent().append(O);L="<div class='newBox"+K+" moreBoxBody moreBoxJqm'></div>";I.parent().append(L);M="<div id='moreBoxDisplay'>"+N+"</div>";D("div.newBox"+K).html(M+"<a href='#' class='jqmMoreBoxClose'><img src='/images/core/icons/icon-close.gif'/></a>");H=document.createElement("h1");D(H).html(P);D(H).prependTo("div.newBox"+K);D("div.newBox"+K).jqm({closeClass:"jqmMoreBoxClose",trigger:".trigger"+K,overlay:40,toTop:"true",onShow:function(Q){Q.w.css("top",DUMAS.scrollTop()+40+"px").css("left",(DUMAS.clientWidth()/2)-(Q.w.width()/2)+"px").fadeIn("normal")}})}}function F(I){var H=jQuery.extend({},C,I);D.data(this,B,H);this.each(function(){var N=D(this),P=Math.floor(Math.random()*1000000),O=N.find(".exerpt").text().length,Q=O*2,K=O*3,M=H.enableModalWindow,L=N.find("._unchanged").length>0,J=N.find(".fullText").text().length;if(!L||J>Q||!M){if(J<K||!M){G(N,H,P,O)}else{E(N,H,P)}}});return this}D.fn.extend({moreBox:F})}(jQuery));(function(){function A(){var E=$(this);var D=E.parent();var B=D.find("p");var C=D.parent().parent();if(D.hasClass("opened")){B.removeAttr("style");C.removeAttr("style");D.removeClass("opened");E.html("more &raquo;")}else{B.css("height",B.get(0).scrollHeight+"px");C.css("height",C.get(0).scrollHeight+"px");D.addClass("opened");E.html("less &raquo;")}}$(document).ready(function(){$(".moreable").moreBox({enableModalWindow:false});$(".blurbContainer .moreLink").click(A);SaveForLater.init()})}());
