containerId = buildContainerId();
fWidth = $selectElement.outerWidth();
isRTL = LocaleInfo.getCurrentLocale().isRTL();
String cssClasses = isRTL ? css.chznContainer() + " " + css.chznRtl() : css.chznContainer();
GQuery containerTemp =
$(ChozenTemplate.templates.container(containerId, cssClasses).asString()).width(fWidth);
if (isMultiple) {
containerTemp.html(ChozenTemplate.templates.contentMultiple(css.chznChoices(),
css.searchField(), defaultText, css.defaultClass(), css.chznDrop(), css.chznResults())
.asString());
} else {
containerTemp.html(ChozenTemplate.templates.contentSingle(css.chznSingle(),
css.chznDefault(), defaultText, css.chznDrop(), css.chznSearch(), css.chznResults())
.asString());
}
// insert container after the select elements