$(document).ready(function(){var c="title",h=".COBAlbum",g='div class="COBSlide"',f='div class="COBAlbum"',e="easeInOutQuad",b="#photos",i="#COBGalleryView",a="#COBGalleryControl",d="#slideShowPath",l=$(d).attr("value");if(window.Silverlight)if(window.Silverlight.isInstalled()){$(a).hide();$(i).hide()}else j();function j(){n(l);$(b).galleryView({panel_width:800,panel_height:300,frame_width:50,frame_height:50,transition_speed:350,easing:e,transition_interval:0});$(b).hide()}function o(d,c){$.ajax({type:"GET",url:d,dataType:"text",success:function(d){$(a).empty();$(a).html(m(d,c));$(a).modal({position:["135px"],onClose:function(){$.modal.close();$(b).hide()}});$(b).galleryView({panel_width:800,panel_height:540,frame_width:50,frame_height:50,transition_speed:350,easing:e,transition_interval:0})}})}function k(d){for(var b="",c=0,a,c=0;c<d.length;++c){a=d.charAt(c);if(a>="A"&&a<="Z"||a>="a"&&a<="z"||a>="0"&&a<="9"||a==" "||a=="-"||a=="+"||a=="_")b=b+a}return b}function m(o,l){for(var n=o.replace(/data/gi,"div").replace(/album/gi,f).replace(/slide/gi,g),d=$(h,n),j="",b=0,b=0;b<d.length;b++){var p=l,q=$(d[b]).attr(c);if(k(p.toString())==k(q.toString()))j=d[b]}var i=$(".COBSlide",j),m=i.length,a="";a+='<div><ul id="photos" class="COBPhotos">\n\r';for(x=0;x<m;x++){var e=$(i[x]).attr("source");e=e.replace("height=800","height=150");a+="<li>\n\r";a+='<span class="panel-overlay">'+$(i[x]).attr(c)+"</span>\n\r";a+='<img src="'+e+'" height="300" />\n\r';a+="</li>\n\r"}a+="</ul></div>\n\r";return a}function n(a){$.ajax({type:"GET",url:a,dataType:"text",success:function(n){var b=".COBGalleryInnerItem",a=".COBGalleryList",k="",m=n.replace(/data/gi,"div").replace(/album/gi,f).replace(/slide/gi,g),e=$(h,m),j=parseInt(e.length);if(j==0)j=1;$(a).css("height",Math.round(j/2)*110);for(var i=0;i<e.length;i++){GallerySlide=$(".COBSlide:first",e[i]);SUrl=$(GallerySlide).attr("thumbnail");k+='<div class="COBGalleryListItem"><div class="COBGalleryInnerItem"><img align="left" height="75px" width="75px" src="'+SUrl+'" alt="'+$(e[i]).attr(c)+'"></img>&nbsp;'+$(e[i]).attr(c)+"</div></div>"}$(a).html(k);$(b).hover(function(){$(this).css({"background-color":"#bb936f",cursor:"pointer"})},function(){$(this).css({"background-color":"#ffffff"})});$(b).click(function(){var b=$(d).attr("value"),a=$(this).text();o(l,a)})}})}})