var space=10,iconWidth=70+space,iconsPerPage=6,pageSize=iconWidth*iconsPerPage,pageIndex=0,pages,totalWidth,icons;Sys.require([Sys.scripts.jQuery],function(){icons=$("#icons");pages=Math.ceil($("#icons a").toArray().length/iconsPerPage);totalWidth=(pages-1)*pageSize;$("#iconleft").click(function(){pageIndex=parseInt(icons.css("left"),10)==0?pages-1:pageIndex-1;icons.animate({left:-(pageIndex*pageSize)})});$("#iconright").click(function(){pageIndex=parseInt(icons.css("left"),10)<=-totalWidth?0:pageIndex+1;icons.animate({left:-(pageIndex*pageSize)})});showcase(22)});function showcase(a){$.post("/OurWork/Case/",{caseId:a},function(a){if(a&&a!="{}"){$("#detail-image").html('<img alt="-" title="" src="'+a.ImageUrl+'" />');$("#detail-clientname").html(a.ClientName);$("#detail-title").html(a.Title);$("#detail-summary").html(a.Summary);$("#detail-shortdescription").html(a.ShortDescription);$("#detail-longdescription").html(a.LongDescription);$("#detail-projecttype").html("");$("#detail-technologies").html("");showless(a.Id)}},"json")}function showmore(a){$("#detail-readmore").html('<a href="javascript:showless('+a+');" title="Read less about this project">-Read less about this project</a>');$("#detail-longdescription").slideToggle(150)}function showless(a){$("#detail-readmore").html('<a href="javascript:showmore('+a+');" title="Read more about this project">+Read more about this project</a>');$("#detail-longdescription").hide(150)};
