window.Modernizr=function(e,b,l){function k(a,b){return(""+a).indexOf(b)!==-1}function o(a,b){for(var c in a)if(f[a[c]]!==l&&(!b||b(a[c],p)))return true}function h(b,c){var a=b.charAt(0).toUpperCase()+b.substr(1);a=(b+" "+q.join(a+" ")+a).split(" ");return!!o(a,c)}function A(){c.input=function(b){for(var a=0,c=b.length;a<c;a++)t[b[a]]=!!(b[a]in d);return t}("autocomplete autofocus list placeholder max min multiple pattern required step".split(" "));c.inputtypes=function(e){for(var c=0,a,f=e.length;c<f;c++){d.setAttribute("type",e[c]);if(a=d.type!=="text"){d.value=u;if(/^range$/.test(d.type)&&d.style.WebkitAppearance!==l){g.appendChild(d);a=b.defaultView;a=a.getComputedStyle&&a.getComputedStyle(d,null).WebkitAppearance!=="textfield"&&d.offsetHeight!==0;g.removeChild(d)}else/^(search|tel)$/.test(d.type)||(a=/^(url|email)$/.test(d.type)?d.checkValidity&&d.checkValidity()===false:d.value!=u)}v[e[c]]=!!a}return v}("search tel url email datetime date month week time datetime-local number range color".split(" "))}var c={},g=b.documentElement,p=b.createElement("modernizr"),f=p.style,d=b.createElement("input"),u=":)",w=Object.prototype.toString,j=" -webkit- -moz- -o- -ms- -khtml- ".split(" "),q="Webkit Moz O ms Khtml".split(" "),m={svg:"http://www.w3.org/2000/svg"},a={},v={},t={},x=[],n,y=function(d){var c=document.createElement("style"),a=b.createElement("div");c.textContent=d+"{#modernizr{height:3px}}";(b.head||b.getElementsByTagName("head")[0]).appendChild(c);a.id="modernizr";g.appendChild(a);d=a.offsetHeight===3;c.parentNode.removeChild(c);a.parentNode.removeChild(a);return!!d},i=function(){var a={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return function(c,b){b=b||document.createElement(a[c]||"div");c="on"+c;var d=c in b;if(!d){b.setAttribute||(b=document.createElement("div"));if(b.setAttribute&&b.removeAttribute){b.setAttribute(c,"");d=typeof b[c]=="function";if(typeof b[c]!="undefined")b[c]=l;b.removeAttribute(c)}}return d}}(),r={}.hasOwnProperty,z;z=typeof r!=="undefined"&&typeof r.call!=="undefined"?function(a,b){return r.call(a,b)}:function(a,b){return b in a&&typeof a.constructor.prototype[b]==="undefined"};a.flexbox=function(){var a=b.createElement("div"),c=b.createElement("div");(function(b,a,c,d){a+=":";b.style.cssText=(a+j.join(c+";"+a)).slice(0,-a.length)+(d||"")})(a,"display","box","width:42px;padding:0;");c.style.cssText=j.join("box-flex:1;")+"width:10px;";a.appendChild(c);g.appendChild(a);var d=c.offsetWidth===42;a.removeChild(c);g.removeChild(a);return d};a.canvas=function(){var a=b.createElement("canvas");return!!(a.getContext&&a.getContext("2d"))};a.canvastext=function(){return!!(c.canvas&&typeof b.createElement("canvas").getContext("2d").fillText=="function")};a.webgl=function(){var a=b.createElement("canvas");try{if(a.getContext("webgl"))return true}catch(c){}try{if(a.getContext("experimental-webgl"))return true}catch(d){}return false};a.touch=function(){return"ontouchstart"in e||y("@media ("+j.join("touch-enabled),(")+"modernizr)")};a.geolocation=function(){return!!navigator.geolocation};a.postmessage=function(){return!!e.postMessage};a.websqldatabase=function(){return!!e.openDatabase};a.indexedDB=function(){for(var a=-1,c=q.length;++a<c;){var b=q[a].toLowerCase();if(e[b+"_indexedDB"]||e[b+"IndexedDB"])return true}return false};a.hashchange=function(){return i("hashchange",e)&&(document.documentMode===l||document.documentMode>7)};a.history=function(){return!!(e.history&&history.pushState)};a.draganddrop=function(){return i("drag")&&i("dragstart")&&i("dragenter")&&i("dragover")&&i("dragleave")&&i("dragend")&&i("drop")};a.websockets=function(){return"WebSocket"in e};a.rgba=function(){f.cssText="background-color:rgba(150,255,150,.5)";return k(f.backgroundColor,"rgba")};a.hsla=function(){f.cssText="background-color:hsla(120,40%,100%,.5)";return k(f.backgroundColor,"rgba")||k(f.backgroundColor,"hsla")};a.multiplebgs=function(){f.cssText="background:url(//:),url(//:),red url(//:)";return/(url\s*\(.*?){3}/.test(f.background)};a.backgroundsize=function(){return h("backgroundSize")};a.borderimage=function(){return h("borderImage")};a.borderradius=function(){return h("borderRadius","",function(a){return k(a,"orderRadius")})};a.boxshadow=function(){return h("boxShadow")};a.textshadow=function(){return b.createElement("div").style.textShadow===""};a.opacity=function(){var a=j.join("opacity:.5;")+"";f.cssText=a;return k(f.opacity,"0.5")};a.cssanimations=function(){return h("animationName")};a.csscolumns=function(){return h("columnCount")};a.cssgradients=function(){var a=("background-image:"+j.join("gradient(linear,left top,right bottom,from(#9f9),to(white));background-image:")+j.join("linear-gradient(left top,#9f9, white);background-image:")).slice(0,-17);f.cssText=a;return k(f.backgroundImage,"gradient")};a.cssreflections=function(){return h("boxReflect")};a.csstransforms=function(){return!!o(["transformProperty","WebkitTransform","MozTransform","OTransform","msTransform"])};a.csstransforms3d=function(){var a=!!o(["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"]);if(a)a=y("@media ("+j.join("transform-3d),(")+"modernizr)");return a};a.csstransitions=function(){return h("transitionProperty")};a.fontface=function(){var a,d=b.head||b.getElementsByTagName("head")[0]||g,e=b.createElement("style"),f=b.implementation||{hasFeature:function(){return false}};e.type="text/css";d.insertBefore(e,d.firstChild);a=e.sheet||e.styleSheet;d=f.hasFeature("CSS2","")?function(b){if(!(a&&b))return false;var c=false;try{a.insertRule(b,0);c=!/unknown/i.test(a.cssRules[0].cssText);a.deleteRule(a.cssRules.length-1)}catch(d){}return c}:function(b){if(!(a&&b))return false;a.cssText=b;return a.cssText.length!==0&&!/unknown/i.test(a.cssText)&&a.cssText.replace(/\r+|\n+/g,"").indexOf(b.split(" ")[0])===0};c._fontfaceready=function(a){a(c.fontface)};return d('@font-face { font-family: "font"; src: "font.ttf"; }')};a.video=function(){var c=b.createElement("video"),a=!!c.canPlayType;if(a){a=new Boolean(a);a.ogg=c.canPlayType('video/ogg; codecs="theora"');a.h264=c.canPlayType('video/mp4; codecs="avc1.42E01E"')||c.canPlayType('video/mp4; codecs="avc1.42E01E, mp4a.40.2"');a.webm=c.canPlayType('video/webm; codecs="vp8, vorbis"')}return a};a.audio=function(){var c=b.createElement("audio"),a=!!c.canPlayType;if(a){a=new Boolean(a);a.ogg=c.canPlayType('audio/ogg; codecs="vorbis"');a.mp3=c.canPlayType("audio/mpeg;");a.wav=c.canPlayType('audio/wav; codecs="1"');a.m4a=c.canPlayType("audio/x-m4a;")||c.canPlayType("audio/aac;")}return a};a.localstorage=function(){try{return"localStorage"in e&&e.localStorage!==null}catch(a){return false}};a.sessionstorage=function(){try{return"sessionStorage"in e&&e.sessionStorage!==null}catch(a){return false}};a.webWorkers=function(){return!!e.Worker};a.applicationcache=function(){return!!e.applicationCache};a.svg=function(){return!!b.createElementNS&&!!b.createElementNS(m.svg,"svg").createSVGRect};a.inlinesvg=function(){var a=document.createElement("div");a.innerHTML="<svg/>";return(a.firstChild&&a.firstChild.namespaceURI)==m.svg};a.smil=function(){return!!b.createElementNS&&/SVG/.test(w.call(b.createElementNS(m.svg,"animate")))};a.svgclippaths=function(){return!!b.createElementNS&&/SVG/.test(w.call(b.createElementNS(m.svg,"clipPath")))};for(var s in a)if(z(a,s)){n=s.toLowerCase();c[n]=a[s]();x.push((c[n]?"":"no-")+n)}c.input||A();c.crosswindowmessaging=c.postmessage;c.historymanagement=c.history;c.addTest=function(a,b){a=a.toLowerCase();if(!c[a]){b=!!b();g.className+=" "+(b?"":"no-")+a;c[a]=b;return c}};f.cssText="";p=d=null;e.attachEvent&&function(){var a=b.createElement("div");a.innerHTML="<elem></elem>";return a.childNodes.length!==1}()&&function(h,a){function i(b){for(var a=-1;++a<k;)b.createElement(e[a])}function j(d,c){for(var f=d.length,e=-1,a,b=[];++e<f;){a=d[e];c=a.media||c;b.push(j(a.imports,c));b.push(a.cssText)}return b.join("")}var e="abbr|article|aside|audio|canvas|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video".split("|"),k=e.length,m=RegExp("<(/*)(abbr|article|aside|audio|canvas|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video)","gi"),l=RegExp("\\b(abbr|article|aside|audio|canvas|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video)\\b(?!.*[;}])","gi"),f=a.createDocumentFragment(),b=a.documentElement,g=b.firstChild,c=a.createElement("style"),d=a.createElement("body");c.media="all";i(a);i(f);h.attachEvent("onbeforeprint",function(){for(var i=-1;++i<k;)for(var h=a.getElementsByTagName(e[i]),o=h.length,n=-1;++n<o;)if(h[n].className.indexOf("iepp_")<0)h[n].className+=" iepp_"+e[i];g.insertBefore(c,g.firstChild);c.styleSheet.cssText=j(a.styleSheets,"all").replace(l,".iepp_$1");f.appendChild(a.body);b.appendChild(d);d.innerHTML=f.firstChild.innerHTML.replace(m,"<$1bdo")});h.attachEvent("onafterprint",function(){d.innerHTML="";b.removeChild(d);g.removeChild(c);b.appendChild(f.firstChild)})}(this,document);c._enableHTML5=true;c._version="1.6";g.className=g.className.replace(/\bno-js\b/,"")+" js";g.className+=" "+x.join(" ");return c}(this,this.document);String.prototype.parseBool=function(){return this.toLowerCase()==="true"};Array.prototype.shuffle=function(){for(var a=this,e=a.length,b=e-1;b>0;b--){var c=Math.floor(Math.random()*(b+1)),d=a[b];a[b]=a[c];a[c]=d}};window.$MC={log:function(a){$.browser.webkit&&console.log(a)},elementSupportsAttribute:function(b,a){return a in document.createElement(b)?true:false},escapeHTML:function(c){var a=document.createElement("div"),b=document.createTextNode(c);a.appendChild(b);return a.innerHTML},fixControlGrids:function(){if($.browser.msie&&parseInt($.browser.version)<8)for(var e=$(".control-grid > li"),c=[],a=-1,d=0,g=e.length;d<g;d++){var b=$(e[d]),f=b.height();c.push(b);if(f>a)a=f;if(b.hasClass("last-col")){$(c).each(function(){this.height(a)});c=[];a=-1}}},fixAvatars:function(){$.browser.mozilla&&$("img.avatar").each(function(){var a=$(this),d=a.attr("src"),b=a.attr("height"),c=a.attr("width");if(b==null){b=a.height();c=a.width()}$(this).wrap("<div class='avatar-wrapper' />").attr("src","/images/blank.gif").parent().css("background-image","url("+d+")").css("background-repeat","no-repeat").css("height",b+"px").css("width",c+"px").addClass($(this).hasClass("small")?"small":$(this).hasClass("large")?"large":"").addClass($(this).hasClass("inline")?"inline":"")})},shrinkEmptyDivs:function(a){$.browser.msie&&parseInt($.browser.version)==7&&$(a).each(function(c,b){var a=$(b);$.trim(a.html())==""&&a.css("height","0")})},fixIEStyles:function(){$.browser.msie&&parseInt($.browser.version)==7&&$("a.next, button.next").each(function(){var a=$(this).html();$(this).html(a+" »")})},isMobile:function(){return navigator.userAgent.match(/Android/i)||navigator.userAgent.match(/webOS/i)||navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPod/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Windows Phone OS 7/i)||navigator.userAgent.match(/BlackBerry/i)||navigator.userAgent.match(/SymbianOS/i)}};$(document).ready(function(){$MC.shrinkEmptyDivs("#heading-description, #contentfooter");$MC.fixAvatars();$MC.fixIEStyles()});jQuery.fn.outerHtml=function(){return $("<div>").append(this.clone()).remove().html()};jQuery.expr[":"].focus=function(a){return a===document.activeElement&&(a.type||a.href)};function OpenHelp(c,a){var b='<div id="openHelpPopup" class="jqmWindow" style="display:none">Loading... <a href="#" class="jqmClose">Close</a></div>';$(a).after(b);$("#openHelpPopup").jqm({}).jqmShow();$.get(c,function(a){$("#openHelpPopup").html('<div class="header"><a href="#" class="jqmClose">Close</a>Help</div> <div class="content">'+a+"</div>");$("#openHelpPopup").jqmAddClose($(".jqmClose"))})}function selectRecentIssue(b,c,a){$("#RecentIssuesIssue").html("Issue "+b+": "+c);$("#RecentIssuesLink").attr("href","User/"+a);$("#RecentIssuesLink").html(a)}$(document).ready(function(){var a=function(a,b){try{var d=a.href.indexOf("https://")==0?a.href.substring(8):a.href.substring(7),c="/outbound/"+(b.length>0?b+"/":"")+d;_gaq.push(["_trackPageview",c]);_gaq.push(["_trackEvent","outbound link","click:"+c,window.location.href]);setTimeout('document.location = "'+a.href+'"',100);return false}catch(e){}};jQuery("a.outbound-link").click(function(){var c=jQuery(this),b;if(c.hasClass("partner"))b="partner";else b="";a(this,b);return false})});(function(c){var b=0,a=0;c.preloadImages=function(d){b+=d.length;if($.browser.msie)for(var f in d){var e=$("<img />").appendTo("body").hide();e.load(function(){a++;c.log("Loaded image "+a+" of "+b)});e.attr("src",d[f])}else for(var f in d)$("<img />").attr("src",d[f]).load(function(){a++;c.log("Loaded image "+a+" of "+b)}).appendTo("body").hide()};c.imagesArePreloaded=function(){return b==0?false:b==a?true:false}})($MC);jQuery.easing.jswing=jQuery.easing.swing;jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(e,d,a,b,c){return jQuery.easing[jQuery.easing.def](e,d,a,b,c)},easeInQuad:function(e,a,b,c,d){return c*(a/=d)*a+b},easeOutQuad:function(e,a,b,c,d){return-c*(a/=d)*(a-2)+b},easeInOutQuad:function(e,a,b,c,d){return(a/=d/2)<1?c/2*a*a+b:-c/2*(--a*(a-2)-1)+b},easeInCubic:function(e,a,b,c,d){return c*(a/=d)*a*a+b},easeOutCubic:function(e,a,b,c,d){return c*((a=a/d-1)*a*a+1)+b},easeInOutCubic:function(e,a,b,c,d){return(a/=d/2)<1?c/2*a*a*a+b:c/2*((a-=2)*a*a+2)+b},easeInQuart:function(e,a,b,c,d){return c*(a/=d)*a*a*a+b},easeOutQuart:function(e,a,b,c,d){return-c*((a=a/d-1)*a*a*a-1)+b},easeInOutQuart:function(e,a,b,c,d){return(a/=d/2)<1?c/2*a*a*a*a+b:-c/2*((a-=2)*a*a*a-2)+b},easeInQuint:function(e,a,b,c,d){return c*(a/=d)*a*a*a*a+b},easeOutQuint:function(e,a,b,c,d){return c*((a=a/d-1)*a*a*a*a+1)+b},easeInOutQuint:function(e,a,b,c,d){return(a/=d/2)<1?c/2*a*a*a*a*a+b:c/2*((a-=2)*a*a*a*a+2)+b},easeInSine:function(e,d,b,a,c){return-a*Math.cos(d/c*(Math.PI/2))+a+b},easeOutSine:function(e,d,a,b,c){return b*Math.sin(d/c*(Math.PI/2))+a},easeInOutSine:function(e,d,a,b,c){return-b/2*(Math.cos(Math.PI*d/c)-1)+a},easeInExpo:function(e,b,a,c,d){return b==0?a:c*Math.pow(2,10*(b/d-1))+a},easeOutExpo:function(e,d,a,b,c){return d==c?a+b:b*(-Math.pow(2,-10*d/c)+1)+a},easeInOutExpo:function(e,a,b,c,d){return a==0?b:a==d?b+c:(a/=d/2)<1?c/2*Math.pow(2,10*(a-1))+b:c/2*(-Math.pow(2,-10*--a)+2)+b},easeInCirc:function(e,a,b,c,d){return-c*(Math.sqrt(1-(a/=d)*a)-1)+b},easeOutCirc:function(e,a,b,c,d){return c*Math.sqrt(1-(a=a/d-1)*a)+b},easeInOutCirc:function(e,a,b,c,d){return(a/=d/2)<1?-c/2*(Math.sqrt(1-a*a)-1)+b:c/2*(Math.sqrt(1-(a-=2)*a)+1)+b},easeInElastic:function(h,d,e,a,f){var g=1.70158,b=0,c=a;if(d==0)return e;if((d/=f)==1)return e+a;if(!b)b=f*.3;if(c<Math.abs(a)){c=a;var g=b/4}else var g=b/(2*Math.PI)*Math.asin(a/c);return-(c*Math.pow(2,10*(d-=1))*Math.sin((d*f-g)*2*Math.PI/b))+e},easeOutElastic:function(h,d,e,a,f){var g=1.70158,b=0,c=a;if(d==0)return e;if((d/=f)==1)return e+a;if(!b)b=f*.3;if(c<Math.abs(a)){c=a;var g=b/4}else var g=b/(2*Math.PI)*Math.asin(a/c);return c*Math.pow(2,-10*d)*Math.sin((d*f-g)*2*Math.PI/b)+a+e},easeInOutElastic:function(h,a,e,b,f){var g=1.70158,c=0,d=b;if(a==0)return e;if((a/=f/2)==2)return e+b;if(!c)c=f*.3*1.5;if(d<Math.abs(b)){d=b;var g=c/4}else var g=c/(2*Math.PI)*Math.asin(b/d);return a<1?-.5*d*Math.pow(2,10*(a-=1))*Math.sin((a*f-g)*2*Math.PI/c)+e:d*Math.pow(2,-10*(a-=1))*Math.sin((a*f-g)*2*Math.PI/c)*.5+b+e},easeInBack:function(f,b,c,d,e,a){if(a==undefined)a=1.70158;return d*(b/=e)*b*((a+1)*b-a)+c},easeOutBack:function(f,b,c,d,e,a){if(a==undefined)a=1.70158;return d*((b=b/e-1)*b*((a+1)*b+a)+1)+c},easeInOutBack:function(f,a,c,d,e,b){if(b==undefined)b=1.70158;return(a/=e/2)<1?d/2*a*a*(((b*=1.525)+1)*a-b)+c:d/2*((a-=2)*a*(((b*=1.525)+1)*a+b)+2)+c},easeInBounce:function(e,d,c,a,b){return a-jQuery.easing.easeOutBounce(e,b-d,0,a,b)+c},easeOutBounce:function(e,a,b,c,d){return(a/=d)<1/2.75?c*7.5625*a*a+b:a<2/2.75?c*(7.5625*(a-=1.5/2.75)*a+.75)+b:a<2.5/2.75?c*(7.5625*(a-=2.25/2.75)*a+.9375)+b:c*(7.5625*(a-=2.625/2.75)*a+.984375)+b},easeInOutBounce:function(e,c,d,b,a){return c<a/2?jQuery.easing.easeInBounce(e,c*2,0,b,a)*.5+d:jQuery.easing.easeOutBounce(e,c*2-a,0,b,a)*.5+b*.5+d}});if(!window.$MC)$MC={};if(window.$MC.SlideShow)throw"$MC.SlideShow is already defined.";else $MC.SlideShow=function(b,a){this.slideWidth=b==undefined?648:b;this.currentPosition=a==undefined?0:a;this.slides=$(".slide");this.numberOfSlides=this.slides.length;this.isSlideAnimating=false;this.slides.wrapAll('<div id="slideInner"></div>').css({"float":"left",width:this.slideWidth});$("#slideInner").css("width",this.slideWidth*this.numberOfSlides);this.manageControls=function(a){if(a==0)$("#prevControl").hide();else $("#prevControl").show();if(a==this.numberOfSlides-1)$("#nextControl").hide();else $("#nextControl").show();$(".slideNav").each(function(){$(this).removeClass("selectedNav")});$("#nav"+(a+1)).addClass("selectedNav")};this.moveSlide=function(a){if(this.isSlideAnimating==false){this.isSlideAnimating=true;this.currentPosition=a;this.manageControls(a);$("#slideInner").animate({marginLeft:this.slideWidth*-a},{duration:400,easing:"easeInOutSine"});this.isSlideAnimating=false}};this.bindPrevNextControls=function(){$(".control").bind("click",{slideshow:this},function(b){var a=b.data.slideshow;$(this).attr("id")=="nextControl"?a.moveSlide(a.currentPosition+1):a.moveSlide(a.currentPosition-1)});$(".slide").bind("click",{slideshow:this},function(b){var a=b.data.slideshow;if(a.currentPosition!=a.numberOfSlides-1)a.moveSlide(a.currentPosition+1);else a.moveSlide(0)})};this.bindNavControls=function(a){$("#nav"+(a+1)).bind("click",{slideshow:this},function(c){var b=c.data.slideshow;b.moveSlide(a)})};this.manageControls(this.currentPosition);this.bindPrevNextControls();for(i=0;i<this.numberOfSlides;i++)this.bindNavControls(i)};$(document).ready(function(){new $MC.SlideShow});(function(b){b.dimensions={version:"@VERSION"};b.each(["Height","Width"],function(d,c){b.fn["inner"+c]=function(){if(!this[0])return;var d=c=="Height"?"Top":"Left",b=c=="Height"?"Bottom":"Right";return this.css("display")!="none"?this[0]["client"+c]:a(this,c.toLowerCase())+a(this,"padding"+d)+a(this,"padding"+b)};b.fn["outer"+c]=function(d){if(!this[0])return;var f=c=="Height"?"Top":"Left",e=c=="Height"?"Bottom":"Right";d=b.extend({margin:false},d||{});var g=this.css("display")!="none"?this[0]["offset"+c]:a(this,c.toLowerCase())+a(this,"border"+f+"Width")+a(this,"border"+e+"Width")+a(this,"padding"+f)+a(this,"padding"+e);return g+(d.margin?a(this,"margin"+f)+a(this,"margin"+e):0)}});b.each(["Left","Top"],function(c,a){b.fn["scroll"+a]=function(c){return!this[0]?void 0:c!=undefined?this.each(function(){this==window||this==document?window.scrollTo(a=="Left"?c:b(window).scrollLeft(),a=="Top"?c:b(window).scrollTop()):this["scroll"+a]=c}):this[0]==window||this[0]==document?self[a=="Left"?"pageXOffset":"pageYOffset"]||b.boxModel&&document.documentElement["scroll"+a]||document.body["scroll"+a]:this[0]["scroll"+a]}});b.fn.extend({position:function(){var g=0,h=0,e=this[0],c,b,d,f;if(e){d=this.offsetParent();c=this.offset();b=d.offset();c.top-=a(e,"marginTop");c.left-=a(e,"marginLeft");b.top+=a(d,"borderTopWidth");b.left+=a(d,"borderLeftWidth");f={top:c.top-b.top,left:c.left-b.left}}return f},offsetParent:function(){var a=this[0].offsetParent;while(a&&!/^body|html$/i.test(a.tagName)&&b.css(a,"position")=="static")a=a.offsetParent;return b(a)}});function a(a,c){return parseInt(b.curCSS(a.jquery?a[0]:a,c,true))||0}})(jQuery);(function(){jQuery.extend({context:function(a){return{callback:function(b){if(typeof b=="string")b=a[b];var c=function(){b.apply(a,arguments)};return c}}}});jQuery.mcpager=function(c,e,a,b,d){this.defaults={initialPage:0,customFetchCompleteCallback:function(){},transitionElements:null},this.settings=jQuery.extend({},this.defaults,d);this.currentPage=this.settings.initialPage;this.name=e;this.contentRegion=c;this.pagingLinksContainerSelector=a;this.fetchUrlPattern=b;this.init()};jQuery.mcpager.getPageIndex=function(b){var a=b.split("_");return a.length>1?parseInt(a[a.length-1]):-1};jQuery.mcpager.prototype={prevLinks:null,nextLinks:null,pageLinks:null,currentPage:0,init:function(){this.prevLinks=$("."+this.name+"_previous",$(this.pagingLinksContainerSelector));this.nextLinks=$("."+this.name+"_next",$(this.pagingLinksContainerSelector));this.pageLinks=$(".page-link",$(this.pagingLinksContainerSelector));this.setLinks()},setLinks:function(){var a=this;this.prevLinks.each(function(){$(this).unbind("click");$(this).bind("click",{mcpager:a},function(b){var a=b.data.mcpager;if(a){a.settings.transitionElements!=null&&a.settings.transitionElements.fadeTo("fast",.5);a.currentPage=a.currentPage-1;a.goToPage(a.currentPage)}return false});$(this).attr("href","#")});this.prevLinks.attr("href","#");this.nextLinks.each(function(){$(this).unbind("click");$(this).bind("click",{mcpager:a},function(b){var a=b.data.mcpager;if(a){a.settings.transitionElements!=null&&a.settings.transitionElements.fadeTo("fast",.5);a.currentPage=a.currentPage+1;a.goToPage(a.currentPage)}return false});$(this).attr("href","#")});this.pageLinks.each(function(){$(this).unbind("click");$(this).bind("click",{mcpager:a},function(c){var a=c.data.mcpager;if(a){var b=$.mcpager.getPageIndex($(this).attr("id"));a.currentPage=b-1;a.goToPage(a.currentPage)}return false});$(this).attr("href","#")})},goToPage:function(b){var a;if(this.fetchUrlPattern!=null)a=this.fetchUrlPattern.replace("{0}",b.toString());$("body").css("cursor","wait");$.post(a,{},$.context(this).callback(this.fetchCompleteCallback))},fetchCompleteCallback:function(a){this.contentRegion.innerHTML=a;this.init();$.context(this).callback(this.settings.customFetchCompleteCallback(a));this.settings.transitionElements!=null&&this.settings.transitionElements.fadeTo("fast",1);$("body").css("cursor","default")}};jQuery.fn.bindMcPager=function(d,a,b,c){if(this[0]!=null){mcpager=new jQuery.mcpager(this[0],d,a,b,c);jQuery.data(this[0],"mcpager",mcpager);return mcpager}};jQuery.fn.getMcPager=function(){if(this[0]!=null){var a=jQuery.data(this[0],"mcpager");if(a)return a}return null};jQuery.fn.refreshPage=function(){if(this[0]!=null){var a=jQuery.data(this[0],"mcpager");a&&a.goToPage(a.currentPage)}}})();$MC.Showcase=function(){return function(h,o,g,n){var a=$("#"+h),b,k=function(a){b.fetchUrlPattern=g[a];b.currentPage=0;b.goToPage(0)},m=function(g){var f=$(g),c=function(a){return f.attr("data-"+a)},b=$(".issueShowcase .titleblock",a);$("a.magazinelink",b).each(function(){$(this).attr("href",c("issueLink"))});$(".issuenumber a.magazinelink",b).html(c("magazineTitle"));$(".issuetitle a.magazinelink",b).html(c("issueName"));$(".byline .publisher",b).attr("href",c("usernameLink"));$(".byline .publisher",b).html(c("userDisplayName"));$(".byline .category-line",b).css("display",c("category")?"inline":"none");$(".byline .category",b).attr("href",c("categoryLink"));$(".byline .category",b).html(c("category"));var e=c("digitalIsFreeWithPrint").toLowerCase()=="true",d=c("digitalSaleType");if(e||d=="FreeDigital"||d=="FreeDigitalWithPrinted"){$(".print-pricing .print-label",b).html("Print +");$(".print-pricing .digital-icon",b).css("display","inline-block");$(".print-pricing .digital-label",b).css("display","inline")}else{$(".print-pricing .print-label",b).html("Print:");$(".print-pricing .digital-icon",b).css("display","none");$(".print-pricing .digital-label",b).css("display","none")}$(".print-pricing .original-price",b).html(c("originalPrintPrice"));if(c("hasBuyerDiscount").toLowerCase()=="true"){$(".print-pricing .original-price",b).addClass("strikethrough");$(".print-pricing .discounted-price",b).html(c("publicPrintPrice"));$(".print-pricing .discounted-price",b).css("display","inline")}else{$(".print-pricing .original-price",b).removeClass("strikethrough");$(".print-pricing .discounted-price",b).css("display","none");$(".print-pricing .discounted-price",b).html("")}if(c("hasDigitalOption").toLowerCase()=="true"){if(d=="FreeDigital"){$(".digital-pricing .original-price",b).addClass("favorable");$(".digital-pricing .original-price",b).html("Free!")}else{$(".digital-pricing .original-price",b).removeClass("favorable");$(".digital-pricing .original-price",b).html(c("originalDigitalPrice"))}$(".digital-pricing",b).css("display","inline")}else $(".digital-pricing",b).css("display","none")},d=function(b){$(".issueShowcase li",a).removeClass("selected");$(b).addClass("selected");m(b)},j=function(a){a.each(function(a){var b=this;setTimeout(function(){$(b).fadeIn(200)},a*50)})},f=function(a){a.each(function(){$(this).removeClass("preload")})},l=function(){var b=$(".issueShowcase .coverList img.preload",a),e=0,c=false;setTimeout(function(){c=true},400);setTimeout(function(){f(b)},4e3);var d=function(){if(b.length===++e)if(c)j(b);else f(b)};b.each(function(){if(this.complete)d();else $(this).load(function(){d()})})},e=function(){$(".coverList",a).fadeTo(.5,.5);$(".showcaseLoadingIndicator",a).css("visibility","visible")},c=function(){l();$(".issueShowcase li",a).bind("mouseenter",function(){d(this)});var b=$(".issueShowcase li.first:eq(0)",a);b.length>0&&d(b);$("#pagerLinks a",a).each(function(){$(this).click(function(){e()})})},i=function(e){var d={initialPage:0,customFetchCompleteCallback:function(d){try{var b=$.parseJSON(d);if(typeof b!="undefined"&&typeof b.Error!="undefined"){a.css("color","#FFF");window.location.href=window.location.href}}catch(e){c()}}};b=a.bindMcPager("issueShowcase","#"+a.attr("id")+" #pagerLinks",g[e],d);c()};i(n);return{switchShowcaseMode:k,showcaseTransition:e}}}()
