$(document).ready(function(){setBackColorMarker(parseInt(stripline.currentBackColorOffset));$("#viewer_menu_block").bind("mouseleave",function(){$(".menu_dropdown").hide();$(".menu_item").removeClass("menu_item_hovered");});$(".menu_item").hover(function(){var dropdownId=$(this).attr("data-dropdown");$(".menu_dropdown").hide();$(".menu_item").removeClass("menu_item_hovered");$(this).addClass("menu_item_hovered");$("#"+dropdownId).show();setBackColorMarker(parseInt(stripline.currentBackColorOffset));},function(e){});$("#navi_select_block select").bigbadselect({currentTmpl:function(val,text){var i=stripline.stripsInfo[val];return'
' +''+i['date']+'' +''+i['number']+'' +''+(i['name']||"")+'' +'
';},optionTmpl:function(val,text){var i=stripline.stripsInfo[val];return'
' +''+i['date']+'' +''+i['number']+'' +''+(i['name']||"")+'' +'
';}});$(".bigbadselect-current-container").unbind().click(function(e){var options=$(this).siblings(".bigbadselect-options-container").first();if(options.length){$(".bigbadselect-options-container").toggle();}});$("span.floatArrow").click(function(e){$(".bigbadselect-options-container").toggle();});$(".back_color_select").click(function(){var backColorOffset=parseInt($(this).attr("data-marker-offset"));$("#viewer_body").css("background-color",stripline.backColors[backColorOffset]);document.cookie='CakeCookie[backColorOffset]='+backColorOffset+';path=/;max-age=31536000';stripline.currentBackColorOffset=backColorOffset;setBackColorMarker(backColorOffset);});$('#scale_selector').bind('click',function(){var newVal=1-stripline.stripViewerScale;document.cookie='CakeCookie[stripViewerScale]='+newVal+';path=/;max-age=31536000';document.location.reload();});$("#disqus_thread a").click(function(e){var disqus_shortname="stripline";(function(){var dsq=document.createElement("script");dsq.type="text/javascript";dsq.async=true;dsq.src="//"+disqus_shortname+".disqus.com/embed.js";(document.getElementsByTagName("head")[0]||document.getElementsByTagName("body")[0]).appendChild(dsq);})();e.preventDefault();});$('#switchToStripViewerV1').bind('click',function(){document.cookie='CakeCookie[stripViewerLayout]=v1;path=/;max-age=31536000';document.location.reload();});$('#switchToStripViewerV2').bind('click',function(){document.cookie='CakeCookie[stripViewerLayout]=v2;path=/;max-age=31536000';document.location.reload();});});function setBackColorMarker(backColorOffset){$("#back_color_marker").css("left",backColorOffset*26);}