(function(F){var E="Lite-1.0";F.fn.cycle=function(A){return this.each(function(){A=A||{};if(this.cycleTimeout){clearTimeout(this.cycleTimeout)}this.cycleTimeout=0;this.cyclePause=0;var M=F(this);var D=A.slideExpr?F(A.slideExpr,this):M.children();var O=D.get();if(O.length<2){if(window.console&&window.console.log){window.console.log("terminating; too few slides: "+O.length)}return }var N=F.extend({},F.fn.cycle.defaults,A||{},F.metadata?M.metadata():F.meta?M.data():{});N.before=N.before?[N.before]:[];N.after=N.after?[N.after]:[];N.after.unshift(function(){N.busy=0});var P=this.className;N.width=parseInt((P.match(/w:(\d+)/)||[])[1])||N.width;N.height=parseInt((P.match(/h:(\d+)/)||[])[1])||N.height;N.timeout=parseInt((P.match(/t:(\d+)/)||[])[1])||N.timeout;if(M.css("position")=="static"){M.css("position","relative")}if(N.width){M.width(N.width)}if(N.height&&N.height!="auto"){M.height(N.height)}var C=0;D.css({position:"absolute",top:0,left:0}).hide().each(function(I){F(this).css("z-index",O.length-I)});F(O[C]).css("opacity",1).show();if(F.browser.msie){O[C].style.removeAttribute("filter")}if(N.fit&&N.width){D.width(N.width)}if(N.fit&&N.height&&N.height!="auto"){D.height(N.height)}if(N.pause){M.hover(function(){this.cyclePause=1},function(){this.cyclePause=0})}F.fn.cycle.transitions.fade(M,D,N);D.each(function(){var I=F(this);this.cycleH=(N.fit&&N.height)?N.height:I.height();this.cycleW=(N.fit&&N.width)?N.width:I.width()});D.not(":eq("+C+")").css({opacity:0});if(N.cssFirst){F(D[C]).css(N.cssFirst)}if(N.timeout){if(N.speed.constructor==String){N.speed={slow:600,fast:200}[N.speed]||400}if(!N.sync){N.speed=N.speed/2}while((N.timeout-N.speed)<250){N.timeout+=N.speed}}N.speedIn=N.speed;N.speedOut=N.speed;N.slideCount=O.length;N.currSlide=C;N.nextSlide=1;var B=D[C];if(N.before.length){N.before[0].apply(B,[B,B,N,true])}if(N.after.length>1){N.after[1].apply(B,[B,B,N,true])}if(N.click&&!N.next){N.next=N.click}if(N.next){F(N.next).bind("click",function(){return G(O,N,N.rev?-1:1)})}if(N.prev){F(N.prev).bind("click",function(){return G(O,N,N.rev?1:-1)})}if(N.timeout){this.cycleTimeout=setTimeout(function(){H(O,N,0,!N.rev)},N.timeout+(N.delay||0))}})};function H(D,R,N,C){if(R.busy){return }var O=D[0].parentNode,A=D[R.currSlide],B=D[R.nextSlide];if(O.cycleTimeout===0&&!N){return }if(N||!O.cyclePause){if(R.before.length){F.each(R.before,function(J,I){I.apply(B,[A,B,R,C])})}var Q=function(){if(F.browser.msie){this.style.removeAttribute("filter")}F.each(R.after,function(J,I){I.apply(B,[A,B,R,C])})};if(R.nextSlide!=R.currSlide){R.busy=1;F.fn.cycle.custom(A,B,R,Q)}var P=(R.nextSlide+1)==D.length;R.nextSlide=P?0:R.nextSlide+1;R.currSlide=P?D.length-1:R.nextSlide-1}if(R.timeout){O.cycleTimeout=setTimeout(function(){H(D,R,0,!R.rev)},R.timeout)}}function G(J,D,A){var B=J[0].parentNode,C=B.cycleTimeout;if(C){clearTimeout(C);B.cycleTimeout=0}D.nextSlide=D.currSlide+A;if(D.nextSlide<0){D.nextSlide=J.length-1}else{if(D.nextSlide>=J.length){D.nextSlide=0}}H(J,D,1,A>=0);return false}F.fn.cycle.custom=function(A,D,C,N){var B=F(A),L=F(D);L.css({opacity:0});var M=function(){L.animate({opacity:1},C.speedIn,C.easeIn,N)};B.animate({opacity:0},C.speedOut,C.easeOut,function(){B.css({display:"none"});if(!C.sync){M()}});if(C.sync){M()}};F.fn.cycle.transitions={fade:function(B,A,C){A.not(":eq(0)").css("opacity",0);C.before.push(function(){F(this).show()})}};F.fn.cycle.ver=function(){return E};F.fn.cycle.defaults={timeout:4000,speed:1000,next:null,prev:null,before:null,after:null,height:"auto",sync:1,fit:0,pause:0,delay:0,slideExpr:null}})(jQuery);if(typeof ISSUU.landing=="undefined"){ISSUU.landing={}}ISSUU.landing.top=function(){var D;var C="promo_1";if(ISSUU.utils.UrlHelper.getUrlHashMap(location.search.substr[1]).promo){C="promo_"+ISSUU.utils.UrlHelper.getUrlHashMap(location.search.substr[1]).promo}var B=function(){$(".gs_slidedown").toggle();$(".gs_slideup").toggle();$("#top_headlines").toggle()};$(document).ready(function(){ISSUU.utils.User.puo.get(null,function(E){D=(E.lp==="undefined")?"expanded":E.lp;if(navigator.appName=="Microsoft Internet Explorer"&&jQuery.browser.version<=6){$("div.round_co_to img.left_c").attr("src","http://static.issuu.com/html/v1.1.31/staticFiles/img/pixel.gif");$("div.round_co_to img.right_c").attr("src","http://static.issuu.com/html/v1.1.31/staticFiles/img/pixel.gif");$("div.round_co_bt img.left_c").attr("src","http://static.issuu.com/html/v1.1.31/staticFiles/img/pixel.gif");$("div.round_co_bt img.right_c").attr("src","http://static.issuu.com/html/v1.1.31/staticFiles/img/pixel.gif")}$("#top_headlines").cycle({fx:"fade",speed:225,timeout:6000,pause:0});if(ISSUU.landing.top.getOnLoadShowPromoNo()!==false&&!ISSUU.utils.User.isLoggedin()){ISSUU.landing.top.promo_actions(ISSUU.landing.top.getOnLoadShowPromoNo())}if(ISSUU.landing.top.get_top_slider_state()=="expanded"){ISSUU.landing.top.setSliderStateExpanded()}else{$("#top_headlines").css("display","block")}$(".promo-action").click(function(F){ISSUU.landing.top.promo_actions($(this).attr("href").split("#")[1]);return false});$(".gs_slidedown").click(function(F){ISSUU.utils.User.puo.set({lp:"expanded"},function(){ISSUU.landing.top.promo_actions("promo_1");return false})});$(".gs_slideup").click(function(){ISSUU.utils.User.puo.set({lp:"collapsed"},function(){ISSUU.landing.top.slide_top_up();return false})});$("a.sbSwfPopup").click(function(){ISSUU.landing.shelf.disable_auto_refresh();var F={takeTheTour:{base:"http://static.issuu.com/html/v1.1.31/staticFiles/swf/",width:"900",height:"346",swf:"http://static.issuu.com/html/v1.1.31/staticFiles/swf/tour.swf"},whatIsIssuu:{base:"http://static.issuu.com/html/v1.1.31/staticFiles/vid/",width:"900",height:"550",swf:"http://static.issuu.com/html/v1.1.31/staticFiles/vid/videos.swf",addToFlashVars:{nowPlaying:"1"}}};var G=$(this).attr("href").substr(1);ISSUU.utils.dialogue.open({width:parseInt(F[G].width,10),height:parseInt(F[G].height,10)+25,content:'<div style="padding-top:25px;"><div id="embedVideo"></div></div>',onOpen:function(){ISSUU.utils.embedSwf(F[G].base,F[G].swf,F[G].width,F[G].height,"embedVideo",F[G].addToFlashVars)},onClose:function(){ISSUU.landing.shelf.activate_auto_refresh()}})});if(location.href.indexOf("#whatIsIssuu")!=-1){$('a[href="#whatIsIssuu"]').click()}})});var A={isTopSliderStateExpandedOnLoad:function(){if(D=="expanded"){return true}else{return false}},getOnLoadShowPromoNo:function(){return C},setSliderStateExpanded:function(){ISSUU.landing.top.slide_top_down();$(".gs_slidedown").css("display","none");$(".gs_slideup").css("display","block");$("#top_headlines").css("display","none")},get_top_slider_state:function(){return D},slide_top_down:function(){B();$(".promo-window").animate({height:"279px"},225,function(){});D="expanded"},slide_top_up:function(){$(".promo-window").animate({height:"32px"},225,function(){B()});D="collapsed"},promo_actions:function(E){$.scrollTo("#tm_user_info",225,{offset:-8});this.slide_top_down();$("div.promo").css("display","none");$("div."+E).css("display","block")}};return A}();ISSUU.landing.shelf=function(){var H=[];var K=[];var I=0;var D=0;var C=13;var F=false;var E=2000;var A=6000;var B;var J=function(L){L=typeof (L)!="undefined"?L:C;D=D+L;if(D<0){D=0;$("a.previous").css("display","none")}};$(document).ready(function(){$(".prev-next-click").click(function(){ISSUU.landing.shelf.reset_auto_refresh();if($(this).attr("href")=="#previous"){ISSUU.landing.shelf.previous()}else{ISSUU.landing.shelf.next()}return false});setTimeout(ISSUU.landing.shelf.activate_auto_refresh,ISSUU.landing.shelf.get_pause_before_auto_refresh())});var G={get_auto_refresh_state:function(){return F},get_pause_before_auto_refresh:function(){return E},load_section_data:function(N){var M,L;for(M in N.sections){L=N.sections[M].url.substr(N.sections[M].url.lastIndexOf("/")+1);if(L.substr(0,2)!=="m-"){K[M]=N.sections[M]}}},build_menu:function(){$(".shelf-switcher .shelf-menu").html("");var O,M,L;var N;for(N in K){if(N==I){O=" selected";M="";L=""}else{O="";M='<a  href="#" class="sm">';L="</a>"}$(".shelf-switcher .shelf-menu").append("<li class='ss_"+N+O+"'>"+M+K[N].title+L+"</li>")}$(".sm").click(function(R){ISSUU.landing.shelf.disable_auto_refresh();var P=$($(this).parent("li").get(0)).attr("class");var Q=P.replace("ss_","");D=0;ISSUU.landing.shelf.require_shelf_data(Q);ISSUU.landing.shelf.build_menu();return false})},require_shelf_data:function(N){I=N;if(typeof H[I]=="object"){ISSUU.landing.shelf.build_shelf()}else{var M=K[N].url;var L;if(M[M.length-1]=="p"){L=M+"?jsoncallback=?"}else{L=M+"p?jsoncallback=?"}$.getJSON(L)}},addOnePubToShelf:function(M){var L=new EJS({text:ISSUU.landing.shelfItemTemplate}).render({title:H[I].items[M].title,type:H[I].items[M].type,documentid:H[I].items[M].documentid,doclink:H[I].items[M].doclink});$("div.shelf-content").append(L);var N=/chrome/.test(navigator.userAgent.toLowerCase());if(N){$("table."+H[I].items[M].documentid).css("opacity","1")}else{if(!$.browser.msie){$("table."+H[I].items[M].documentid).animate({opacity:"1.0"},450)}}$("div.cropper").hover(function(){ISSUU.landing.shelf.reset_auto_refresh();$(this).addClass("hover-pub")},function(){$(this).removeClass("hover-pub")});$(".shelf-pub-click").click(function(Q){Q.stopPropagation();ISSUU.landing.shelf.disable_auto_refresh();var P=$(this).attr("href").split("#");var S=P[1].split("|");var O={documentId:S[0],title:S[1],type:S[2]};var R;if(!swfobject.hasFlashPlayerVersion("9.0.0")){R="http://"+ISSUU.server.model.domain+"/viewer?documentId="+O.documentId+"&mode=a_p"}else{R="http://"+ISSUU.server.model.domain+"/viewer?documentId="+O.documentId}window.location.href=R;return false})},build_shelf:function(){$("div.shelf-content").html("");var L=0;for(i=D;i<H[I].items.length&&i<D+C;i++){var M=50*L;setTimeout("ISSUU.landing.shelf.addOnePubToShelf("+i+")",M);L++}J(C)},auto_next:function(){G.next()},next:function(){$("a.previous").css("display","inline");if(D>=H[I].totalResults){this.advance_section_id()}this.require_shelf_data(I)},advance_section_id:function(){if(I==K.length-1){I=0}else{I++}this.build_menu();D=0;$("a.previous").css("display","none")},previous:function(){var L=-(2*C);J(L);if(D==0){$("a.previous").css("display","none")}this.require_shelf_data(I)},fill_shelf:function(){this.require_shelf_data(I)},store_locally:function(M){var L;H[I]=[];H[I].totalResults=M.totalResults;H[I].lastBuildDate=M.lastBuildDate;H[I].title=M.title;H[I].startIndex=M.startIndex;H[I].itemsPerPage=M.itemsPerPage;H[I].link=M.link;H[I].items=[];var N;for(N in M.items){if(typeof H[I].items[N]!="object"){H[I].items[N]=[]}L=ISSUU.utils.Feeds.nameValueListToHashMap(M.items[N].fields);H[I].items[N].title=L.title;H[I].items[N].type=L.type;H[I].items[N].documentid=L.documentId;H[I].items[N].doclink=M.items[N].link}},activate_auto_refresh:function(){F=true;B=window.setInterval("ISSUU.landing.shelf.auto_next()",A)},disable_auto_refresh:function(){F=false;window.clearInterval(B)},reset_auto_refresh:function(){if(F){window.clearInterval(B);B=setInterval(ISSUU.landing.shelf.auto_next,A)}}};return G}();$.getJSON("http://content."+ISSUU.server.model.domain+"/lists/commonlib.jsonp?jsoncallback=?");function jsonp_callback(A){if(A.sections){ISSUU.landing.shelf.load_section_data(A);ISSUU.landing.shelf.build_menu();ISSUU.landing.shelf.fill_shelf()}else{if(A.items){ISSUU.landing.shelf.store_locally(A);ISSUU.landing.shelf.build_shelf()}}}ISSUU.landing.loadPublicationsTabContent=function(B){var C=ISSUU.utils.User.autoGetLanguage();var A="http://search."+ISSUU.server.model.domain+"/generic?q=* +graphical:700000-999999 +created:"+ISSUU.utils.Feeds.getDateString("3DaysFrom2DaysAgo");if(C!="*"&&C!="any"&&C!="all"){A+="+language:"+C}A+="&sort="+B+"&start=0&num=9&type=document&details=graphical&reverse=true&format=json&jsoncallback=?";jQuery.getJSON(A,function(E){var D=new EJS({text:ISSUU.landing.publicationsListTemplate});D.update("tab-"+B,E);$("#tab-"+B).show()})};$(document).ready(function(){ISSUU.landing.loadPublicationsTabContent("views");$("#publications-tab-menu a").click(function(B){if($(this).attr("id")=="publications"){return }B.preventDefault();B.stopPropagation();$("#publications-tab-menu li").removeClass("selected");$(this).parents("li").addClass("selected");$(".tab-content").hide();var A=$(this).attr("href").substring(1);if($("#tab-"+A).html()!=""){$("#tab-"+A).show()}else{ISSUU.landing.loadPublicationsTabContent(A)}});$(".vertical-linkbar-list a").click(function(D){var B=$(this).parents()[1].id;var C=$("#publications-tab-menu li.selected span a").attr("href").substring(1);var E=$(this).attr("href").substring(1);var A;if(B=="category"){A="http://"+ISSUU.server.model.domain+"/publications/?q=&br="+C+"&cat="+E+"&dsp=grid&num=20"}else{if(B=="doctype"){A="http://"+ISSUU.server.model.domain+"/publications/?q=&br="+C+"&dt="+E+"&dsp=grid&num=20"}}window.location.href=A;return false})});var __protocol="http://";var __domain=ISSUU.server.model.domain;var __subDomain;if(ISSUU.utils.UrlHelper.getSubDomain()){__subDomain=ISSUU.utils.UrlHelper.getSubDomain()+"."}else{__subDomain=""}function getUserUrl(B){return __protocol+__domain+"/"+B}function getDocumentUrl(D,C){return getUserUrl(D)+"/docs/"+C}function getCommentUrl(E,D,F){return getDocumentUrl(E,D)}function getBlogPostUrl(D,C){return getUserUrl(D)}function getSectionPreviewUrl(D,C){return getUserUrl(D)+"/section/"+C}function nameValueListToHashMap(C){var D={};jQuery.each(C,function(){if(D[this.name]==undefined){D[this.name]=this.value}else{if(!(D[this.name] instanceof Array)){D[this.name]=[D[this.name]]}D[this.name].push(this.value)}});return D}$(document).ready(function(){var M=__protocol+"search."+__domain+"/generic?&q=* -user:issuu -targetuser:issuu&sort=created&reverse=true&num=11&type=document,comment,blogpost,bookmark,connection,recommendation,smartfolder&contentencoded=true&format=json&jsoncallback=?";jQuery.getJSON(M,function(C){var B=[];jQuery.each(C.items,function(){var D=nameValueListToHashMap(this.fields);if(D.type=="comment"||D.type=="blogpost"){D.description=this.description}B.push(D)});if(B.length!=0){var A=0;jQuery.each(B,function(){switch(this.type){case"document":jQuery("div.shadeBgWidgetfg").append(O(this));break;case"comment":jQuery("div.shadeBgWidgetfg").append(R(this));break;case"blogpost":jQuery("div.shadeBgWidgetfg").append(N(this));break;case"bookmark":jQuery("div.shadeBgWidgetfg").append(P(this));break;case"connection":jQuery("div.shadeBgWidgetfg").append(K(this));break;case"recommendation":jQuery("div.shadeBgWidgetfg").append(Q(this));break;case"smartfolder":jQuery("div.shadeBgWidgetfg").append(J(this));break;default:}A++})}});function L(D,B,F){var G=24;function A(I,H){if(I.length>H){I=I.substring(0,H-3)+"..."}return I}if(F==undefined){return{txt1:A(D,G)}}else{var C=D+B+F;if(C.length>G){var E=Math.floor((G-B.length)/2);return{txt1:A(D,E),txt2:A(F,E)}}else{return{txt1:D,txt2:F}}}}function O(A){var B='<div class="divider"><img src="http://static.issuu.com/html/v1.1.31/staticFiles/img/activityfeed/icon_newdoc.gif" />New Publication:<br/><a href="'+getDocumentUrl(A.user,A.name)+'">'+L(A.title).txt1+"</a></div>";return B}function R(A){var B='<div class="divider"><img src="http://static.issuu.com/html/v1.1.31/staticFiles/img/activityfeed/icon_comment.gif" />Comment:<br/><a href="'+getCommentUrl(A.targetUser,A.name,A.pos)+'">'+L(A.description).txt1+"</a></div>";return B}function N(A){var B='<div class="divider"><img src="http://static.issuu.com/html/v1.1.31/staticFiles/img/activityfeed/icon_blogpost.gif" />Profile comment:<br/><a href="'+getBlogPostUrl(A.targetUser,A.pos)+'">'+L(A.description).txt1+"</a></div>";return B}function P(A){var B='<div class="divider"><img src="http://static.issuu.com/html/v1.1.31/staticFiles/img/activityfeed/icon_bookmarked.gif" />Bookmark:<br/><a href="'+getDocumentUrl(A.targetUser,A.name)+'">'+L(A.title).txt1+"</a></div>";return B}function K(C){var B=L(C.user," & ",C.targetUser);var A='<div class="divider"><img src="http://static.issuu.com/html/v1.1.31/staticFiles/img/activityfeed/icon_friends.gif" />Friends:<br/><a href="'+getUserUrl(C.user)+'">'+B.txt1+'</a> & <a href="'+getUserUrl(C.targetUser)+'">'+B.txt2+"</a></div>";return A}function Q(C){var B=L(C.user," > ",C.targetUser);var A='<div class="divider"><img src="http://static.issuu.com/html/v1.1.31/staticFiles/img/activityfeed/icon_favorite.gif" />Subscriber:<br/><a href="'+getUserUrl(C.user)+'">'+B.txt1+'</a> > <a href="'+getUserUrl(C.targetUser)+'">'+B.txt2+"</a></div>";return A}function J(A){var B='<div class="divider"><img src="http://static.issuu.com/html/v1.1.31/staticFiles/img/activityfeed/icon_newsection.gif" />Library Section:<br/><a href="'+getSectionPreviewUrl(A.user,A.id)+'">'+L(A.title).txt1+"</a></div>";return B}});ISSUU.landing.shelfItemTemplate='<table class="wrapper <%= documentid %>"  >\n  <tr>\n    <td>\n      <div class="shadow">\n        <div class="cropper">\n				  <a title="<%= title %>" href="<%= doclink %>" >\n            <img src="http://image.<%= ISSUU.server.model.domain %>/<%= documentid %>/jpg/page_1_thumb_medium.jpg" class="cover">\n            <!-- img src="http://static.issuu.com/html/v1.1.31/staticFiles/img/newLabel.png" class="newLabel"  -->\n            <img src="http://static.issuu.com/html/v1.1.31/staticFiles/img/3dEffect.png" class="threedee">\n					</a>\n        </div>\n      </div>\n    </td>\n  </tr>\n</table>';ISSUU.landing.publicationsListTemplate='<% if(totalResults > 0) { %> \n	<% \n	for(var i=0; i<items.length; i++) { \n	var fields = ISSUU.utils.Feeds.nameValueListToHashMap(items[i].fields); \n	%> \n	<div class="clearfix document-textitem"> \n		<div class="span-3 thumbnail"> \n			<p class="book-cover"><a href="<%= ISSUU.utils.escapeHtml(items[i].link) %>" title="<%= ISSUU.utils.escapeHtml(items[i].title) %>"><img src="<%= ISSUU.utils.UrlHelper.docSmallThumbUrl(fields.documentId, 1) %>" id="book-cover-t<%= fields.documentId %>" onerror="ISSUU.exploreDocuments.noImage(this, \'small\')" alt=""></a></p> \n		</div> \n		<div class="span-7 title-description pull-1"> \n			<h3><a href="<%= ISSUU.utils.escapeHtml(items[i].link) %>" title="<%= ISSUU.utils.escapeHtml(items[i].title) %>"><%= ISSUU.utils.Feeds.trimText(ISSUU.utils.escapeHtml(items[i].title), 6, 1) %></a></h3> \n			<p><%= ISSUU.utils.escapeHtml(items[i].description) %></p> \n		</div> \n		<div class="span-2 last metadata"> \n			<p>By <%= link_to(fields.user, ISSUU.utils.UrlHelper.userUrl(ISSUU.utils.escapeHtml(fields.user))) %></p> \n			<p>Views: <span><%= parseInt(fields.views*1) %></span></p> \n			<p>Pages: <span><%= parseInt(fields.pageCount) %></span></p> \n			<% \n      if(fields.rating != -1){ \n					var rating = parseFloat(Math.abs(fields.rating)).toFixed(1); \n			    var ratingRounded = (Math.round(parseFloat(fields.rating).toFixed(1)/0.5)*0.5).toFixed(1); \n					var ratingSplit = ratingRounded.split(\'.\'); \n					%> \n	        <p> \n					  <span class="system-rating system-rating-<%= ratingSplit[0] + \'_\' + ratingSplit[1] %>"><span class="alt-text"><%= rating %></span></span>\n					</p> \n			<% \n			} \n			%> \n		</div> \n	</div> \n	<% } %> \n</div> \n<% } else { %> \n<p>No results found.</p> \n<% } %>';