/*!@license
* Infragistics.Web.ClientUI shared localization resources 13.1.20131.2523
*
* Copyright (c) 2011-2014 Infragistics Inc.
*
* http://www.infragistics.com/
*
*/
(function($){$.ig=$.ig||{};if(!$.ig.SharedLocale){$.ig.SharedLocale={};$.extend($.ig.SharedLocale,{locale:{popoverOptionChangeNotSupported:"Changing the following option after igPopover has been initialized is not supported:"}})}})(jQuery);/*!@license
 * Infragistics.Web.ClientUI jQuery Shared 13.1.20131.2523
 *
 * Copyright (c) 2011-2014 Infragistics Inc.
 *
 * http://www.infragistics.com/
 *
 * Depends on:
 *	jquery-1.4.2.js
 *	jquery.ui.core.js
 *	jquery.ui.widget.js
 *	infragistics.util.js
 */
(function($){$.widget("ui.igLoading",{options:{cssClass:null,includeVerticalOffset:true},_indicator:null,_create:function(){var offset,css;css=this.options.cssClass===null?"ui-igloadingmsg":this.options.cssClass;this._hgrid=this.element.closest(".ui-iggrid-root").closest(".ui-iggrid");if(this.element.children("."+css).length===0){this._indicator=$("<span></span>").appendTo("body").attr("id",this.element[0].id+"_loading").addClass(css);offset=this.element.offset();this.refreshPos()}this._yShift=this._indicator?Math.round(this._indicator.height()/2):0},indicatorElement:function(){return this._indicator},indicator:function(){return this},show:function(refresh){if(refresh!==false){this.refreshPos()}if(this._resId){clearInterval(this._resId)}this._resId=setInterval($.proxy(this._resizeContainer,this),300);this._indicator.css("display","").css("visibility","visible")},hide:function(){this._indicator.css("display","none").css("visibility","hidden");clearInterval(this._resId);this._resId=null},_resizeContainer:function(){var offset=this.element.offset();if(offset.top+this.element.innerHeight()/2-this._yShift!==this._indicator.css("top")){this.refreshPos()}},refreshPos:function(){var offset=this.element.offset(),top=offset.top+this.element.innerHeight()/2-this._yShift,left=offset.left+this.element.innerWidth()/2,verticalOffset;if(this._hgrid.length>0&&top>this._hgrid.offset().top+this._hgrid.height()){return}if(this._hgrid.length>0&&left>this._hgrid.offset().left+this._hgrid.width()){return}if(this.options.includeVerticalOffset&&top>$(window).height()){verticalOffset=($(window).height()-offset.top-$(window).scrollTop())/2;top=$(window).height()-verticalOffset<offset.top?offset.top+verticalOffset:$(window).height()-verticalOffset}this._indicator.css("left",left).css("top",top)},destroy:function(){clearInterval(this._resId);this._indicator.remove()}});$.extend($.ui.igLoading,{version:"13.1.20131.2523"});$.widget("ui.igSlider",$.ui.mouse,{options:{animate:false,max:100,min:0,orientation:"horizontal",step:1,value:0,bookmarks:[{value:0,title:"",disabled:false,css:""}],showBookmarkTitle:true,syncHandleWithBookmark:true},css:{baseClasses:"ui-igslider ui-widget ui-widget-content ui-corner-all",horizontalOrientationClass:"ui-igslider-horizontal",verticalOrientationClass:"ui-igslider-vertical",sliderDisabledClass:"ui-igslider-disabled ui-disabled",handleClass:"ui-igslider-handle",bookmarkClass:"ui-igslider-bookmark",bookmarkDisabledClass:"ui-igslider-bookmark-disabled",bookmarkTooltipClass:"ui-igslider-bookmark-tooltip"},events:{start:"start",slide:"slide",stop:"stop",change:"change",bookmarkHit:"bookmarkhit",bookmarkClick:"bookmarkclick"},_numpages:5,widget:function(){return this.element},_createWidget:function(options,element){this.options.bookmarks=[];$.Widget.prototype._createWidget.apply(this,arguments)},_create:function(){var o=this.options,self=this,css=this.css;this._keySliding=false;this._mouseSliding=false;this._animateOff=true;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass(css.baseClasses);if(o.disabled){this.element.addClass(css.sliderDisabledClass)}if($(".ui-igslider-handle",this.element).length===0){$("<a href='#'></a>").appendTo(this.element).addClass(css.handleClass)}this.handles=$(".ui-igslider-handle",this.element).addClass("ui-state-default"+" ui-corner-all").bind({click:function(event){event.preventDefault()},mouseover:function(){if(!o.disabled){$(this).addClass("ui-state-hover")}},mouseout:function(){$(this).removeClass("ui-state-hover")},focus:function(){if(!o.disabled){$(".ui-igslider .ui-state-focus").removeClass("ui-state-focus");$(this).addClass("ui-state-focus")}else{$(this).blur()}},blur:function(){$(this).removeClass("ui-state-focus")},keydown:function(event){var ret=true,index=$(this).data("index.ui-igslider-handle"),allowed,curVal,newVal,step;if(self.options.disabled){return}switch(event.keyCode){case $.ui.keyCode.HOME:case $.ui.keyCode.END:case $.ui.keyCode.PAGE_UP:case $.ui.keyCode.PAGE_DOWN:case $.ui.keyCode.UP:case $.ui.keyCode.RIGHT:case $.ui.keyCode.DOWN:case $.ui.keyCode.LEFT:ret=false;if(!self._keySliding){self._keySliding=true;$(this).addClass("ui-state-active");allowed=self._start(event,index);if(allowed===false){return}}break}step=self.options.step;curVal=newVal=self.value();switch(event.keyCode){case $.ui.keyCode.HOME:newVal=self.options.min;break;case $.ui.keyCode.END:newVal=self.options.max;break;case $.ui.keyCode.PAGE_UP:newVal=self._trimValue(curVal+(self.options.max-self.options.min)/this._numpages);break;case $.ui.keyCode.PAGE_DOWN:newVal=self._trimValue(curVal-(self.options.max-self.options.min)/this._numpages);break;case $.ui.keyCode.UP:case $.ui.keyCode.RIGHT:if(curVal===self.options.max){return}newVal=self._trimValue(curVal+step);break;case $.ui.keyCode.DOWN:case $.ui.keyCode.LEFT:if(curVal===self.options.min){return}newVal=self._trimValue(curVal-step);break}self._slide(event,index,newVal);return ret},keyup:function(event){var index=$(this).data("index.ui-igslider-handle");if(self._keySliding){self._keySliding=false;self._stop(event,index);self._change(event,index);$(this).removeClass("ui-state-active")}}}).each(function(i){$(this).data("index.ui-igslider-handle",i)});this.handle=this.handles.eq(0);this._renderBookmarks();this._refreshValue();this._animateOff=false},_renderBookmarks:function(){if(this.options.bookmarks&&this.options.bookmarks.length>0){var len=this.options.bookmarks.length,i=0,o=this.options,css=this.css,mark,self=this;for(i;i<len;i++){mark=o.bookmarks[i];$("<a href='#'></a>").appendTo(this.element).data("index.ui-igslider-bookmark",i).addClass(mark.disabled?css.bookmarkDisabledClass:css.bookmarkClass).addClass(mark.css&&mark.css.length>0?mark.css:"").css("left",o.min!==o.max?(mark.value-o.min)/(o.max-o.min)*100+"%":"0%")}this.bookmarks=$(".ui-igslider-bookmark",this.element).addClass("ui-state-default").bind({mousedown:function(event){var noCancel=true,bookmarkIndex=$(this).data("index.ui-igslider-bookmark");event.preventDefault();event.stopPropagation();noCancel=self._bookmarkClicked(event,bookmarkIndex);if(self.options.syncHandleWithBookmark&&noCancel){self._slide(event,0,self.options.bookmarks[bookmarkIndex].value)}},mouseover:function(event){if(!o.disabled){$(this).addClass("ui-state-hover");if(self.options.showBookmarkTitle){self._showBookmarkTitle($(this),event)}}},mouseout:function(){if(!o.disabled){$(this).removeClass("ui-state-hover");if(self.options.showBookmarkTitle){self._hideBookmarkTitle($(this))}}},click:function(event){event.preventDefault()}});this._createBookmarkTooltip();this._buildBookmarkHit()}},destroy:function(){this.handles.remove();this.clearBookmarks();this.element.removeClass(this.css.baseClasses+" ui-igslider-horizontal"+" ui-igslider-vertical"+" ui-igslider-disabled").removeData("slider").unbind(".slider");this._mouseDestroy();return this},_id:function(suffix){return this.element[0].id+suffix},_showBookmarkTitle:function(bookmark,browserEvent){var tooltip=$("#"+this._id("_tooltip")),title=this.options.bookmarks[bookmark.data("index.ui-igslider-bookmark")].title;if(title&&title.length>0){tooltip.igTooltip("option","text",title);tooltip.css("top",browserEvent.pageY-tooltip.outerHeight()-5).css("left",browserEvent.pageX-tooltip.width()/2+bookmark.width()/2).show()}},_hideBookmarkTitle:function(bookmark){$("#"+this._id("_tooltip")).hide()},_createBookmarkTooltip:function(){var html='<div id="'+this._id("_tooltip")+'" class="'+this.css.bookmarkTooltipClass+'"></div>';$(html).appendTo($(document.body)).igTooltip({arrowLocation:"bottom"}).hide()},clearBookmarks:function(){if(this.bookmarks){this.bookmarks.remove()}},_mouseCapture:function(event){var o=this.options,position,normValue,index=0,handle=this.handles.eq(index),self=this,offset,mouseOverHandle;if(o.disabled){return false}this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();position={x:event.pageX,y:event.pageY};normValue=this._normValueFromMouse(position);this._mouseSliding=true;self._handleIndex=index;handle.addClass("ui-state-active");if(!$.ig.util.isOpera){handle.focus()}offset=handle.offset();mouseOverHandle=!$(event.target).parents().andSelf().is(".ui-igslider-handle");this._clickOffset=mouseOverHandle?{left:0,top:0}:{left:event.pageX-offset.left-handle.width()/2,top:event.pageY-offset.top-handle.height()/2-(parseInt(handle.css("borderTopWidth"),10)||0)-(parseInt(handle.css("borderBottomWidth"),10)||0)+(parseInt(handle.css("marginTop"),10)||0)};this._slide(event,index,normValue);this._animateOff=true;this._mouseUpHandler=function(event){return self._mouseStop(event)};$(document).bind("mouseup."+this.widgetName,this._mouseUpHandler);return true},_mouseStart:function(event){$(document).unbind("mouseup."+this.widgetName,this._mouseUpHandler);return this._start(event,this._handleIndex)},_mouseDrag:function(event){var position={x:event.pageX,y:event.pageY},normValue=this._normValueFromMouse(position);this._slide(event,this._handleIndex,normValue);return false},_mouseStop:function(event){var self=this;this.handles.removeClass("ui-state-active");setTimeout(function(){self._mouseSliding=false},1e3);this._stop(event,this._handleIndex);this._change(event,this._handleIndex);this._handleIndex=null;this._clickOffset=null;this._animateOff=false;return false},_detectOrientation:function(){var o=this.options,css=this.css;if(o.orientation==="vertical"){this.orientation="vertical";this.element.removeClass(css.horizontalOrientationClass).addClass(css.verticalOrientationClass)}else{this.orientation="horizontal";this.element.removeClass(css.verticalOrientationClass).addClass(css.horizontalOrientationClass)}},_normValueFromMouse:function(position){var pixelTotal,pixelMouse,percentMouse,valueTotal,valueMouse;if(this.orientation==="horizontal"){pixelTotal=this.elementSize.width;pixelMouse=position.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{pixelTotal=this.elementSize.height;pixelMouse=position.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}percentMouse=pixelMouse/pixelTotal;if(percentMouse>1){percentMouse=1}if(percentMouse<0){percentMouse=0}if(this.orientation==="vertical"){percentMouse=1-percentMouse}valueTotal=this.options.max-this.options.min;valueMouse=this.options.min+percentMouse*valueTotal;return this._trimValue(valueMouse)},_start:function(event,index){var uiHash={handle:this.handles[index],value:this.value()};return this._trigger(this.events.start,event,uiHash)},_slide:function(event,index,newVal){var allowed;if(newVal!==this.value()){allowed=this._trigger(this.events.slide,event,{handle:this.handles[index],value:newVal});if(allowed!==false){this.value(newVal)}}},_stop:function(event,index){var uiHash={handle:this.handles[index],value:this.value()};this._trigger(this.events.stop,event,uiHash)},_change:function(event,index){if(!this._keySliding&&!this._mouseSliding){var uiHash={handle:this.handles[index],value:this.value()};this._trigger(this.events.change,event,uiHash);this._checkBookmarkHit(uiHash.value,event);if(uiHash.value===this.options.max&&this._marksHit&&this._marksHit.length===0){this._buildBookmarkHit()}}},_checkBookmarkHit:function(currentValue,event){if(this._marksHit&&this._marksHit.length>0&&currentValue>=this._marksHit[0].value){var index=this._marksHit[0].index;this._marksHit.shift();this._bookmarkHit(event,index)}},_buildBookmarkHit:function(){var b=this.options.bookmarks||[],i=b.length-1;this._marksHit=[];for(i;i>=0;i--){if(!b[i].disabled){this._marksHit.push({value:b[i].value,index:i})}}this._marksHit.sort(this._sortBookmarksJSON);this._marksHit=$.extend(true,[],this._marksHit)},_sortBookmarksJSON:function(a,b){return a.value-b.value},_bookmarkClicked:function(event,index){var uiHash={bookmarkElement:this.bookmarks[index],bookmark:this.options.bookmarks[index]};return this._trigger(this.events.bookmarkClick,event,uiHash)},_bookmarkHit:function(event,index){var uiHash={bookmarkElement:this.bookmarks[index],bookmark:this.options.bookmarks[index]};if(uiHash.bookmarkElement){this._trigger(this.events.bookmarkHit,event,uiHash)}},value:function(newValue){if(arguments.length){this.options.value=this._trimValue(newValue);this._refreshValue();this._change(null,0)}return this._value()},_setOption:function(key,value){$.Widget.prototype._setOption.apply(this,arguments);switch(key){case"disabled":if(value){this.handles.filter(".ui-state-focus").blur();this.handles.removeClass("ui-state-hover");this.handles.attr("disabled","disabled");this.element.addClass("ui-disabled")}else{this.handles.removeAttr("disabled");this.element.removeClass("ui-disabled")}break;case"orientation":this._detectOrientation();this._refreshValue();break;case"value":if(this._mouseSliding===true){return}this._animateOff=true;this._refreshValue();this._change(null,0);this._animateOff=false;break;case"bookmarks":this.clearBookmarks();this._renderBookmarks();break}},_value:function(){return this._trimValue(this.options.value)},_trimValue:function(val){if(val<this.options.min){return this.options.min}if(val>this.options.max){return this.options.max}var step=this.options.step>0?this.options.step:1,valModStep=val%step,alignValue=val-valModStep;if(Math.abs(valModStep)*2>=step){alignValue+=valModStep>0?step:-step}return parseFloat(alignValue.toFixed(5))},_normPercentValue:function(val){var decrease=0,retVal=val;if(this.orientation==="vertical"){decrease=(this.handle.outerHeight()/this.element.outerHeight()).toFixed(2)*100}if(val-decrease>0){retVal=val-decrease}return retVal},_refreshValue:function(){var o=this.options,control=this,animate=!this._animateOff?o.animate:false,_set={},value=this.value(),valueMin=this.options.min,valueMax=this.options.max,valPercent=valueMax!==valueMin?(value-valueMin)/(valueMax-valueMin)*100:0;_set[control.orientation==="horizontal"?"left":"bottom"]=this._normPercentValue(valPercent)+"%";this.handle.stop(1,1)[animate?"animate":"css"](_set,o.animate)}});$.extend($.ui.igSlider,{version:"13.1.20131.2523"});$.widget("ui.igProgressBar",{options:{animate:false,animateTimeout:100,max:100,min:0,orientation:"horizontal",value:0,width:"0px",height:"0px",range:false,queue:true,endValue:100},css:{baseClasses:"ui-igprogressbar ui-widget ui-widget-content ui-corner-all",horizontalOrientationClass:"ui-igprogressbar-horizontal",verticalOrientationClass:"ui-igprogressbar-vertical",disabledClass:"ui-igprogressbar-disabled ui-disabled",progressRangeClass:"ui-igprogressbar-range ui-widget-header ui-corner-all"},events:{change:"change"},_animationOff:true,widget:function(){return this.element},_detectOrientation:function(){var css=this.css;if(this.options.orientation==="vertical"){this.orientation="vertical";this.element.removeClass(css.horizontalOrientationClass).addClass(css.verticalOrientationClass)}else{this.orientation="horizontal";this.element.removeClass(css.verticalOrientationClass).addClass(css.horizontalOrientationClass)}},_id:function(suffix){return this.element[0].id+suffix},_create:function(){var o=this.options,css=this.css;this._detectOrientation();this.element.addClass(css.baseClasses);if(o.disabled){this.element.addClass(css.disabledClass)}if(o.width!=="0px"){this.element.css("width",o.width)}if(o.height!=="0px"){this.element.css("height",o.height)}if(o.orientation==="horizontal"){$('<div id="'+this._id("_progress")+'" class="'+css.progressRangeClass+'" style="height:100%; top:0px; left:0%; width:0%;"></div>').appendTo(this.element)}else{$('<div id="'+this._id("_progress")+'" class="'+css.progressRangeClass+'" style="height:0%; bottom:0%; left:0px; width:100%;"></div>').appendTo(this.element)}this._refreshValue()},destroy:function(){this.element.removeClass("ui-igprogressbar"+" ui-igprogressbar-horizontal"+" ui-igprogressbar-vertical"+" ui-igprogressbar-disabled"+" ui-widget"+" ui-widget-content"+" ui-corner-all").removeData("igProgressBar").unbind(".igProgressBar");$("#"+this._id("_progress")).remove();return this},_change:function(event){var uiHash={value:this.value()};this._trigger(this.events.change,event,uiHash)},value:function(newValue){if(arguments.length){this.options.value=this._trimValue(newValue);this._refreshValue();this._change(null)}return this.options.value},_setOption:function(key,value){$.Widget.prototype._setOption.apply(this,arguments);var o=this.options;switch(key){case"disabled":if(value){this.element.addClass(this.css.disabledClass)}else{this.element.removeClass(this.css.disabledClass)}break;case"orientation":this._detectOrientation();this._refreshValue();break;case"value":this._animationOff=true;o.value=this._trimValue(value);this._refreshValue();this._change(null);this._animationOff=false;break;case"endValue":o.endValue=this._trimValue(value);this._refreshValue();break;case"max":if(o.endValue>o.max){o.endValue=o.max;this._refreshValue()}break;case"width":this.element.css("width",value);break;case"height":this.element.css("height",value);break;case"animate":o.animate=value;break;case"animateTimeout":o.animateTimeout=value;break;default:break}},_trimValue:function(val){if(val<this.options.min){return this.options.min}if(val>this.options.max){return this.options.max}return parseInt(val,10)},_refreshValue:function(){var o=this.options,additionalOptions={duration:o.animateTimeout,queue:o.queue},value=o.value,valueMin=o.min,valueMax=o.max,valueEnd=o.endValue,valPercent=valueMax!==valueMin?(value-valueMin)/(valueMax-valueMin)*100:0,valueEndPercent=value!==valueEnd?(valueEnd-value)/(valueMax-valueMin)*100:0,progressBar=$("#"+this._id("_progress"));if(o.range){if(o.orientation==="horizontal"){progressBar.css("left",valPercent+"%").css("width",valueEndPercent+"%")}else{progressBar.css("bottom",valPercent+"%").css("height",valueEndPercent+"%")}}else{if(o.animate===true){if(o.orientation==="horizontal"){if(progressBar[0].style.width==="0%"){progressBar.css({width:"0px"})}if(progressBar.is(":hidden")===false){progressBar.animate({width:valPercent+"%"},additionalOptions)}else{progressBar.css("width",valPercent+"%")}}else{if(progressBar[0].style.height==="0%"){progressBar.css({height:"0px"})}if(progressBar.is(":hidden")===false){progressBar.animate({height:valPercent+"%"},o.animateTimeout)}else{progressBar.animate({height:valPercent+"%"},o.animateTimeout)}}}else{if(o.orientation==="horizontal"){progressBar.css("width",valPercent+"%")}else{progressBar.css("height",valPercent+"%")}}}}});$.extend($.ui.igProgressBar,{version:"13.1.20131.2523"});$.widget("ui.igButton",{options:{width:null,height:null,link:{href:null,target:null,title:null},labelText:"",centerLabel:false,css:null,onlyIcons:false,icons:{primary:null,secondary:null},title:false},_id:function(suffix){return this.element[0].id+suffix},_create:function(){var self=this,o=self.options,e=this.element,inputType,css={buttonClassIE6:"ui-ie6",buttonClasses:"ui-button ui-igbutton ui-widget ui-widget-content ui-corner-all ui-state-default",buttonHoverClasses:"ui-state-hover",buttonActiveClasses:"ui-state-active",buttonFocusClasses:"ui-state-focus",buttonLabelClass:"ui-button-text",buttonDisabledClass:"ui-state-disabled",buttonPrimaryIconClass:"ui-button-icon-primary ui-icon",buttonMainElementPrimaryIconClass:" ui-button-text-icon-primary",buttonMainElementSecondaryIconClass:" ui-button-text-icon-secondary",buttonSecondaryIconClass:"ui-button-icon-secondary ui-icon",buttonIconsOnly:"ui-button-icons-only",buttonIconOnly:"ui-button-icon-only",buttonIcons:"ui-button-text-icons",buttonTextOnlyClass:"ui-button-text-only"};this._attached=false;o.css=$.extend(css,o.css);self._getInitValues();if(e.is("div")){self._renderDivButton()}else if(e.is("a")){self._renderAHref()}else if(e.is("input")){inputType=e.attr("type").toUpperCase();if(inputType==="BUTTON"||inputType==="SUBMIT"||inputType==="RESET"){self._renderInput()}else{return}}else if(e.is("button")){self._renderButton()}else{return}if(o.width!==null){self._setWidth(o.width)}if(o.height!==null){self._setHeight(o.height)}e.addClass(o.css.buttonClasses).addClass(o.css.buttonDefaultClasses);if(o.centerLabel===true){self._centerLabel()}if(o.disabled){self._disableButton()}else{self._enableButton()}self._setOnlyIcons();e.attr("role","button");e.attr("aria-disabled","false");self._attachButtonEvents();self.setTitle(o.title);return this},setTitle:function(title){var e=this.element;if(title===false){e.removeAttr("title")}else{e.attr("title",title)}},widget:function(){return this.element},_isRedirect:function(){return this.options.link.href!==null},_renderDivButton:function(){this._setLabel()},_renderAHref:function(){this._setLinkOptions(true);this._setLabel()},_renderInput:function(){var e=this.element;e.attr("value",this.options.labelText)},_renderButton:function(){this._setLabel()},_disableButton:function(){var self=this,e=self.element;e.addClass(self.options.css.buttonDisabledClass);if(e.is("a")===true){e.removeAttr("href");e.removeAttr("target");e.removeAttr("title")}else{e.attr("disabled","true")}},_enableButton:function(){var self=this,e=self.element,o=this.options;if(e.hasClass(o.css.buttonDisabledClass)){e.removeClass(o.css.buttonDisabledClass)}e.removeAttr("disabled");if(e.is("a")===true){self._setLinkOptions(true)}},_setLabel:function(){var e=this.element,o=this.options,icons=o.icons,css=o.css,html="",isSetPrimary=this._isSetPrimaryIcon(),isSetSecondary=this._isSetSecondaryIcon(),labelText=o.labelText===null||o.labelText===""?e.text():o.labelText;e.attr("title",o.labelText);if(e.is("input")){e.attr("value",o.labelText);return}if(isSetPrimary){html+='<span class="'+css.buttonPrimaryIconClass+" "+icons.primary+'" id="'+this._id("_picn")+'"></span>'}html+='<span class="'+o.css.buttonLabelClass+'" id="'+this._id("_lbl")+'">'+labelText+"</span>";if(isSetSecondary){html+='<span class="'+css.buttonSecondaryIconClass+" "+icons.secondary+'" id="'+this._id("_sicn")+'"></span>'}if(isSetPrimary&&isSetSecondary&&!o.onlyIcons){e.addClass(css.buttonIcons)}else if(o.onlyIcons){this._setOnlyIcons()}else if(isSetPrimary){e.addClass(css.buttonMainElementPrimaryIconClass)}else if(isSetSecondary){e.addClass(css.buttonMainElementSecondaryIconClass)}else{e.addClass(css.buttonTextOnlyClass)}e.html(html)},_setOnlyIcons:function(){var e=this.element,css=this.options.css;if(this.options.onlyIcons===false){if(e.hasClass(css.buttonIconsOnly)){e.removeClass(css.buttonIconsOnly)}if(e.hasClass(css.buttonIconOnly)){e.removeClass(css.buttonIconOnly)}if(this._isSetPrimaryIcon()&&this._isSetSecondaryIcon()){e.addClass(css.buttonIcons)}}else{if(this._isSetPrimaryIcon()&&this._isSetSecondaryIcon()){e.addClass(css.buttonIconsOnly)}else{e.addClass(css.buttonIconOnly)}}},_setLinkOptions:function(isAHref){var self=this,e=self.element,o=this.options;if(isAHref){if(o.link!==null&&o.link.href!==null){e.attr("href",o.link.href)}else{e.removeAttr("href")}if(o.link!==null&&o.link.target!==null){e.attr("target",o.link.target)}else{e.removeAttr("target")}if(o.link!==null&&o.link.title!==null){e.attr("title",o.link.title)}else{e.removeAttr("title")}}},_setWidth:function(value){var e=this.element;if(value===null){e.css("width","")}else{e.css("width",value)}},_setHeight:function(value){var e=this.element;if(value===null){e.css("height","")}else{e.css("height",value)}},_setOption:function(key,val){var e=this.element,self=this;$.Widget.prototype._setOption.apply(this,[key,val]);switch(key){case"width":self._setWidth(val);break;case"height":self._setHeight(val);break;case"link":self._setLinkOptions(e.is("a")===true);break;case"disabled":val=Boolean(val);if(val===true){self._disableButton()}else{self._enableButton()}break;case"labelText":self._setLabel();break;case"centerLabel":val=Boolean(val);if(val){self._centerLabel()}else{self._removeCenterLabel()}break;case"onlyIcons":val=Boolean(val);self._setOnlyIcons();break;case"icons":self._setLabel();break;case"title":self.setTitle(val);break;default:break}},_centerLabel:function(){var self=this,e=self.element,l=$("#"+self._id("_lbl")),left=(e.width()-l.width())/2,top=(e.height()-l.height())/2;l.css({position:"relative",top:top+"px",left:left+"px"})},_removeCenterLabel:function(){var self=this,l=$("#"+self._id("_lbl"));if(l.length>0){l.css({position:"",top:"",left:""})}},_dettachEvents:function(){var self=this,e=self.element;this._attached=false;e.unbind(this._events);return},_onMouseOver:function(event){var noCancel;if(this.options.disabled===true){return}noCancel=this._trigger("mouseover",event);if(noCancel){this.element.addClass(this.options.css.buttonHoverClasses)}},_onMouseOut:function(event){var self=this,e=self.element,o=this.options,noCancel;if(o.disabled===true){return}noCancel=self._trigger("mouseout",event);if(noCancel){e.removeClass(o.css.buttonHoverClasses)}},_onClick:function(event){var e=this.element,self=this,o=this.options,noCancel;if(o.disabled===true){return}noCancel=self._trigger("click",event);if(noCancel){this.element.removeClass(o.css.buttonHoverClasses);if(self._isRedirect()===true&&e.is("a")===false){if(o.link.target==="_blank"){window.open(o.link.href)}else{window.location=o.link.href}}}},_onMouseDown:function(event){var e=this.element,o=this.options,noCancel;if(o.disabled===true){return}noCancel=this._trigger("mousedown",event);if(noCancel){e.removeClass(o.css.buttonHoverClasses);e.addClass(o.css.buttonActiveClasses)}},_onMouseUp:function(event){var o=this.options,noCancel;if(o.disabled===true){return}noCancel=this._trigger("mouseup",event);if(noCancel){this.element.removeClass(o.css.buttonHoverClasses);this.element.removeClass(o.css.buttonActiveClasses)}},_onFocus:function(event){var o=this.options,noCancel;if(o.disabled===true){return}noCancel=this._trigger("focus",event);if(noCancel){this.element.addClass(o.css.buttonFocusClasses)}},_onBlur:function(event){var o=this.options,noCancel;if(o.disabled===true){return}noCancel=this._trigger("blur",event);if(noCancel){this.element.removeClass(o.css.buttonActiveClasses);this.element.removeClass(o.css.buttonFocusClasses)}},_onKeyDown:function(event){var o=this.options;if(o.disabled===true){return}this._trigger("keydown",event)},_attachButtonEvents:function(){var self=this,e=self.element;if(this._attached===true){return}this._attached=true;this._events={mouseover:function(e){self._onMouseOver(e,self)},click:function(e){self._onClick(e)},mouseout:function(e){self._onMouseOut(e)},mousedown:function(e){self._onMouseDown(e)},mouseup:function(e){self._onMouseUp(e)},focus:function(e){self._onFocus(e)},blur:function(e){self._onBlur(e)},keydown:function(e){self._onKeyDown(e)}};e.bind(this._events)},_isSetPrimaryIcon:function(){var primary=this.options.icons.primary,isSet=false;if(primary!==undefined&&primary!==null){isSet=true}return isSet},_isSetSecondaryIcon:function(){var secondary=this.options.icons.secondary,isSet=false;if(secondary!==undefined&&secondary!==null){isSet=true}return isSet},_setAttribute:function(e,attr,attrName){if(attr!==undefined&&attr!==""&&attr!==null){e.attr(attrName,attr)}else{e.removeAttr(attrName)}},destroy:function(){this._dettachEvents();this._rollbackInitValues();this._events=null;$.Widget.prototype.destroy.apply(this,arguments)},_getInitValues:function(){var e=this.element;this._innerHTML=e.html();this._cssClasses=e.attr("class");this._role=e.attr("role");this._href=e.attr("href");this._title=e.attr("title");this._target=e.attr("target");this._width=e.attr("width");this._height=e.attr("height");this._disabled=e.attr("disabled");this._value=e.val()},_rollbackInitValues:function(){var e=this.element;e.html(this._innerHTML);if(e.is("a")){this._setAttribute(e,this._href,"href");this._setAttribute(e,this._target,"target")}else if(e.is("input")){e.val(this._value)}this._setAttribute(e,this._title,"title");this._setAttribute(e,this._width,"width");this._setAttribute(e,this._height,"height");this._setAttribute(e,this._cssClasses,"class");this._setAttribute(e,this._role,"role");this._setAttribute(e,this._disabled,"disabled")}});$.extend($.ui.igButton,{version:"13.1.20131.2523"});$.widget("ui.igTooltip",{css:{baseClasses:"ui-widget ui-igtooltip ui-igplayer-tooltip",arrowImageBaseClass:"ui-igtooltip-arrow-"},options:{text:"",arrowLocation:"top"},_setOption:function(key,value){$.Widget.prototype._setOption.apply(this,arguments);switch(key){case"text":$("div.ui-widget-content",this.element).html(value);break;case"arrowLocation":$("div",this.element).remove();this._renderTooltip();break}},_create:function(){if(this.element.is("div")){this._renderTooltip();this.element.addClass(this.css.baseClasses)}},_renderTooltip:function(){switch(this.options.arrowLocation){case"top":this._createArrowDiv();this._createContentDiv();break;case"bottom":this._createContentDiv();this._createArrowDiv();break;case"left":break;case"right":break}},_createContentDiv:function(){var t=this.options.text&&this.options.text.length>0?this.options.text:"";$('<div class="ui-widget-content ui-corner-all">'+t+"</div>").appendTo(this.element)},_createArrowDiv:function(){$('<div class="'+this.css.arrowImageBaseClass+this.options.arrowLocation+'"></div>').appendTo(this.element)},destroy:function(){this.element.children().remove();this.element.removeClass(this.css.baseClasses)}});$.extend($.ui.igTooltip,{version:"13.1.20131.2523"});$.widget("ui.igToolbar",{options:{height:null,width:null,allowCollapsing:true,collapseButtonIcon:"ui-igbutton-collapsed",expandButtonIcon:"ui-igbutton-expanded",name:"",displayName:"",items:[],isExpanded:true},events:{toolbarButtonClick:"toolbarButtonClick",toolbarComboOpening:"toolbarComboOpening",toolbarComboSelected:"toolbarComboSelected",toolbarMouseDown:"toolbarMouseDown",toolbarCustomItemClick:"toolbarCustomItemClick",itemRemoved:"itemRemoved",itemAdded:"itemAdded",collapsing:"collapsing",collapsed:"collapsed",expanding:"expanding",expanded:"expanded",itemDisable:"itemDisable",itemEnabled:"itemEnabled"},css:{toolbarWidget:"ui-widget ui-widget-content ui-igtoolbar ui-corner-all",toolbarWrapperConteiner:"ui-widget ui-widget-content ui-igtoolbar ui-corner-all",toolbarCollapsedButton:"ui-state-default ui-igbutton-all-caps",igToolbarSeparator:"ig-toolbar-separator ui-widget-content"},_id:function(id){return this.element[0].id+id},widget:function(){return this.element},_create:function(){this._render();this._createItems()},_init:function(){this._attachEvents();if(!this.options.isExpanded){this.buttonsList.hide();this.collapseBtn.igToolbarButton("toggle").children(":first").switchClass(this.options.collapseButtonIcon,this.options.expandButtonIcon)}this._width=this.collapseBtn.outerWidth(true)+this.buttonsList.width();this._height=this.element.height()},_render:function(){var o=this.options;this.element.addClass(this.css.toolbarWidget);this.element.width(this.options.width).height(this.options.height);this.collapseBtn=$('<div tabIndex="0" id="'+this._id("_collapseButton")+'"></div>').appendTo(this.element).igToolbarButton({onlyIcons:true,labelText:"&nbsp;",title:$.ig.HtmlEditor.locale.collapseButtonTitle+" "+this.options.displayName,icons:{primary:o.collapseButtonIcon}});this.toolbarBody=this.element.find("#"+this._id("_toolbar"));this.buttonsList=$('<span id="'+this._id("_toolbar_buttons")+'" style="display:inline-block"></span>').appendTo(this.element)},_onCollapse:function(e){var noCancel,event,cancelableEvent,o=this.options,width,self=this,visibility,opacity;if(!o.allowCollapsing){return}if(o.isExpanded){event="collapsed";cancelableEvent="collapsing";o.isExpanded=false;width=this.element.height();this.collapseBtn.attr("title",$.ig.HtmlEditor.locale.expandButtonTitle+" "+this.options.displayName).children(":first").switchClass(this.options.collapseButtonIcon,this.options.expandButtonIcon);visibility="hidden";opacity="0.0"}else{event="expanded";cancelableEvent="expanding";o.isExpanded=true;width=this._width;this.buttonsList.show();this.collapseBtn.attr("title",$.ig.HtmlEditor.locale.collapseButtonTitle+" "+this.options.displayName).children(":first").switchClass(this.options.expandButtonIcon,this.options.collapseButtonIcon);visibility="visible";
opacity="1"}e.stopPropagation();noCancel=this._trigger(this.events[cancelableEvent],e,{owner:this,toolbarElement:this.element,toolbar:{}});if(noCancel){this.element.css({overflow:"hidden"});this.element.animate({width:width},300,null,function(){if(!o.isExpanded){self.buttonsList.hide()}if(document.documentMode===7){self.buttonsList.attr("style","visibility: "+visibility+" !important;")}self._trigger(self.events[event],e,{owner:self,toolbarElement:self.element,toolbar:{}})})}},_setOption:function(name,value){$.Widget.prototype._setOption.apply(this,arguments);switch(name){case"allowCollapsing":this.options.allowCollapsing=value;break;case"items":this._updateItems(value);break}},_isSelectedAction:function(el,props,itemOptionObj){if(props.value){el.addClass("ui-state-active")}},_tooltipAction:function(el,props,itemOptionObj){if(itemOptionObj!==undefined){itemOptionObj.title=props.value}else{el.igToolbarButton("option","title",props.value)}},_buttonIconAction:function(el,props,itemOptionObj){if(itemOptionObj!==undefined){itemOptionObj.icons={primary:props.value}}else{el.igToolbarButton("option","icons",{primary:props.value})}},_comboDataSourceAction:function(el,props,itemOptionObj){if(itemOptionObj!==undefined){itemOptionObj.dataSource=props.value}else{el.igCombo("option","dataSource",props.value)}},_comboWidthAction:function(el,props,itemOptionObj){if(itemOptionObj!==undefined){itemOptionObj.width=props.value}else{el.igCombo("option","width",props.value)}},_comboHeightAction:function(el,props,itemOptionObj){if(itemOptionObj!==undefined){itemOptionObj.height=props.value}else{el.igCombo("option","height",props.value)}},_spltBtnTooltipAction:function(el,props,itemOptionObj){},_comboSelectedItem:function(el,props,itemOptionObj){if(itemOptionObj!==undefined){itemOptionObj.selectedItems=[{value:props.value}]}else{el.igCombo("option","selectedItems",[{value:props.value}])}},_spltButtonColorAction:function(el,props,itemOptionObj){if(itemOptionObj!==undefined){itemOptionObj.defaultColor=props.value}else{el.igColorPickerSplitButton("option","defaultColor",props.value)}},_comboDropDownListWidth:function(el,props,itemOptionObj){if(itemOptionObj!==undefined){itemOptionObj.dropDownWidth=props.value}else{el.igCombo("option","dropDownWidth",props.value)}},_createItems:function(){var o=this.options,i,self=this,itemProps={},newItem,tbItemsHash={button:"igToolbarButton",combo:"igCombo",splitButton:"igSplitButton",splitButtonColor:"igColorPickerSplitButton"},tbItemsPropsTraversing=function(key,property){var scope=o.items[i].scope||self;if(property.action!==undefined&&$.isFunction(scope[property.action])){scope[property.action](newItem,property,itemProps);return}itemProps[key]=property.value};this.buttonsList.empty();for(i=0;i<o.items.length;i++){itemProps={};newItem=(o.items[i].callbackRenderer()||$('<div tabIndex="0"></div>')).attr("id",this._id("_item_"+o.items[i].name)).appendTo(this.buttonsList);$.each(o.items[i].getProperties(),tbItemsPropsTraversing);if(tbItemsHash.hasOwnProperty(o.items[i].type)){newItem[tbItemsHash[o.items[i].type]](itemProps);continue}}},_updateItems:function(items){var o=this.options,updProps,i,j,scope,el,key;for(i=0;i<items.length;i++){updProps=items[i].getUpdatedProperties();el=this.getItem(items[i].name);scope=o.items[i].scope||this;for(j=0;j<updProps.length;j++){if(updProps[j].action!==undefined&&$.isFunction(scope[updProps[j].action])){scope[updProps[j].action](el,updProps[j]);continue}if(items[i]instanceof $.ig.igToolbarButtonDescriptor){el.igToolbarButton("option",key,updProps[j])}if(o.items[i]instanceof $.ig.igToolbarComboDescriptor){el.igCombo("option",key,updProps[j])}}}},_getWidgetType:function(el){var data,i;if(el===undefined){return}data=el.data();for(i in data){if(data.hasOwnProperty(i)&&data[i].widgetName){return data[i].widgetName}}},_isWidgetSupported:function(name){var i;for(i=0;i<this.supportedWidgets.length;i++){if(this.supportedWidgets[i].name===name){return true}}},_attachEvents:function(){var toolbarItemsEvents="igtoolbarbuttonclick igsplitbuttonclick igcolorpickersplitbuttoncolorselected";this.element.delegate(".ui-widget",toolbarItemsEvents,$.proxy(this._onToolbarItemInteraction,this));this.element.delegate(":ui-igCombo","igcomboselectionchanged",$.proxy(this._onComboListItemClick,this));this.collapseBtn.bind("igtoolbarbuttonclick",$.proxy(this._onCollapse,this))},_onToolbarItemInteraction:function(e,ui){var selectedItemValue,targetWidget=$(e.target).parentsUntil(":ui-igToolbar").eq(-2),selectedItemIndex,triggeredEvent,o=this.options;if(targetWidget.length===0){targetWidget=$(e.target)}selectedItemIndex=this.buttonsList.children().index(targetWidget);switch(e.type){case"igtoolbarbuttonclick":triggeredEvent=this.events.toolbarButtonClick;break;default:triggeredEvent=this.events.toolbarCustomItemClick;selectedItemValue=ui.value;break}this._trigger(triggeredEvent,e,{name:ui.name||o.items[selectedItemIndex].name,value:selectedItemValue,handler:o.items[selectedItemIndex].handler(),scope:o.items[selectedItemIndex].getProperty("scope"),itemProperties:o.items[selectedItemIndex].getProperties(),toolbarItem:targetWidget,toolbarName:o.name})},_onComboListItemClick:function(e,data){var toolbarItemIndex,toolbarItem;toolbarItemIndex=this.buttonsList.children().index($(e.currentTarget));toolbarItem=this.options.items[toolbarItemIndex];this._trigger(this.events.toolbarComboSelected,e,{name:toolbarItem.name,value:data.items[0].value,handler:toolbarItem.handler(),scope:toolbarItem.getProperty("scope"),itemProperties:toolbarItem.getProperties(),toolbarItem:data.owner,toolbarName:this.options.name})},getItem:function(index){var result;if(!isNaN(parseInt(index,10))){return this.buttonsList.eq(index)}if(typeof index==="string"){result=this.buttonsList.find("#"+this._id("_item_"+index));if(result.length){return result}}},addItem:function(item){if(this._isWidgetSupported(item.type)){this.options.items.push(item);this._createItems();this._trigger(this.events.itemAdded)}},removeItem:function(index){this.buttonsList.eq(index).remove();this._trigger(this.events.itemremoved)},disableItem:function(index,disabled){var item=this.getItem(index),widgetType=this._getWidgetType(item);if(widgetType){item[this._getWidgetType(item)]("option","disabled",disabled);this._trigger(this.events.itemDisable,{isDisabled:disabled})}},activateItem:function(index,activated){var item=this.getItem(index),action=activated?item.addClass:item.removeClass;action.call(this,"ui-state-active");item.igToolbarButton("options","isSelected",activated);this._trigger(this.events.itemActivated,{isActivated:activated})},deactivateAll:function(){this.buttonsList.find(".ui-igbutton.ui-state-active").removeClass("ui-state-active").igToolbarButton("option","isSelected",false)},_setCollapseExpandButtonIcon:function(){if(this.options.collapseButtonIcon){this.collapseBtn.switchClass("ui-icon-triangle-1-w",this.options.collapseButtonIcon)}},destroy:function(){$.Widget.prototype.destroy.apply(this,arguments);this.element.undelegate();this.element.unbind();this.element.removeClass(this.css.toolbarWrapperConteiner).find("#"+this._id("_toolbar")).removeClass(this.css.toolbarWidget).end().find("#"+this._id("_collapseButton")).removeClass(this.css.toolbarCollapsedButton).end().find(":ui-igToolbarButton").igToolbarButton("destroy").end().find(":ui-igCombo").igCombo("destroy").end().find(":ui-igSplitButton").igSplitButton("destroy").end().find(":ui-igColorPickerSplitButton").igColorPickerSplitButton("destroy");delete this.buttonsList;delete this.collapseBtn;delete this.toolbarBody}});$.ig=$.ig||{};$.ig.igToolbarItemBaseDescriptor=Class.extend({settings:{width:null,height:null,props:{scope:{value:null}}},_updatedProperties:[],init:function(item){this.settings=$.extend(true,{},this.settings,item);this.name=item.name;this.type=item.type;if(this.settings.scope){this.settings.props.scope=this.settings.scope}},updateProperty:function(name,value){this.settings.props[name].value=value;this._updatedProperties.push(this.settings.props[name])},getProperty:function(name){return this.settings.props[name]},getUpdatedProperties:function(){return this._updatedProperties},getProperties:function(){return this.settings.props},callbackRenderer:function(){if(this.settings.callbackRenderer&&$.isFunction(this.settings.callbackRenderer)){return this.settings.callbackRenderer()}},handler:function(){return this.settings.handler}});$.ig.igToolbarButtonDescriptor=$.ig.igToolbarItemBaseDescriptor.extend({settings:{props:{onlyIcons:{value:true},labelText:{value:"&nbsp;"}}},init:function(item){this._super(item)}});$.ig.igToolbarSplitButtonDescriptor=$.ig.igToolbarItemBaseDescriptor.extend({settings:{props:{items:[]}},init:function(item){this._super(item)}});$.ig.igToolbarComboDescriptor=$.ig.igToolbarItemBaseDescriptor.extend({settings:{props:{valueKey:{value:"text"},textKey:{value:"value"},enableCheckboxes:{value:false},dropDownOnFocus:{value:true},selectedItems:{value:[{index:0}]},enableClearButton:{value:false},dataSource:{value:null},mode:{value:"dropdown"},dropDownAsChild:{value:true},focusOnSelect:{value:false}}},init:function(item){this._super(item);if(this.settings.dataSource){this.settings.props.dataSource.value=this.settings.dataSource}}});$.widget("ui.igToolbarButton",$.ui.igButton,{options:{allowToggling:true,isSelected:false},ENTER:13,_setOption:function(name,value){$.ui.igButton.prototype._setOption.apply(this,arguments);switch(name){case"allowToggling":this._setToggling(value);break;case"isSelected":this.options.isSelected=value;break}},_init:function(){var self=this,o=this.options;$.ui.igButton.prototype._init.apply(this);this._isToggled=false;this._setToggling(this.options.allowToggling);this.element.bind("keypress",$.proxy(this._onEnterKey,this));this.element.unbind("blur");this.element.bind("blur",function(e){self.element.removeClass(o.css.buttonFocusClasses)})},_setToggling:function(value){var o=this.options,self=this;o.allowToggling=value;if(o.allowToggling){this.element.unbind("mouseup");this.element.bind("click",function(){if(o.isSelected){self.element.removeClass(o.css.buttonActiveClasses)}self.element.removeClass(o.css.buttonFocusClasses);o.isSelected=!o.isSelected})}else{this.element.bind("mouseup",this._events.mouseup);this.element.unbind("mousedown");this.element.bind("mousedown",this._events.mousedown)}},toggle:function(){var self=this,e=self.element,o=this.options;if(o.disabled===true||o.allowToggling===false){return}o.isSelected=!o.isSelected;e.toggleClass(o.css.buttonActiveClasses)},_onEnterKey:function(e){if(e.keyCode!==this.ENTER){return}this.element.mousedown()},destroy:function(){$.ui.igButton.prototype.destroy.call(this);this.element.unbind();this.element.removeClass("")}});$.widget("ui.mouseWrapper",$.ui.mouse,{options:{cancel:":input,option",distance:1,delay:0},events:{start:"start",drag:"drag",stop:"stop",capture:"capture"},_create:function(){var self=this,originalMouseDown=this._mouseDown;if($.ig.util.isIE9){this._mouseDown=function(event){var originalPreventDefault=event.preventDefault,result;event.preventDefault=function(){};result=originalMouseDown.apply(self,[event]);event.preventDefault=originalPreventDefault;return result}}this._mouseInit()},destroy:function(){this._mouseDestroy();return this},_mouseStart:function(event){return this._trigger(this.events.start,event)},_mouseDrag:function(event){return this._trigger(this.events.drag,event)},_mouseStop:function(event){return this._trigger(this.events.stop,event)},_mouseCapture:function(event){return this._trigger(this.events.capture,event)}});$.widget("ui.igPopover",{css:{baseClasses:"ui-widget ui-igtooltip",arrowImageBaseClass:"ui-igtooltip-arrow-",closeButtonClass:"ui-icon ui-icon-close"},options:{renderHeader:false,renderCloseButton:true,closeOnBlur:true,direction:"auto",position:"auto",width:null,height:null,defaultMaxWidth:200,target:null,fadeTimespan:150},events:{popoverShowing:"popoverShowing",popoverShown:"popoverShown",popoverHiding:"popoverHiding",popoverHidden:"popoverHidden"},_create:function(){this._priorityDir=["top","bottom","right","left"];this._arrowDir=["bottom","top","left","right"];this._positions=["balanced","start","end"];this._directionIndex=-1;this._positionIndex=-1;this._forced=this.options.direction!=="auto"&&this.options.position!=="auto"},_createWidget:function(options,element){$.Widget.prototype._createWidget.apply(this,arguments);this.element=$(element);if(element&&element.nodeType!==undefined){this._renderPopover();this._attachEventsToTarget()}if(this.options.direction!=="auto"||this.options.position!=="auto"){this._getPrioritiesIndex()}},_setOption:function(key,value){switch(key){case"direction":this.options.direction=value;if(this.options.direction!=="auto"){this._getPrioritiesIndex()}this._forced=this.options.direction!=="auto"&&this.options.position!=="auto";break;case"position":this.options.position=value;if(this.options.position!=="auto"){this._getPrioritiesIndex()}this._forced=this.options.direction!=="auto"&&this.options.position!=="auto";break;case"target":this._detachEventsFromTarget();this.options.target=value;this._attachEventsToTarget();break;case"fadeTimespan":if(typeof value==="number"){this.options.fadeTimespan=value}break;case"renderHeader":case"renderCloseButton":case"closeOnBlur":case"width":case"height":case"defaultMaxWidth":throw new Error($.ig.SharedLocale.locale.popoverOptionChangeNotSupported+" "+key)}},destroy:function(){this._detachEventsFromTarget();$("#"+this.id()+"_popover").remove();$.Widget.prototype.destroy.call(this);return this},id:function(){return this.element[0].id},container:function(){return $("#"+this.id()+"_popover_contentInner")},show:function(trg,content){var target=trg||this.options.target;if(content){this._setNewContent(content)}this._openPopover(target)},hide:function(){this._closePopover()},getContent:function(){return $("#"+this.id()+"_popover_contentInner").html()},setContent:function(newCnt){if(typeof newCnt==="string"){this._setNewContent(newCnt)}},_renderPopover:function(){this.popover=$("<div></div>").attr("id",this.id()+"_popover").css({display:"none","white-space":"normal","word-wrap":"break-word",position:"absolute"}).addClass(this.css.baseClasses).appendTo(this.element);this._createContentDiv()},_createContentDiv:function(){var cnt;cnt=$("<div></div>").attr("id",this.id()+"_popover_contentFrame").css("position","relative").css("max-width",this.options.defaultMaxWidth).addClass("ui-widget-content ui-corner-all").appendTo(this.popover);if(this.options.renderCloseButton===true){$("<div></div>").attr("id",this.id()+"_popover_closeBtn").addClass(this.css.closeButtonClass).css({display:"block","float":"right",position:"relative",top:"-5px",left:"5px","z-index":1e3}).bind("click.popover",$.proxy(this._closeBtnClick,this)).appendTo(cnt)}$("<div></div>").attr("id",this.id()+"_popover_contentInner").css("position","relative").appendTo(cnt);$("<div></div>").css("clear","both").appendTo(cnt)},_updateArrowDiv:function(nDir,idx){var arrowDiv=$("#"+this.id()+"_popover_arrow"),conDiv=$("#"+this.id()+"_popover_contentFrame"),dims;if(arrowDiv.length===0){arrowDiv=$("<div></div>").attr("id",this.id()+"_popover_arrow").attr("position","relative").addClass(this.css.arrowImageBaseClass+this._arrowDir[idx]).appendTo(this.popover)}else{arrowDiv.removeClass().addClass(this.css.arrowImageBaseClass+this._arrowDir[idx])}dims=this._getHiddenElementsDimensions([arrowDiv,conDiv]);switch(nDir){case"top":conDiv.css({left:"",top:"","float":""});arrowDiv.css({left:"",top:"","float":""});break;case"bottom":conDiv.css({left:"",top:dims[0].height,"float":""});arrowDiv.css({left:"",top:dims[1].height*-1,"float":""});break;case"left":conDiv.css({left:"",top:"","float":"left"});arrowDiv.css({left:"",top:"","float":"left"});break;case"right":conDiv.css({left:dims[0].width,top:"","float":"left"});arrowDiv.css({left:dims[1].width*-1,top:"","float":"left"});break}this.oDir=nDir},_targetMouseLeave:function(){if(this.options.closeOnBlur===true){this._closePopover()}},_targetMouseMove:function(){this._openPopover($(this.options.target))},_closeBtnClick:function(event,ui){this._closePopover();event.stopPropagation()},_attachEventsToTarget:function(){var t=this.options.target;if(t&&window.HTMLElement!==undefined&&t instanceof HTMLElement){$(t).unbind("mouseenter.popover").bind("mouseenter.popover",$.proxy(this._targetMouseMove,this));$(t).unbind("mouseleave.popover").bind("mouseleave.popover",$.proxy(this._targetMouseLeave,this))}},_detachEventsFromTarget:function(){var t=this.options.target;if(t&&window.HTMLElement!==undefined&&t instanceof HTMLElement){$(t).unbind("popover")}},_positionPopover:function(trg){var i=0,fn,fnRes;if(this.options.direction==="auto"){do{this._updateArrowDiv(this._priorityDir[i],i);fn="_"+this._priorityDir[i]+"Position";fnRes=this[fn](trg);i++}while(fnRes===false&&i<this._priorityDir.length);if(fnRes===false){return}}else{this._updateArrowDiv(this.options.direction,this._directionIndex);fn="_"+this.options.direction+"Position";if(!this[fn](trg)){return}}},_findProperPosition:function(dir,x,trg){var i=0,fnRes,y,cDim,cPos,win=$(window),trgFDim,wScroll,tPos;if(dir==="left"){cPos="left";cDim="outerWidth";wScroll=win.scrollLeft()}else{cPos="top";cDim="outerHeight";wScroll=win.scrollTop()}if(trg.offset()[cPos]+trg[cDim]()>wScroll+win[0][cDim]){trgFDim=win[0][cDim]+wScroll-trg.offset()[cPos]}else{trgFDim=trg[cDim]()}if(trg[cDim]()>this.popover[cDim]()){y=trg.offset()[cPos]+trgFDim/2-this.popover[cDim]()/2;fnRes=dir==="left"?this._checkCollision(x,y):this._checkCollision(y,x)}else{if(this.options.position==="auto"){do{tPos=this._positions[i];y=this._getCounterPosition(trg,trgFDim,tPos,cPos,cDim);fnRes=dir==="left"?this._checkCollision(x,y):this._checkCollision(y,x)}while(fnRes===false&&++i<this._positions.length)}else{y=this._getCounterPosition(trg,trgFDim,this.options.position,cPos,cDim);fnRes=dir==="left"?this._checkCollision(x,y):this._checkCollision(y,x)}}if(fnRes===true){this._adjustArrowPosition(trg,dir,cPos,cDim)}return fnRes},_getCounterPosition:function(trg,trgFDim,tPos,cPos,cDim){var y;switch(tPos){case"balanced":y=trg.offset()[cPos]+trgFDim/2-this.popover[cDim]()/2;break;case"start":y=trg.offset()[cPos];break;case"end":y=trg.offset()[cPos]-this.popover[cDim]()+trgFDim;break}return y},_topPosition:function(trg){var top=trg.offset().top-this.popover.outerHeight();return this._findProperPosition("left",top,trg)},_bottomPosition:function(trg){var top=trg.offset().top+trg.outerHeight();return this._findProperPosition("left",top,trg)},_leftPosition:function(trg){var left=trg.offset().left-this.popover.outerWidth();return this._findProperPosition("top",left,trg)},_rightPosition:function(trg){var left=trg.offset().left+trg.outerWidth();return this._findProperPosition("top",left,trg)},_checkCollision:function(top,left){var tfullw=this.popover.outerWidth(),tfullh=this.popover.outerHeight(),win=$(window),wh,ww,os;ww=win.width()+win.scrollLeft();wh=win.height()+win.scrollTop();if(left<win.scrollLeft()||left+tfullw>ww||top<win.scrollTop()||top+tfullh>wh){if(this._forced===false){return false}}os=this._getRelativeOffset();this.popover.css({top:top-os.top,left:left-os.left});return true},_getPrioritiesIndex:function(){var i;if(this.options.direction!=="auto"){for(i=0;i<this._priorityDir.length;i++){if(this.options.direction===this._priorityDir[i]){this._directionIndex=i;break}}}if(this.options.position!=="auto"){for(i=0;i<this._positions.length;i++){if(this.options.position===this._positions[i]){this._positionIndex=i;break}}}},_openPopover:function(trg){var args,noCancel,val=this.getContent();args={element:trg,content:val,popover:this.popover};noCancel=this._trigger(this.events.popoverShowing,this,args);if(noCancel===true){if(args.content!==val&&typeof args.content==="string"){this._setNewContent(args.content)}this._positionPopover(trg);this._currentTarget=trg;this.popover.fadeIn(this.options.fadeTimespan);this._trigger(this.events.popoverShown,this,args)}},_closePopover:function(){var args,noCancel;args={element:this._currentTarget,content:this.getContent(),popover:this.popover};noCancel=this._trigger(this.events.popoverHiding,this,args);if(noCancel===true){this.popover.fadeOut(this.options.fadeTimespan);this._trigger(this.events.popoverHidden,this,args)}},_adjustArrowPosition:function(trg,dir,cPos,cDim){},_getRelativeOffset:function(){var offset={left:0,top:0},elem=this.popover;while(elem[0]!==null&&elem[0]!==undefined&&elem[0].nodeName!=="#document"){if(elem.css("position")==="relative"){offset.left=elem.offset().left;offset.top=elem.offset().top;break}elem=elem.parent()}return offset},_getHiddenElementsDimensions:function(elArr){var dim=[],i,elem;$("#"+this.id()+"_popover").show();for(i=0;i<elArr.length;i++){elem=elArr[i];dim.push({width:elem.outerWidth(),height:elem.outerHeight()})}$("#"+this.id()+"_popover").hide();return dim},_setNewContent:function(nc){$("#"+this.id()+"_popover_contentInner").html(nc)}});$.widget("ui.igResponsiveContainer",{options:{pollingInterval:500},_createWidget:function(options,element){this._callbacks=[];this._element=element;this._pollerHandler=$.proxy(this._pollerTick,this);this._startPoller();this._width=this._getCurrentWidth();this._height=this._getCurrentHeight();$.Widget.prototype._createWidget.apply(this,arguments)},destroy:function(){this._stopPoller();this._callbacks=[];$.Widget.prototype.destroy.call(this);return this},startPoller:function(){this._startPoller()},stopPoller:function(){this._stopPoller()},removeCallback:function(callbackId){if(callbackId>=0&&callbackId<this._callbacks.length){this._callbacks.splice(callbackId,1)}},addCallback:function(callback,owner,reactionStep,reactionDirection){return this._callbacks.push({callback:callback,owner:owner,step:reactionStep,left:reactionDirection==="xy"||reactionDirection==="x",top:reactionDirection==="xy"||reactionDirection==="y",cWidth:this._getCurrentWidth(),cHeight:this._getCurrentHeight()})-1},_startPoller:function(){this._intervalId=setInterval(this._pollerHandler,this.options.pollingInterval)},_stopPoller:function(){if(this._intervalId){clearInterval(this._intervalId);delete this._intervalId}},_pollerTick:function(){var nw=this._getCurrentWidth(),nh=this._getCurrentHeight(),cb,i,called=false;for(i=0;i<this._callbacks.length;i++){cb=this._callbacks[i];if(cb.left===true){if(Math.abs(cb.cWidth-nw)>cb.step){cb.callback.apply(cb.owner,[nw,nh]);cb.cWidth=nw;cb.cHeight=nh;called=true}}if(cb.top===true&&called===false){if(Math.abs(cb.cHeight-nh)>cb.step){cb.callback.apply(cb.owner,[nw,nh]);cb.cWidth=nw;cb.cHeight=nh}}}this._width=nw;this._height=nh},_getCurrentWidth:function(){return this._element.offsetWidth},_getCurrentHeight:function(){return this._element.offsetHeight}});$.extend($.ui.igResponsiveContainer,{version:"13.1.20131.2523"});if(typeof define==="function"&&define.amd&&define.amd.jQuery){define("ig.ui.shared",["ig.util","jquery.ui.core","jquery.ui.widget"],function(){return $.ui.igLoading})}})(jQuery);