/*30-08-2010 14:16*/
jQuery.cookie=function(name,value,options){if(typeof value!="undefined"){options=options||{};if(value===null){value="";options.expires=-1}var expires="";if(options.expires&&(typeof options.expires=="number"||options.expires.toUTCString)){var date;if(typeof options.expires=="number"){date=new Date;date.setTime(date.getTime()+options.expires*24*60*60*1E3)}else date=options.expires;expires="; expires="+date.toUTCString()}var path=options.path?"; path="+options.path:"";var domain=options.domain?"; domain="+
options.domain:"";var secure=options.secure?"; secure":"";document.cookie=[name,"=",encodeURIComponent(value),expires,path,domain,secure].join("")}else{var cookieValue=null;if(document.cookie&&document.cookie!=""){var cookies=document.cookie.split(";");for(var i=0;i<cookies.length;i++){var cookie=jQuery.trim(cookies[i]);if(cookie.substring(0,name.length+1)==name+"="){cookieValue=decodeURIComponent(cookie.substring(name.length+1));break}}}return cookieValue}};
(function($){$.url={urlObject:{scheme:"",host:"",port:"",user:"",pass:"",path:"",query:{},fragment:""},parser:{regex:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,keys:{source:0,protocol:1,authority:2,userInfo:3,user:4,password:5,host:6,port:7,relative:8,path:9,directory:10,file:11,query:12,anchor:13}},parsed:false,source:"",setUrl:function(){var str=arguments[0]||
"";$.url.source=str;$.url.parsed=false;$.url.parseUrl(str);return $.url},reset:function(){return $.url.setUrl(window.location.href)},go:function(){window.location.href=$.url.toString()},parseUrl:function(){var url=arguments[0]||window.location.href,urlArray=$.url.parser.regex.exec(url);if(urlArray){$.url.urlObject.scheme=urlArray[$.url.parser.keys.protocol]||"http";$.url.urlObject.host=urlArray[$.url.parser.keys.host];$.url.urlObject.port=urlArray[$.url.parser.keys.port];$.url.urlObject.user=urlArray[$.url.parser.keys.user];
$.url.urlObject.pass=urlArray[$.url.parser.keys.password];$.url.urlObject.path=urlArray[$.url.parser.keys.path]||"/";$.url.urlObject.query=$.url.parseQueryString(urlArray[$.url.parser.keys.query]);$.url.urlObject.fragment=urlArray[$.url.parser.keys.anchor]&&urlArray[$.url.parser.keys.anchor].substr(0,1)=="#"?urlArray[$.url.parser.keys.anchor].substr(1):urlArray[$.url.parser.keys.anchor];$.url.source=urlArray[$.url.parser.source];$.url.parsed=true}return $.url},getUsername:function(){return""},getPassword:function(){return""},
attr:function(){var key=null,value=null;if(arguments.length==1)if(typeof arguments[0]=="object"){$.each(arguments[0],function(key,value){if(key=="query")throw new Error("Cannot set query part, use `param`");else $.url.urlObject[key]=value});value=$.url}else{key=arguments[0];if(key=="query")value=$.url.createQueryString();else value=$.url.urlObject[key]}else if(arguments.length==2){key=arguments[0];value=arguments[1];if(key=="query")throw new Error("Cannot set query part, use `param`");else{$.url.urlObject[key]=
value;value=$.url}}return value},param:function(){var key=null,value=null;if(arguments.length==1)if(typeof arguments[0]=="object"){$.each(arguments[0],function(key,value){$.url.urlObject.query[key]=value});value=$.url}else{key=arguments[0];value=$.url.urlObject.query[key]}else if(arguments.length==2){key=arguments[0];value=arguments[1];$.url.urlObject.query[key]=value;value=$.url}return value},setPath:function(){$.url.urlObject.path=arguments[0]||"";return $.url},hash:function(){return $.url.fragment(arguments[0])},
fragment:function(){if(arguments[0]){$.url.urlObject.fragment=arguments[0];return $.url}return $.url.urlObject.fragment},parseQueryString:function(){var str=arguments[0]||"";var query={};if(str){str=str.substr(0,1)=="?"?str.substring(1):str;var arr=str.split("&");$(arr).each(function(i,fragment){var pair=fragment.split("=");var name=pair.shift();var value=pair.shift();query[name]=value})}return query},createQueryString:function(){var str="";$.each($.url.urlObject.query,function(key,value){str+=(str!=
""?"&":"?")+key+"="+value});return str},toString:function(){return $.url.urlObject.scheme+"://"+$.url.urlObject.host+($.url.urlObject.port?":"+$.url.urlObject.port:"")+$.url.urlObject.path+$.url.createQueryString()+($.url.urlObject.fragment?"#"+$.url.urlObject.fragment:"")}};$.url.reset()})(jQuery);
(function($,context){$().ready(function(){var menuColumn=$("#mainColumn2");var tout=$("#leftnavTouts");var menuContent=$("#leftnavContent");var contentColumn=$("#mainColumn1");var updateLeftNavTout=function(){if(menuColumn.length&&menuContent.length){tout.css("height","");var minHeight=contentColumn.height();var negHeight=menuContent.height();var restHeight=minHeight-negHeight-15;var toutHeight=tout.height();var height=restHeight;if(height<toutHeight)height=toutHeight;tout.css("height",height)}};
var menu=$("#SectionMenu");menu.find("ul").hide();var links=menu.children();var row=menu.parents(".column-row");links.each(function(i){var link=$(this);var submenu=link.find("ul");if(submenu.length>0){link.find("a.buttonBig").first().addClass("buttonExpandable");if(link.hasClass("selected"))submenu.show();link.find("a").first().bind("click",function(e){e.preventDefault();link.parents(".column-row").CalculateRowHeight();link.toggleClass("selected");submenu.slideToggle({speed:300,easing:"easeInQuad",
step:function(){row.trigger("columnUpdate");updateLeftNavTout()}})})}});$(window).bind("load",function(){updateLeftNavTout()})})})(jQuery,this);
(function($,context){var debugHeight=false;$.fn.EqualRowHeight=function(){if(debugHeight===true)return;var csName=arguments[0]||".inline-column";var options=arguments[1]||{};return this.each(function(){var row=$(this);var parent=row.parents(".column-row").first();row.css("height","");parent.css("height","");var mHeight=0;if(row.hasClass("t-row")){mHeight=row.height();row.css("height",mHeight+"px")}else{mHeight=0;if(options.height)mHeight=options.height;else row.find(csName).each(function(i){var h=
$(this).outerHeight(true);if(h>=mHeight)mHeight=h});if(row.hasClass("inline-row")&&$.browser.msie===true&&row.children(".column-round").length>0)mHeight+=18;row.css("height",mHeight+"px")}parent.CalculateRowHeight()})};$.fn.CalculateRowHeight=function(){if(debugHeight===true)return;var maxHeights=[{height:4450,className:"column-row-1-2",minHeight:90},{height:2E3,className:"column-row-1-1",minHeight:90},{height:800,className:"column-row-1",minHeight:90},{height:420,className:"column-row-2",minHeight:90},
{height:220,className:"column-row-3",minHeight:40}];return this.each(function(i){var row=$(this);row.css("height","");var ele=this;$.each(maxHeights,function(){row.removeClass(this.className)});var mHeight=0;row.find(".column-content").each(function(i){var c=$(this);var h=c.height();if(c.parent().hasClass("column-background"))h=h-80+15;if(h>=mHeight)mHeight=h});var cName="";var minHeight=0;$(maxHeights).each(function(i,obj){if(mHeight<obj.height){cName=obj.className;minHeight=obj.minHeight;return}});
row.addClass(cName);if(mHeight<minHeight)mHeight=minHeight;row.css("height",mHeight+"px");row.css("margin-bottom","80px")})};context.rowsToCalculate=[];context.PushRows=function(){var pF=function(){};if(typeof arguments[0]=="function")pF=arguments[0];context.rowsToCalculate.push(pF)};context.CalculateAllRows=function(){$.each(context.rowsToCalculate,function(i){this()})};$().ready(function(){$(".column-row").bind("columnUpdate",function(e){$(this).CalculateRowHeight()});context.PushRows(function(){$(".inline-row").EqualRowHeight()});
context.PushRows(function(){$(".column-row").CalculateRowHeight()});var tRows=function(){$("div.t-row").EqualRowHeight(".t-cell");if($("div.t-row img").length)$(window).bind("load",function(){$("div.t-row").EqualRowHeight(".t-cell")})};context.PushRows(tRows);context.CalculateAllRows();$(window).bind("load",function(){context.CalculateAllRows()}).bind("roundedCorner",function(){context.CalculateAllRows()})})})(jQuery,this);
(function($){$.fn.updateableSelect=function(){return this.each(function(){var key=$(this).attr("name");var currentValue=$.url.param(key)||$(this).find("option[selected]").val();if(currentValue){var opt=$(this).find("option[value="+currentValue+"]");if(opt)try{$(this)[0].selectedIndex=opt[0].index}catch(e){}}$(this).change(function(){var value=$(this).val();var key=$(this).attr("name");$.url.param(key,value);$.url.go()})})};$.fn.updateableLinks=function(){return this.each(function(){var rel=$(this).attr("rel");
rel=rel.substr(0,1)=="?"?rel.substr(1):rel;var query={};$.each(rel.split("&"),function(){var a=this.split("=");var key=a.shift();var value=a.shift();query[key]=value});$.data(this,"query",query);$(this).click(function(e){var query=$.data(this,"query");$.url.param(query).go();e.preventDefault();return false})})};$().ready(function(){$("select.update-url").updateableSelect();$("a.update-url").updateableLinks()})})(jQuery);
(function($){$.toggleBody=function(){var bodyId=arguments[0]||false;if(!bodyId)return;var $body=$("#"+bodyId).find("div.hide-body");var $button=$("#"+bodyId).find("a.hide-body");if(!$body)return;var toDo=arguments[1]||null;var state=null;if(toDo!==null)state=toDo;else state=$body.get(0).style.display=="none"?"show":"hide";if(state=="show"){$button.removeClass("play-down").addClass("play-up");$body.show()}else if(state=="hide"){$button.removeClass("play-up").addClass("play-down");$body.hide()}$.cookie("UniverseShowHideList$"+
bodyId,state,{expires:14});$body.parents(".column-row").CalculateRowHeight()};$.fn.toggleBody=function(){return this.each(function(){var id=$(this).attr("id");if(id){var cookie=$.cookie("UniverseShowHideList$"+id)||"show";$.toggleBody(id,cookie)}})};$().ready(function(){$("a.hide-body").parents(".column-row").toggleBody();$("a.hide-body").click(function(e){e.preventDefault();var id=$(this).parents(".column-row").attr("id");if(id)$.toggleBody(id)})})})(jQuery);
(function($,window,document,undefined){window.RoundedImages=function(){var isIE=$.browser.msie==true,supportStyle=$.support.style==true,supportCanvas=function(){return typeof document.createElement("canvas").getContext=="function"}();if(!supportCanvas)if(document.namespaces["v"]==null){var e=["shape","shapetype","group","background","path","formulas","handles","fill","stroke","shadow","textbox","textpath","imagedata","line","polyline","curve","roundrect","oval","rect","arc","image"],s=document.createStyleSheet(),
j=e.length;while(j--)s.addRule("v\\:"+e[j],"behavior: url(#default#VML); display:inline-block;");s.addRule("var","zoom:1;");document.namespaces.add("v","urn:schemas-microsoft-com:vml")}var setStyle=function(newImg,oldImg){var align=oldImg.getAttribute("align"),$newImg=$(newImg),styleObj={};if(align)switch(align.toLowerCase()){case "left":case "right":styleObj["float"]=align;break;case "bottom":case "top":case "middle":case "absmiddle":case "absbottom":styleObj["verticalAlign"]=align;break}newImg.className=
oldImg.className;$newImg.parent("a").addClass("rounded");$newImg.css(styleObj)};var doRound=function(img,radius){var img=img,radius=radius||20,imgStyle,tmpImg,oldStyle;imgStyle=img&&img.style?img.style:{};if(!img||imgStyle.display=="none")return;img.setAttribute("class",img.className?img.className+" hasbeenrounded":"hasbeenrounded");img.setAttribute("rounded",true);if(supportStyle)oldStyle=img.getAttribute("style");else oldStyle=img.style.cssText;if(!supportCanvas){var width,height;if(img.attributes["width"]&&
img.attributes["width"].specified!=0)width=img.getAttribute("width");if(img.attributes["height"]&&img.attributes["height"].specified!=0)height=img.getAttribute("height");var doRoundInIe=function(){var tmpImg=this,part,vml,inner,vmlStyle;if(!width)width=tmpImg.width;if(!height)height=tmpImg.height;imgStyle.display="none";part=Math.min(width,height)/100;radius=Math.max(Math.min(100,radius/part),0)+"%";vml=document.createElement("<var>");vmlStyle=vml.style;if(supportStyle)vml.setAttribute("style",oldStyle);
else vmlStyle.cssText=oldStyle;vmlStyle.overflow="hidden";vmlStyle.display="inline-block";vmlStyle.width=width+"px";vmlStyle.height=height+"px";vmlStyle.padding="0px";vmlStyle.margin="-1px 0 0 -1px";inner='<v:group style="zoom:1; margin:0; padding:0; position:relative; width:'+width+"px;height:"+height+'px;" coordsize="'+width+","+height+'">'+'<v:roundrect arcsize="'+radius+'" strokeweight="0" filled="t" stroked="f" fillcolor="#ffffff" style="position:absolute; margin:-1px 0 0 -1px;padding:0; width:'+
width+"px;height:"+height+'px;display:block;">'+'<v:fill src="'+tmpImg.src+'" type="frame" />'+"</v:roundrect>"+"</v:group>";vml.innerHTML=inner;img.parentNode.insertBefore(vml,img);setStyle(vml,img)};if(!img.complete){tmpImg=new Image;if(width&&height){tmpImg.width=width;tmpImg.height=height}tmpImg.onload=doRoundInIe;tmpImg.src=img.src}else doRoundInIe.call(img)}else{var canvas=document.createElement("canvas"),x=0,y=0,parent=img.parentNode,width=img.hasAttribute("width")?img.getAttribute("width"):
img.width,height=img.hasAttribute("height")?img.getAttribute("height"):img.height;width=parseInt(width);height=parseInt(height);tmpImg=new Image;tmpImg.onload=function(){var width=this.width,height=this.height;canvas.width=width;canvas.height=height;parent.insertBefore(canvas,img);if(supportStyle)canvas.setAttribute("style",oldStyle);else canvas.style.cssText=oldStyle;var ctx=canvas.getContext("2d");ctx.beginPath();ctx.moveTo(x,y+radius);ctx.lineTo(x,y+height-radius);ctx.quadraticCurveTo(x,y+height,
x+radius,y+height);ctx.lineTo(x+width-radius,y+height);ctx.quadraticCurveTo(x+width,y+height,x+width,y+height-radius);ctx.lineTo(x+width,y+radius);ctx.quadraticCurveTo(x+width,y,x+width-radius,y);ctx.lineTo(x+radius,y);ctx.quadraticCurveTo(x,y,x,y+radius);ctx.closePath();ctx.clip();ctx.fillStyle="rgba(255, 255, 255, 0)";ctx.fillRect(x,y,width,height);ctx.drawImage(tmpImg,x,y,width,height);setStyle(canvas,img)};if(width>0&&height>0){tmpImg.width=width;tmpImg.height=height}imgStyle.display="none";tmpImg.src=
img.src}};var api=function(){return api.round.apply(null,arguments)};api.round=function(){doRound(arguments[0],arguments[1])};return api}();$().ready(function(){var images=$("img.rounded, img.rounded-tiny, img.rounded-slideshow"),i=images.length,imageRadius={rounded:20,"rounded-tiny":8,"rounded-slideshow":32},rFunc;if(i>0){rFunc=window.RoundedImages;while(i--){var img=images[i],clsName=img.className?img.className.split(" ")[0]:"rounded";if(img)rFunc(img,imageRadius[clsName])}}})})(jQuery,window,document);
(function($){$.fn.ajaxLoad=function(){var arg=arguments[0];var toDo="show";var options={};switch(typeof arg){case "string":toDo=arg;break;case "object":default:$.extend(arg,options);break}return $(this).each(function(){var ele=$(this).parent();var overlay=ele.find(".overlay");if(overlay.length!=1){overlay.remove();overlay=$('<div class="overlay column-round"><b><i /></b><i><b /></i><em /><div class="throbber"></div></div>');ele.append(overlay)}if(toDo)switch(toDo){default:case "show":overlay.show();
var currPos=ele.css("position");if(currPos!="absolute"||currPos!="relative")ele.css("position","relative");break;case "hide":case "stop":overlay.hide().remove();break}})}})(jQuery);if(window.popupLanguage===undefined)window.popupLanguage={ok:"Ok",cancel:"Cancel",attention:"Attention"};
(function($,context){context.alreadyPopped=false;context.Popup=function(){if(context.alreadyPopped===true)return;var self=this;var text="";var popupLanguage=window.popupLanguage;var options={type:"confirm",closeButton:true,animate:false,wide:false,buttons:[{value:popupLanguage.ok},{value:popupLanguage.cancel}]};var que=[];if(arguments&&arguments.length>0)$.each(arguments,function(i,arg){switch(typeof arg){default:case "string":text=arg;break;case "object":if(arg instanceof jQuery)text=arg;else options=
$.extend(options,arg);break;case "function":que.push(arg);break}});if(options.functions)if(typeof options.functions=="array")$.extend(options.functions,que);else que.push(options.functions);var html=$('<div id="PopupOverlay"><div id="Popup"><div id="PopupContent"><h1>'+popupLanguage.attention+'</h1><div id="PopupText"></div></div></div></div>');html.find("#Popup").addClass(options.type+(options.wide?" wide":""));var closeButton=$('<a href="#" id="PopupClose"></a>').bind("click",function(e){e.preventDefault();
self.fireFunction("last")});var buttonBar=$('<div id="PopupButtonBar"></div>');if(options.closeButton===true)html.find("#PopupContent").prepend(closeButton);var icon=$('<span id="PopupIcon" class="popupIcon"></span>');if(options.icon!==false)html.find("#PopupContent").prepend(icon);if(options.buttons&&options.buttons.length>0){$.each(options.buttons,function(i,btn){var txt=typeof btn=="object"?btn.value:btn;var buttonId="PopupButton$"+i;var button=$('<a href="#" id="'+buttonId+'" />').html(txt).wrapInner("<span />").addClass("button small").bind("click",
function(e){e.preventDefault();self.fireFunction(i)}).appendTo(buttonBar)});html.find("#Popup").append(buttonBar)}html.find("#PopupText").html(text);this.fireFunction=function(){self.close();var arg=arguments[0];var fN=0;if(typeof arg=="string")if(arg=="last")fN=que.length-1;else{if(arg=="first")fN=0}else fN=arg;var func=que[fN];if(typeof func=="function")func.call()};this.close=function(){if(options.animate===true)html.fadeOut("fast",function(){self.clean()});else self.clean();return self};this.init=
function(){context.alreadyPopped=true;self.clean();$("body").append(html);window.ResetCufon(html);if(options.animate===true)html.hide().fadeIn("fast");$(window).bind("keypress.popup",function(e){var k=e.keyCode;if(k)if(k==27)self.fireFunction("last");else if(k==13)self.fireFunction("first")});return self};this.clean=function(){context.alreadyPopped=false;$(window).unbind("keypress.popup");$("#PopupOverlay").remove();return self};this.init()};context.alert=function(){var options={type:"alert",closeButton:true,
icon:"alert",buttons:[popupLanguage.ok]};var text=$("<p />").html(arguments[0]);var popup=new Popup(options,text)}})(jQuery,this);if(!!window.top.allowIframe&&window.top&&window.top.location&&window.top.location!=window.location)window.top.location=window.location;
if(!("console"in window)||!("firebug"in console)){var names=["log","debug","info","warn","error","assert","dir","dirxml","group","groupEnd","time","timeEnd","count","trace","profile","profileEnd"];window.console={};for(var i=0;i<names.length;++i)window.console[names[i]]=function(){}}
(function($){$().ready(function(){$("a.disabled").click(function(e){e.preventDefault()});$("ul#SectionMenu").find("ul li:nth-child(even)").addClass("even");$("table > tbody > tr:nth-child(even)").addClass("even");$("table > tbody > tr:nth-child(odd)").addClass("odd");$("div.t-list > div.t-row:nth-child(even)").addClass("even");$("div.t-list > div.t-row:nth-child(odd)").addClass("odd");$("a.xLink").live("click",function(e){var link=$(this);e.preventDefault();this.blur();var texts=this.rel.split(" ");
var rel=$(texts[0]);var html=null;if(link.find(".popupContent").length>0)html=link.find(".popupContent").clone(true);else if(rel.length>0)html=rel.clone(true);else html="<p>"+this.title+"</p>";var linkHref=this.href;var options={type:"info"};var numWords=$(html).text().split(" ").length;if(numWords>20)options.wide=true;var popup=new Popup(html,options,function(){$.url.setUrl(linkHref).go()},function(){})})})})(jQuery);
(function($){$().ready(function(){$("a.ModalWindowLink").bind("mousedown",function(){window.allowIframe=true}).colorbox({iframe:true,width:890,height:595})})})(jQuery);var searchURL="http://search.lego.com";function doSearch(){str=document.getElementById("h-searchFormTextInput").value;document.getElementById("h-searchFormTextInput").value="";location.href=searchURL+"/searchResults.asp?q="+escape(str)}
function submitsearch(e){if(e.keyCode=="13"){if(e.preventDefault){e.preventDefault();e.stopPropagation()}try{window.event.returnValue=false}catch(e){}doSearch()}}function XLink(url,friendlyName){XLinkLU(url,friendlyName)}
function XLinkLU(url,friendlyName){var lang="<%# HelperFunctions.GetLang()%>";if(parseInt(url).toString()=="NaN")var qs="xurl="+escape(url)+"&xfriendlyName="+escape(friendlyName);else var qs="id="+url;var pathToPopUp="/xlink.aspx?"+qs+"&art=&langdir="+lang;window.open(pathToPopUp,"ExternalLink","status=0,toolbar=0,scrollbars=0,resizable=0,left=200,top=100,width=400,height=385")}
function sendToFriend(item){var url=$("#hiddenLink").attr("href");if(url.indexOf("http")>-1)$.url.setUrl(url);else{url=url.split("?")[0];$.url.setPath(url)}$.url.param("contentid",item);var newscr=$.url.toString();$.url.reset();$("#hiddenLink").attr("href",newscr);popup()}function querySt(ji){hu=window.location.search.substring(1);gy=hu.split("&");for(i=0;i<gy.length;i++){ft=gy[i].split("=");if(ft[0]==ji)return ft[1]}return""}
function popup(){$("#hiddenLink").fancybox({type:"ajax",scrolling:"no",centerOnScroll:true,showCloseButton:true,hideOnContentClick:false}).trigger("click")};
