(function(){var A=false;if(window.location.search.indexOf("dbg=1")>=0){A=true}if(A){alert("dbg")}var B="8.0.0";if(!swfobject.hasFlashPlayerVersion(B)){return }swfobject.createCSS(".bp-carousel ul","visibility:hidden;");var C=function(H,E){var G=H.className.split(" ");for(var F=0,D=G.length,I;F<D;F++){I=glow.lang.trim(G[F]);if(I.indexOf(E)===0){return I.substring(E.length)}}return null};glow.ready(function(){if(A){alert("glow ready")}});glow.ready(function(){var D=[],E=0;glow.dom.get(".bp-carousel").each(function(I,L){var T=L.slice(I,I+1),M=T.get("ul"),N=T.get("h3"),G={title:(N.length)?N.text().split("\n").join(""):""},Q=parseInt(C(T[0],"bp-carousel-width-"))||T.width(),J=parseInt(C(T[0],"bp-carousel-height-"))||T.height(),S=T.get(".bp-carousel-top"),P=0;T.addClass("flash-replaced");var O=C(T[0],"bp-carousel-type-")||"default",K=(bp.suffixes.swf)?bp.suffixes.swf:"";G.skinPath="/cbbc/bluepeter/swf/"+O+K+".swf";M.children().each(function(Y,X){var U=X.slice(Y,Y+1),V=U.get("a"),W=U.get("img").attr("src");if(!W.length){return }G["image"+Y]=W;G["url"+Y]=V.attr("href");G["title"+Y]=U.text().length?U.text().split("\n").join(""):"";G["text"+Y]=V.hasAttr("title")?V.attr("title").split("\n").join(""):"";G["type"+Y]=C(U[0],"bp-carousel-item-type-")||"image"});var H={scale:"noscale",salign:"TL"};M.attr("id","bpcarousel"+(E++));var F=M.attr("id"),R=(bp.suffixes.swf)?bp.suffixes.swf:"";swfobject.embedSWF("/cbbc/bluepeter/swf/carousel"+R+".swf",F,Q,J,B,null,G,H,{});if(glow.env.ie<7){S.css("height",(P+J)+"px").css("width",(Q+12)+"px")}})})})();