/*
	Copyright (c) 2004-2008, The Dojo Foundation
	All Rights Reserved.

	Licensed under the Academic Free License version 2.1 or above OR the
	modified BSD license. For more information on Dojo licensing, see:

		http://dojotoolkit.org/book/dojo-book-0-9/introduction/licensing
*/


if(!dojo._hasResource["dojoc.sandbox.rounded.Rounded"]){dojo._hasResource["dojoc.sandbox.rounded.Rounded"]=true;dojo.provide("dojoc.sandbox.rounded.Rounded");dojo.require("dijit._Widget");dojo.require("dijit._Templated");dojo.declare("dojoc.sandbox.rounded.Rounded",[dijit._Widget,dijit._Templated],{templateString:"<div class=\"Rounded\" dojoAttachPoint=\"outerNode\">\n\t<div class=\"RoundedContent\" dojoAttachPoint=\"roundedContent\">\n\t    <div class=\"RoundedTop\" dojoAttachPoint=\"roundedTop\"></div>\n\t    \t<div dojoAttachPoint=\"contentNode\">\n\t\t\t\t<div dojoAttachPoint=\"containerNode\"></div>\n\t\t\t</div>\n\t\t</div>\n\t<div class=\"RoundedBottom\" dojoAttachPoint=\"roundedBottom\"><div dojoAttachPoint=\"roundedBottomDiv\"></div></div>\n</div>\n",bgImg:"",bgImgAlt:"",radius:10,setHeight:true,postCreate:function(){var _1="100%";if(this.setHeight){_1=dojo.style(this.outerNode,"height")-(2*this.radius)+"px";}dojo.style(this.contentNode,{"height":_1,"width":dojo.style(this.outerNode,"width")-(2*this.radius)+"px"});if(this.setHeight){dojo.style(this.outerNode,_1,dojo.style(this.outerNode,"height")-(this.radius)+"px");}dojo.style(this.outerNode,{"marginLeft":this.radius+"px","marginBottom":this.radius+"px","width":dojo.style(this.outerNode,"width")-this.radius+"px"});var _2=(this.bgImgAlt.length&&dojo.isIE<7);dojo.forEach(["roundedContent","roundedTop","roundedBottom","roundedBottomDiv"],function(_3){dojo.style(this[_3],"backgroundImage","url("+(_2?this.bgImgAlt:this.bgImg)+")");if(_3=="roundedContent"){dojo.style(this[_3],{"paddingTop":this.radius+"px","paddingRight":this.radius+"px"});}else{if(_3=="roundedTop"){dojo.style(this[_3],{"width":this.radius+"px","marginLeft":-this.radius+"px"});}else{if(_3=="roundedBottom"){dojo.style(this[_3],"height",this.radius+"px");}else{if(_3=="roundedBottomDiv"){dojo.style(this[_3],{"height":this.radius+"px","width":this.radius+"px","marginLeft":-this.radius+"px"});}}}}},this);}});}
