window.hzmr = window.hzmr || [];
/************* Start viewSpace.js for locale en-US **************/
try {function imageTag(){}function ImageTags(){this.imageTags=null,this.imageTagsDiv=null,this.spaceId=-1,this.width=0,this.height=0,this.scale=1,this.displayState=!0,this.init=function(a,b,c,d){this.imageTags=new Array,this.imageTagsDiv=document.getElementById("imageTagsDiv"),this.spaceId=a,this.width=b,this.height=c,this.scale=d},this.getImageTag=function(a){return this.imageTags[a]},this.getImageTagByProductSpaceId=function(a){for(var b=0;b<this.imageTags.length;b++)if(this.imageTags[b].targetSpaceId==a)return this.imageTags[b];return null},this.addImageTag=function(a,b,c,d,e,f,g,h,i,j){var k=new imageTag;k.imageTagId=a,k.vendorName=b,k.link=c,k.comments=d,k.x=e,k.y=f,k.type=g,k.targetSpaceId=h,k.canEdit=i,k.canDelete=j;var l=this.imageTags.length;return this.imageTags.push(k),l},this.findImageTag=function(a){var b;for(b=0;b<this.imageTags.length;b++)if(this.imageTags[b].imageTagId==a)return b},this.updateImageTag=function(a,b,c,d,e,f,g,h){var i=this.findImageTag(a),j=this.imageTags[i];j.vendorName=b,j.link=c,j.comments=d,j.x=e,j.y=f,j.type=g,j.targetSpaceId=h,this.clearImageTags(),this.showImageTags()},this.deleteImageTag=function(a){var b=this.findImageTag(a);this.imageTags.splice(b,1),this.clearImageTags(),this.showImageTags()},this.addImageTagHTML=function(a){var b=this.imageTags[a];if(null!=this.imageTagsDiv){var c=this.scale*b.x-6,d=this.scale*b.y-3;this.imageTagsDiv.innerHTML+="<div id='imageTag"+a+"' class='imageTag' style='left:"+c+"px;top:"+d+"px'onmouseover='imageTagOnMouseOver("+a+")'></div>",this.imageTagsDiv.style.display="block"}},this.hasTags=function(){return null!=this.imageTagsDiv?""==this.imageTagsDiv.innerHTML?!1:!0:!1},this.clearImageTags=function(){null!=this.imageTagsDiv&&(this.imageTagsDiv.innerHTML="",this.imageTagsDiv.style.display="none")},this.showImageTags=function(a){if(0!=this.displayState){if(0==this.hasTags()){var b;for(this.clearImageTags(),b=0;b<this.imageTags.length;b++)this.addImageTagHTML(b)}null!=this.imageTagsDiv&&(this.imageTagsDiv.style.display="block"),null!=this.hideTimeout&&clearTimeout(this.hideTimeout),this.hideTimeout=null!=a?setTimeout("imageTagsObj.hideImageTags()",a):null}},this.hideImageTags=function(){null!=this.imageTagsDiv&&(this.imageTagsDiv.style.display="none"),null!=this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=null)},this.enableImageTags=function(){this.displayState=!0,this.showImageTags()},this.disableImageTags=function(){this.displayState=!1,this.hideImageTags()}}function enableImageTags(){null!=imageTagsObj&&imageTagsObj.enableImageTags(),ImageTagsUI.enableTagsUI();var a=document.getElementById("imageTagPopup");a.style.display="none";var b=document.getElementById("mainImage");$(".addImageTagGuide").length&&(b.style.cursor="crosshair")}function disableImageTags(){null!=imageTagsObj&&imageTagsObj.disableImageTags(),ImageTagsUI.disableTagsUI();var a=document.getElementById("mainImage");a.style.cursor="default"}function imageTagOnMouseOver(a){if(!ImageTagsUI.isEditing()){var b=imageTagsObj.getImageTag(a);ImageTagsUI.setCurrentImageTag(b),ImageTagsUI.setScreen("view"),ImageTagsUI.show()}}function imageTagPopupOnMouseOver(){}function imageTagPopupOnMouseOut(a){ImageTagsUI.isEditing()||0!=isMouseReallyOut(a,"imageTagPopup")&&ImageTagsUI.dismiss()}function onImageClick(a,b){if(!ImageTagsUI.isEditing()&&0!=ImageTagsUI.displayState){b=b||window.event,imageBorderWidth=1;var c;b.target?c=b.target:b.srcElement&&(c=b.srcElement),3==c.nodeType&&(c=targ.parentNode);var c=document.getElementById("mainImage"),d=getEventPosition(b),e=getElementPosition(c),f=Math.round((d.x-e.x-imageBorderWidth)/ImageTagsUI.scale),g=Math.round((d.y-e.y-imageBorderWidth)/ImageTagsUI.scale);ImageTagsUI.initNewImageTag(f,g),ImageTagsUI.setScreen(defaultEditScreenName),ImageTagsUI.show()}}function onImageMouseOver(a){0==tagMode?(a.className="viewImageOn",null!=imageTagsObj&&imageTagsObj.showImageTags()):1==tagMode&&(a.className="viewImageTaggingOn",null!=imageTagsObj&&imageTagsObj.showImageTags())}function onImageMouseOut(a,b){0!=isMouseReallyOut(b,a.name)&&(a.className="viewImage",window.imageTagsObj&&imageTagsObj.hideImageTags())}function initImageTags(a,b,c,d){imageTagsObj=new ImageTags,imageTagsObj.init(a,b,c,d)}function onShowEmailForm(a){1==a?(tagMode=-1,null!=imageTagsObj&&imageTagsObj.hideImageTags()):tagMode=0}function toggleHouseDescriptionDiv(){var a=document.getElementById("houseDescriptionDiv");a.style.display="none"==a.style.display?"block":"none"}function highlightProductImageTag(a,b){if(void 0!=imageTagsObj&&!ImageTagsUI.isEditing())if(b){var c=imageTagsObj.getImageTagByProductSpaceId(a);ImageTagsUI.setCurrentImageTag(c),ImageTagsUI.setScreen("highlightProduct"),ImageTagsUI.show()}else ImageTagsUI.dismiss()}var tagMode=0,imageTagsObj;HZ.ns("HZ.viewSpace"),HZ.viewSpace.ViewSpaceRenderer=new function(){function a(a,b,c){var d=$(c.target);this.setMainImage(a,b,function(){d.addClass("loaded")})}var b;this.handleThumbClicked=function(c){var d,e,f,g=$(c.target);g.attr("i")&&(d=g.attr("i"),e=b.iids[d],f=HZ.data.Images.get(e),a.call(HZ.viewSpace.ViewSpaceRenderer,f,d,c),$(".altImagesDiv").find(".selected").removeClass("selected"),g.addClass("selected"))},this.updateView=function(a){var c,d=$(".altImagesDiv");if(b=HZ.data.Spaces.get(a),d.empty(),b.prod&&b.iids.length>1){for(var e=0;e<b.iids.length;e++)c=HZ.data.Images.get(b.iids[e]),c=$("<img />"),c.attr("i",e).attr("width",64).attr("height",64).attr("src",HZ.utils.Links.getSpaceImageUrl(a,64,64,c.bg,c.ts,e)),d.append(c);$(".altImagesDiv").find("img:first-child").addClass("selected")}},this.setMainImage=function(a,c,d){var e,f,g=$("#mainImage"),h="0px ";f={w:a.w,h:a.h},e=HZ.ui.Utils.getBoundRect(f,{w:640,h:640}),h+=(640-e.w)/2+"px",g.attr("src",HZ.utils.Links.getSpaceImageUrl(b.id,e.w,e.h,a.bg,a.ts,c)).load(function(){g.attr("width",e.w).attr("height",e.h).css("padding",h),d&&d.call()})}},HZ.ns("HZ.productVariation"),HZ.productVariation.ViewSpaceRenderer=new function(){function a(a,b){var c,h,i,j;i="";var k,l,m,n,o,p=$("#hzProductInfo dl.hzAttributes");if(p.empty(),b&&b.manu&&p.append(HZ.utils.Html.template(g,{VALUE:b.manu})),b&&b.vid&&HZ.data.Users.get(b.vid)){var q=b.vid;j=HZ.data.Users.get(q).d,browseLink=HZ.utils.Links.getMarketplaceVendorBrowseProductLink(q),b.dv||p.append(HZ.utils.Html.template(e,{VALUE1:browseLink,VALUE2:j}))}else j=p.find(".vendorName").html(),b.dv||p.append(HZ.utils.Html.template(f,{VALUE:j}));for(var r=0;r<HZ.ajaz.Services.Attributes.PRODUCT_ATTRIBUTES.length;r++)k=HZ.ajaz.Services.Attributes.PRODUCT_ATTRIBUTES[r],m=k.label,l=k.key,n=b[l],null!=n&&(n+=k.unit?k.unit:"",o=HZ.utils.Html.template(d,{LABEL:m,VALUE:n}),p.append(o));h=HZ.utils.Styles.getStyleName(a.s),c=HZ.data.Categories.getCategoryById(a.cat),c&&4!=c.categoryId&&p.append(HZ.utils.Html.template(d,{LABEL:"Category",VALUE:UIHelper.ucwords(c.name)})),h&&p.append(HZ.utils.Html.template(d,{LABEL:"Style",VALUE:UIHelper.ucwords(h)})),a.ma&&p.append(HZ.utils.Html.template(d,{LABEL:"Location",VALUE:UIHelper.ucwords(a.ma)}))}var b=10,c=40,d='<dt class="key">%LABEL%</dt><dd class="value">%VALUE%</dd>',e='<dt class="key">'+_hgt("Sold By")+'</dt><dd class="value"><span class="vendorName"><a target="_blank" href="%VALUE1%" class="colorLink">%VALUE2%</a>&nbsp;</span></dd>',f='<dt class="key">'+_hgt("Sold By")+'</dt><dd class="value"><span class="vendorName">%VALUE%</span></dd>',g='<dt class="key">'+_hgt("Manufactured By")+'</dt><dd class="value"><span class="productManufacturer">%VALUE%</span></dd>',h='<option value="%QTY%">%QTY%</option>';this.updateView=function(d){var e=HZ.data.Spaces.get(d),f=HZ.data.ProductsInfo.get(d),g=$("#mpAddToCartBtn"),i=e.iids[0],j=HZ.data.Images.get(i);$("#hzProductInfo h1").html(e.t),g.attr("vlId",f.lid).attr("hid",d);var k=$(".mpQtyBox");if((f.pending||f.buyable)&&f.avail){k.addClass("inStock"),f.buyable?(g.removeClass("secondary").addClass("primary"),g.html("<i class='cartIcon'></i> "+_hgt("Add to Cart")),g.attr("disabled",!1)):(g.removeClass("primary").addClass("secondary"),g.html("<i class='cartIcon'></i> "+_hgt("Out of Stock")),g.attr("disabled",!0)),f.q<b?k.find(".qtyAlert").html(_hgt("Only {remainingStockQuantity} left!",{remainingStockQuantity:f.q})):k.find(".qtyAlert").empty();var l=c,m=$("#qtySelector").empty();f.q<c&&(l=f.q);for(var n=1;l>=n;n++)m.append($(HZ.utils.Html.template(h,{QTY:n})))}else f.buyable?k.removeClass("nonBuyableParent"):k.addClass("nonBuyableParent"),k.removeClass("inStock"),g.removeClass("primary").addClass("secondary"),g.html("<i class='cartIcon'></i> "+_hgt("Out of Stock")),g.attr("disabled",!0);$("#vlPrices").show(),$("#vlPrice.price").html(f.p),f.msrpstr?$("#vlPrices .price2").removeClass("hide").find(".msrp").html(f.msrpstr):$("#vlPrices .price2").addClass("hide");var o=f.fs?_hgt("Free Shipping!"):"";$("#vlShippingCost").html(o),f&&f.manu?($(".productManufacturer").html(f.manu),$(".productManufacturer").show()):$(".productManufacturer").hide();var p=e.c;if(!p){var f=HZ.data.ProductsInfo.get(e.id);f&&(p=f.desc)}if(p||(p=e.desc),$("#hzProductInfo .description").peekable("setContent",p),f.ltime?$("#hzProductInfo .leadTime").html(f.ltime).show():$("#hzProductInfo .leadTime").hide(),e.c&&f.desc?($("#hzProductInfo .vendorDesc").show(),$("#hzProductInfo .descContent").peekable("setContent",f.desc)):($("#hzProductInfo .descContent").peekable("setContent",""),$("#hzProductInfo .vendorDesc").hide()),$("#hzProductInfo .returnPolicyLink").attr("hid",e.id),a(e,f),HZ.viewSpace.ViewSpaceRenderer.updateView(e.id),HZ.viewSpace.ViewSpaceRenderer.setMainImage(j,0),HZ.data.CurrentSessionUser){$("#addToIdeabookBtn").unbind("click").bind("click",function(){showAddToMyGalleryForm(d)}),$("#askQuestionBtn").unbind("click").bind("click",function(){var a=1;showPostToForumForm(d,a)});{HZ.utils.Links.getEditSpaceLink(d)}if(HZ.houseUtils.Permissions.hasPermission(e,HZ.houseUtils.Permissions.CAN_BURY_HOUSE)||HZ.houseUtils.Permissions.hasPermission(e,HZ.houseUtils.Permissions.CAN_FEATURE_HOUSE)){var q=$("#burySpaceLink, #unburySpaceLink, #featureSpaceLink, #unfeatureSpaceLink");q.length>0&&q.remove(),$(".admin-controls").empty();var r=$("#refreshSpaceLink");if(0==r.length){var s='<a id="refreshSpaceLink" class="colorLink viewSpaceLinkBtn" href="">Refresh to bury/feature</a>';r=$(s)}$(".admin-controls").append(r),r.attr("href",HZ.utils.Links.getSpaceLink(d))}}}},$(document).ready(function(){function a(){$(".recommendedItem").each(function(){var a=$(this).find(".recommendedSpace").height();280>a&&(a=280),$(this).find(".recommendedDetails").height(a)})}var b=null;if($("#moreKeywords").peekable(),HZ.message.Bus.subscribe(HZ.message.Messages.LIGHTBOX_UNLOAD,"viewSpaceLBEdit",function(){return b?window.location.href=HZ.utils.Links.getSpaceLink(b):HZ.productVariation.Manager.setRenderer(HZ.productVariation.ViewSpaceRenderer),!1}),HZ.message.Bus.subscribe(HZ.message.Messages.PHOTO_UPDATED,"viewSpaceLBEdit",function(a,c){b=c.spaceId}),HZ.message.Bus.subscribe(HZ.message.Messages.PHOTO_REMOVED,"viewSpaceLBEdit",function(a,c){b=c.spaceId}),$(".recommendedItems").length){a();var c;$(window).resize(function(){clearTimeout(c),c=setTimeout(a,100)})}$(".spaces-grid").each(function(a,b){$(b).find(".space-meta").equalizeHeights()}),HZ.ns("HZ.reviews"),HZ.reviews.UIManager&&HZ.reviews.UIManager.getInstance().initFocusReviews()});

window.hzmr.push("viewSpace:2059");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End viewSpace.js  **************/
/************* Start imageTag.js for locale en-US **************/
try {// <script>
function truncate(str, maxLength, breakChars, withEllipsis) {
	if (str.length <= maxLength)
		return str;
	var l=Math.min(maxLength-(withEllipsis?3:0), str.length);
	var length = l;
	if (breakChars != null) {
		while (length > 0) {
			var c = str.charAt(length);
			if (breakChars.indexOf(c) > -1)
				break;
			else
				length--;
		}
		if (length == 0)
			length = l;
	}
	var returnValue = str.substring(0, length)+ (withEllipsis?"...":"");
	return returnValue;
}
truncate.WHITE_SPACES = " \t\n\r";
truncate.BR = "\n\r";



var InputFieldTracker = {
	inputField: null,
	previousValue: null,
	changeHandler: null,
	trackerTimeout: null,
	keystrokeTime: null,
	
	trackInputField:function(inputField, callback, keystrokeTime) {
		this.keystrokeTime = keystrokeTime;
		this.inputField = inputField;
		this.callback = callback;
		this.previousValue = inputField.value;
		inputField.onkeyup = hitch(this, this.handleValueChanged);
		inputField.onchange = hitch(this, this.handleValueChanged);
		this.handleValueChanged();
	},
	handleValueChanged:function() {
		this.clearTracker();
		this.trackerTimeout = setTimeout (hitch(this, this.triggerCallback), this.keystrokeTime);
	},
	clearTracker:function() {
		if (this.trackerTimeout)
			clearTimeout(this.trackerTimeout);
		this.trackerTimeout = null;
	},
	triggerCallback:function() {
		this.clearTracker();
		if (this.inputField.value != this.previousValue) {
			try {
				this.callback();
			} catch (err) {
			}
		}
		this.previousValue = this.inputField.value;
	}
}

var productsObj = {
	products:{},
	addProduct:function(productData) {
		if (productData.linkId) {
			productData.link = _h_url_dek_product_ad(productData.linkId);
		}
		this.products[productData.spaceId] = productData;
	},
	getProductBySpaceId:function(spaceId) {
		return this.products[spaceId];
	} 
}

function getImageTagButtonHTML (title, action, className, color) {
	if (!className)
		className = "imageTagPopupButton";
		
	var buttonHtml = "button class='hzBtn "+color +" "+className+"' type='button'";
	buttonHtml += " onclick=\""+action+"\"";
	buttonHtml += ">" + title + "</button>";
	return "<" + buttonHtml;
}

var ImageTagsUI = {
	TOP_LEFT: 0,
	TOP_RIGHT: 1,
	BOTTOM_LEFT: 2,
	BOTTOM_RIGHT: 3,
	
	rootContainer: null,
	screens: {},
	currentImageTag: null,
	currentSpace: null,
	currentScreen: null,
	tagPosition: null,
	dismissCallback: null,
	hideTimeout: null,
	scale: null,
	displayState: true,
	
	init:function(rootContainer, scale) {
		this.rootContainer = rootContainer;
		this.rootContainer.innerHTML = 
			'<div id="imageTagBackground"></div><div class="imageTagPopupContainer" oncontextmenu="ImageTagsUI.handleEvent(event)" style="position:relative;top:0;left:0;opacity:1;">' +
				'<div id="imageTagPopupIcon"></div>'+
				'<div id="imageTagPopupTitle"></div>'+
				'<div id="imageTagPopupBody"></div>'+
			'</div>';
		this.imageTagBackground = document.getElementById("imageTagBackground");
		this.imageTagIcon = document.getElementById("imageTagPopupIcon");
		this.imageTagTitle = document.getElementById("imageTagPopupTitle");
		this.imageTagBody = document.getElementById("imageTagPopupBody");
		this.scale = scale;
	},
	isEditing:function() {
		if (!this.currentScreen)
			return false;
		if (this.currentScreen.isEditing != undefined)
			return this.currentScreen.isEditing;
		else
			return true;
	},
	handleEvent:function(event) {
		event = event || window.event;
		event.cancelBubble = true;
		if (event.stopPropagation)
			event.stopPropagation();
		return false;
	},
	addScreen:function(screenName, screen) {
		this.screens[screenName] = screen;
		screen.delegate = this;
	},
	setScreen:function(screenName) {
		if (!this.rootContainer)
			return;	
		var screen = this.screens[screenName];
		this.currentScreen = screen;
		if (screen.getTitle) {
			this.imageTagTitle.innerHTML = screen.getTitle();
		}	else {
			this.imageTagTitle.innerHTML = "";
		}
		this.imageTagBody.innerHTML = screen.getContent();
		this.updateElementsPosition();
		if (screen.onShow)
			screen.onShow();
	},
	dismiss:function() {
		if (this.dismissCallback)
			this.dismissCallback();
		this.triggerHide();
	},
	triggerHide:function() {
		this.resetHideTimeout();
		this.hideTimeout = setTimeout (hitch (this, this._hide), 50);
	},
	resetHideTimeout:function() {
		if (this.hideTimeout) {
			clearTimeout(this.hideTimeout);
			this.hideTimeout = null;
		}
	},	
	setCurrentImageTag:function(imageTag) {
		if (!this.rootContainer || imageTag == null)
			return;
		this.currentImageTag = imageTag;
		if (imageTag.x*this.scale > 300)
			this.tagPosition = this.TOP_RIGHT;
		else
			this.tagPosition = this.TOP_LEFT;
	},
	initNewImageTag:function (x,y) {
		this.setCurrentImageTag({
			x:x,	y:y,
			imageTagId:0, type:"", targetSpaceId:"", vendorName:"",	comments:"", link: ""
		});
	},
	updateElementsPosition:function() {
		if (this.currentImageTag == null)
			return;
		var w = this.currentScreen.getWidth();
		var cit = {x:this.currentImageTag.x*this.scale, y:this.currentImageTag.y*this.scale};
		var s = this.rootContainer.style;
		var x,y;
		var scale = this.scale;
				

		s.width = w + 'px';
		if (this.currentScreen.requiresScreenCenter) {
			this.imageTagIcon.style.display = "none";
			this.imageTagTitle.style.paddingLeft= "12px";
		} else {
			this.imageTagIcon.style.display = "block";
			switch (this.tagPosition) {
				case this.TOP_LEFT:
					x = cit.x-14;
					y = cit.y-14;
					this.imageTagIcon.style.left = "8px";
					this.imageTagIcon.style.top = "11px";
					this.imageTagTitle.style.paddingLeft= "40px";
					this.imageTagTitle.style.paddingRight= "12px";
					break;
				case this.TOP_RIGHT:
					x = cit.x - w + 32; 
					y = cit.y -14;
					this.imageTagIcon.style.left = (w - 38) + "px";
					this.imageTagIcon.style.top = "11px";
					this.imageTagTitle.style.paddingLeft= "12px";
					this.imageTagTitle.style.paddingRight= "40px";
					break;
			}
			s.left = x+'px';
			s.top = y+'px';
		}
		var bounds = getElementPosition(this.rootContainer);
		this.imageTagBackground.style.width = bounds.w+'px';
		this.imageTagBackground.style.height = bounds.h+'px';
		if (this.isEditing())
			UIHelper.showModalLayer();
	},
	show:function() {
		if (!this.rootContainer || imageTag == null || this.displayState == false)
			return;
		this.resetHideTimeout();
		this.rootContainer.style.display='block';
		this.updateElementsPosition();
	},	
	_hide:function() {
		this.resetHideTimeout();
		UIHelper.hideModalLayer();
		this.rootContainer.style.display='none';
		this.setScreen("view");
	},
	disableTagsUI:function() {
		this.displayState = false;
		if(this.rootContainer)
			this.rootContainer.style.display='none';
	},
	enableTagsUI:function() {
		this.displayState = true;
		if(this.rootContainer)
			this.rootContainer.style.display='block';
	}
}

var imageTagsChoicesScreen = {
	getWidth:function() {return 212},
	getTitle:function() {return _hgt("Create an Image Tag")},
	getContent:function() {
		return "<div class='imageTagPopupChoices'>" +
				_hgt("Choose tag type") + ":<br/>" +
				"<a href='javascript:imageTagsChoicesScreen.addProductTag()'><img class='imageTagPopupChoicesButtons imageTagPopupProduct' src='" + HZ.utils.Config.emptyGifData + "'><span class='imageTagPopupChoicesButtonsText imageTagPopupProductText'>"+_hgt("Product Tag")+"</span></a>" +
				"<a href='javascript:imageTagsChoicesScreen.addInfoTag()'><img class='imageTagPopupChoicesButtons imageTagPopupInfo' src='" + HZ.utils.Config.emptyGifData + "'><span class='imageTagPopupChoicesButtonsText imageTagPopupInfoText'>"+_hgt("Image Note")+"</span></a>" +
				// "<li><a href='javascript:ImageTagsUI.setScreen(\"askQuestion\")'>Ask a question about this area &raquo;</a><br>" +
				"</div>" +
				"<div class='imageTagPopupActions'>" +
				getImageTagButtonHTML (_hgt("Cancel"), "ImageTagsUI.dismiss()", "", "secondary") +
				"</div>";
	},
	addInfoTag:function() {
		ImageTagsUI.setScreen("editInfo");
	},
	addProductTag:function() {
		ImageTagsUI.setScreen("lookupProduct");
	}
};
ImageTagsUI.addScreen ("choices", imageTagsChoicesScreen); 

var imageTagsLookupProductScreen = {
	currentSearchTerm:"",
	requiresScreenCenter: true,
	getWidth:function() {return 545},
	getTitle:function() {return _hgt("Add Product Tag")},
	getContent:function() {
		var html = "<form name='productLookup' onsubmit='return false;'>" + _hgt("Lookup product") + ": <input id='productLookupQuery' name='productLookupQuery' value='"+this.currentSearchTerm+"'>" +
			getImageTagButtonHTML (_hgt("Search"), "imageTagsLookupProductScreen.lookupProduct()", null, "secondary") +
			"</form>" + 
			"<div id='productLookupResults'></div>" +
			"</div><div class='imageTagPopupActions'>" +
//			getImageTagButtonHTML ("Back", "ImageTagsUI.setScreen('choices')", null, "secondary") +
			getImageTagButtonHTML (_hgt("Cancel"), "ImageTagsUI.dismiss()", null, "secondary") +
			"</div>";
		return html;
	},
	onShow:function() {
		document.getElementById("productLookupQuery").focus();
		InputFieldTracker.trackInputField(document.productLookup.productLookupQuery, hitch(this, this.lookupProduct), 300);
		if (document.productLookup.productLookupQuery.value != "")
			this.lookupProduct();
	},
	lookupProduct:function() {
		var resultsDiv = document.getElementById("productLookupResults");
		resultsDiv.innerHTML = "<div class='productLookupResultsStrip'>" + _hgt("Searching") + "...</div>";
		resultsDiv.style.height = "155px";
		ImageTagsUI.imageTagBackground.style.height = "270px";
		this.currentSearchTerm = document.productLookup.productLookupQuery.value;
		var params = '/value='+this.currentSearchTerm;
		callback = hitch (this, this.handleProductLookupResults);
		ajaxc.makeRequest('http://www.houzz.com/productLookup','query', params,callback,'');
	},
	handleProductLookupResults:function(data) {
		html = "";
		if (eval(data.success) && data.results.length > 0) {
			html += "<div class='productLookupResultsStrip' style='width:"+(130*data.results.length)+"px;'>";
			for (var i=0; i < data.results.length; i++) {
				var space = data.results[i];
				productsObj.addProduct(space);
				var dims = UIHelper.getImageSize (space, 0);
				var style = "width:"+dims.w+"px;height:"+dims.h+"px;padding-top:"+(40-dims.h/2)+"px;";
				html += "<div class='productLookupResult'>" +
					"<a href='javascript:imageTagsLookupProductScreen.selectProduct("+space.spaceId+")' style='display:block;' class='productLookupImage'><img border=0 src='"+space.thumb0+"' style='"+style+"'></a>" +
					"<a href='javascript:imageTagsLookupProductScreen.selectProduct("+space.spaceId+")' style='display:block;'>" + space.title + "</a>" +
					"</div>"; 
			}
			html += "</div>";
		} else {
			html = "<div class='productLookupResultsStrip'>" + _hgt("No results found") + ".</div>";
		}
		document.getElementById("productLookupResults").innerHTML = html;
	},
	selectProduct:function(spaceId) {
		this.delegate.currentSpace = productsObj.getProductBySpaceId(spaceId);
		this.delegate.setScreen("addProduct");
	} 
};
ImageTagsUI.addScreen("lookupProduct", imageTagsLookupProductScreen);

var imageTagsAddProductScreen = {
	requiresScreenCenter: true,
	getWidth:function() {return 545},
	getTitle:function() {return _hgt("Confirm new product tag")},
	getContent:function() {
		var space = this.delegate.currentSpace,
			comment = space.comment ? truncate(space.comment, 400, truncate.BR, true) : "";			
		html = "<div class='productInformation'>" +
			"<a href='"+HZ.utils.Links.getSpaceLink(space.spaceId)+"' target='_blank' style='float:left;margin-right:6px;width:160px;min-height:200px;'><img src='"+space.thumb1+"' border=0></a>" +
			"<div style='float:left;'>" +
			"<div class='productField'>" + _hgt("Id") + ":</div><div class='productValue'>"+space.spaceId+"</div>" +
			"<div class='productField'>" + _hgt("Title") + ":</div><div class='productValue'>"+space.title+"</div>" +
			"<div class='productField'>" + _hgt("Comments") + ":</div><div class='productValue'>"+comment+"</div>";
		if (space.price && space.price != "")
			html += "<div class='productField'>" + _hgt("Price") + ":</div><div class='productValue'>"+space.price+"</div>";
		if (space.link)
			html += "<div class='productField'>" + _hgt("Link") + ":</div><div class='productValue'><a href='"+space.link+"' target='_blank'>"+space.link.substring(0,30)+"</a></div>";
		if (space.professionalId && space.professionalName)
			html += "<div class='productField'>" + _hgt("By") + ":</div><div class='productValue'><a href='"+HZ.utils.Links.getProfessionalLinkByProId(space.professionalId)+"' target='_blank'>"+space.professionalName+"</a></div>";
		html +=	"<div class='productField'>" + _hgt("Image size") + ":</div><div class='productValue'>"+space.width+"x"+space.height+"</div>" +
			"</div><div style='clear:both'></div>" +
			"</div><div class='imageTagPopupActions'>" +
//			getImageTagButtonHTML ("Back", "ImageTagsUI.setScreen('lookupProduct')", null, "secondary") +
			getImageTagButtonHTML (_hgt("Cancel"), "ImageTagsUI.dismiss()", null, "secondary") +
			getImageTagButtonHTML (_hgt("Confirm"), "imageTagsAddProductScreen.confirmAction()", null, "secondary") +
			"</div>";
		return html;
	},
	confirmAction:function() {
		var tag = this.delegate.currentImageTag;
		mixin (tag, 
			{ 
				type:2,
				targetSpaceId:this.delegate.currentSpace.spaceId
			}
		);
		ImageTagsAjaxController.addImageTag(tag, this.confirmActionCallback);
	},
	confirmActionCallback:function(resultObj) {
		if (resultObj.success == "true") {
			imageTagIndex = imageTagsObj.addImageTag(resultObj.imageTagId,resultObj.vendorName,resultObj.link,resultObj.comments,resultObj.x,resultObj.y,resultObj.type,resultObj.targetSpaceId,true,true);
			imageTagsObj.addImageTagHTML(imageTagIndex);
		} else {
			alert(resultObj.error); // display the error
		}
		ImageTagsUI.dismiss();		
	}
};
ImageTagsUI.addScreen("addProduct", imageTagsAddProductScreen);
			
var imageTagsAskQuestionsScreen = {
	getWidth:function() {return 400},
	getTitle:function() {return _hgt("Ask a question")},
	getContent:function() {
		var html = "<div class='imageTagPopupActions'>" +
				"<input type='button' value='Cancel' onclick='javascript:ImageTagsUI.dismiss()'>" +
				"</div>";
		return html;
	}
};
ImageTagsUI.addScreen("askQuestion", imageTagsAskQuestionsScreen);

function addHrefToURL(text,newWindow) {
	var url_matches = [/(https?:\/\/([-\w\.]+)+(:\d+)?(\/([-\w/_\.]*(\?\S+)?)?)?)/g, /([wW]{3}\.([-\w\.]+)+(:\d+)?(\/([-\w/_\.]*(\?\S+)?)?)?)/g];
	var replacement = "<a href='$1'>$1</a>";
	if (newWindow)
		replacement = "<a href='$1' target='_blank'>$1</a>";
	for (var i=0; i < 2; i++) {
		newText = text.replace (url_matches[i], replacement);
		if (newText != text)
			return newText;
	}
	return text;
}

var imageTagsViewScreen = {
	getWidth:function() {return (this.delegate.currentImageTag.type == 2)?300:212},
	allowDirectProductLinks:false,
	isEditing:false,
	getTitle:function() {
		var tag = this.delegate.currentImageTag; 
		if (tag.type == 2) {
			var productSpace = productsObj.getProductBySpaceId(tag.targetSpaceId);
			var dims = UIHelper.getImageSize (productSpace, 0);
			var imageStyle = (this.delegate.tagPosition == this.delegate.TOP_RIGHT)?"float:left;margin-right:5px":"float:right"; 
			var imageHtml = "<a class='imageTagPopupProductImage' style='"+imageStyle+"' href='" + HZ.utils.Links.getSpaceLink(productSpace.spaceId) + "'><img src='" +HZ.utils.Links.getSpaceImageThumbUrl(productSpace.spaceId,0)+"' style='width:"+dims.w+"px;height:"+dims.h+"px'></a>"
			var titleHtml = "<div class='imageTagPopupProductTitle'><a href='" + HZ.utils.Links.getSpaceLink(productSpace.spaceId) + "'>" + productSpace.title + "</a></div>";
			var clear = "<div style='clear:both'></div>";
			return imageHtml + titleHtml + clear;
		} else
			return tag.vendorName || "&nbsp;";
	},
	getContent:function() {
		var tag = this.delegate.currentImageTag;
		var html = '';
		if (tag.type == 2) {
			var productSpace = productsObj.getProductBySpaceId(tag.targetSpaceId);
			var comment = productSpace.comments.match (/.*/)[0];
			comment = truncate(comment, 400, truncate.BR, true);
			var truncated = comment.length < productSpace.comments.length;
			html += "<div class='imageTagPopupDescription'>" + return2br(comment) +
				(truncated?" <a class='icon-wrap' href='" + HZ.utils.Links.getSpaceLink(productSpace.spaceId) +"'>" + _hgt("more") + "<span class='more-icon'></span></a>":"") +
				"</div>";
			if (productSpace.professionalId && productSpace.professionalName && productSpace.isAdvertiseSpace)
				html += "<div class='imageTagPopupProfessional'>by <a href='"+HZ.utils.Links.getProfessionalLinkByProId(productSpace.professionalId)+"'>"+productSpace.professionalName+"</a></div>";
			html += "<div class='imageTagPopupBottom'>";
			if (productSpace.price && productSpace.price!="")
				if (productSpace.link && this.allowDirectProductLinks)
					html += getImageTagButtonHTML (productSpace.price, "imageTagsViewScreen.priceAction()", "imageTagPopupPriceLinked imageTagPopupButton imageTagPopupButtonNoMargin", "secondary");
				else
					html += "<span class='imageTagPopupPriceNotLinked'>" + productSpace.price + "</span>";
			var visitStoreText = _hgt("Go to Site");
			if(productSpace.isAdvertiseSpace)
				visitStoreText = _hgt("Visit Store") + " <span class='more-icon'></span>";
			if ((!productSpace.price || productSpace.price == "") && this.allowDirectProductLinks && productSpace.link)
				html += getImageTagButtonHTML (visitStoreText, "imageTagsViewScreen.visitStore()", "imageTagPopupButton imageTagPopupButtonNoMargin imageTagPopupInfo", "primary") + "</div>";
			else					
				html += getImageTagButtonHTML (_hgt("More Info"), "imageTagsViewScreen.openProduct()", "imageTagPopupButton imageTagPopupButtonNoMargin imageTagPopupInfo", "primary") +
					"</div>";
		} else {
			html += "<div class='imageTagPopupComment'>"+return2br(addHrefToURL(tag.comments))+"</div>" +
			((tag.type == 1)?"<div class='imageTagPopupPrivateComment'>(" + _hgt("private comment") + ")</div>":""); 
		}
		html += "<div class='imageTagPopupActions'>";
		if (tag.canEdit && tag.type != 2)
			html += getImageTagButtonHTML (_hgt("Edit"), "imageTagsViewScreen.editAction()", "", "secondary");
		if (tag.canDelete) 
			html += getImageTagButtonHTML (_hgt("Delete"), "imageTagsViewScreen.deleteAction()", "", "secondary");
		html += "</div>";
		return html;
	},
	editAction:function() {
		ImageTagsUI.setScreen("editInfo");
	},
	deleteAction:function() {
		var approveDelete = (this.delegate.currentImageTag.type == 2) || confirm (_hgt("Are you sure you want to delete this tag?"));
		if (approveDelete)
			ImageTagsAjaxController.deleteImageTag(this.delegate.currentImageTag, this.deleteActionCallback);
	},
	deleteActionCallback:function(resultObj) {
		imageTagsObj.deleteImageTag(resultObj.imageTagId);
		ImageTagsUI.dismiss();
	},
	visitStore:function() {
		var productSpace = productsObj.getProductBySpaceId(this.delegate.currentImageTag.targetSpaceId);
		if (productSpace) 
			window.open(productSpace.link, "_blank", "");
	},
	openProduct:function() {
		document.location = HZ.utils.Links.getSpaceLink(this.delegate.currentImageTag.targetSpaceId);
	},
	priceAction:function() {
		var productSpace = productsObj.getProductBySpaceId(this.delegate.currentImageTag.targetSpaceId);
		if (productSpace) 
			window.open(productSpace.link, "_blank", "");
	}
} 
ImageTagsUI.addScreen("view", imageTagsViewScreen);

var imageTagsHighlightProductScreen = {
	getWidth:function() {return 212},
	isEditing:false,
	getTitle:function() {
		var tag = this.delegate.currentImageTag; 
		if (tag.type == 2) {
			var productSpace = productsObj.getProductBySpaceId(tag.targetSpaceId);
			return productSpace.title;
		}
	},
	getContent:function() {
		return "";
	}
} 
ImageTagsUI.addScreen("highlightProduct", imageTagsHighlightProductScreen);

var imageTagsEditInfoScreen = {
	getWidth:function() {return 212},
	getTitle:function() {
		if (this.delegate.currentImageTag.imageTagId == 0)
	 		return isPublicImageNoteAllowed?_hgt("Add an Image Note"):_hgt("Add a Private Note");
	 	else
	 		return isPublicImageNoteAllowed?_hgt("Edit an Image Note"):_hgt("Edit a Private Note");
	},
	getContent:function() {
		var tag = this.delegate.currentImageTag;
		var comments = "";
		var vendorName = "";
		var isPrivate = false;
		if (tag.imageTagId != 0) {
			vendorName = tag.vendorName;
			comments = tag.comments;
			isPrivate = tag.type == 1;
		} 
		
		if (!isPublicImageNoteAllowed) {
			isPrivate = true;
		}		
		var html = 
				"<form id='imageTagInfoEditor' name='imageTagInfoEditor' onsubmit='imageTagsEditInfoScreen.okAction();return false;'>" +
				"<div id='imageTagInfoMessage'></div>" + 
				"<div style='padding-bottom: 5px;'>" + _hgt("What is this?") + "</div>" +
				"<div>" +
						"<input type='text' id='vendorName' name='vendorName' class='tagEditorInput' maxlength='40' value='"+addQuoteSlashes(vendorName)+"'></input>" +
				"</div>" +
				"<div class='vspace10'></div><div style='padding-bottom: 5px;'>" + _hgt("Comments") + "</div>" +
				"<div><textarea id='comments' name='comments'  rows=5 class='tagEditorInput'>"+comments+"</textarea></div>" +
				"<div style='font-size:11px'>" + _hgt("use 'http://...' in your comment text to include a link") + "</div>" +
				"<div " + (!isPublicImageNoteAllowed?'style="display:none;" ':'') + 
						"><div style='margin-top: 5px;'><input type='checkbox' name='isprivate' " +
						(isPrivate?'checked':'') + "> " + _hgt("private comment") + 
				"</div></div>" +
				"<div class='imageTagPopupActions'>" +
					getImageTagButtonHTML (_hgt("Cancel"), "ImageTagsUI.dismiss()", "", "secondary") +
					getImageTagButtonHTML (_hgt("Ok"), "imageTagsEditInfoScreen.okAction()", "", "secondary") +
				"</div>" + 
				"</form>";
		return html;
	},
	okAction:function() {
		var vendorName = document.imageTagInfoEditor.vendorName.value;
		var comments = document.imageTagInfoEditor.comments.value
		var messageBox = document.getElementById ("imageTagInfoMessage");
		if (vendorName == "" && comments == "") {
			messageBox.innerHTML = _hgt('Please provide image tag details below');
			messageBox.className='imageTagInfoErrorMessage';
			return;
		}
		messageBox.innerHTML = _hgt('Saving information...');
		messageBox.className='imageTagInfoOkMessage';
	
		var tag = this.delegate.currentImageTag;
		tag.vendorName = vendorName;
		tag.comments = comments;
		if (document.imageTagInfoEditor.isprivate.checked)
			tag.type = 1;
		else
		 	tag.type = 0;
		if (tag.imageTagId == 0)
			ImageTagsAjaxController.addImageTag(this.delegate.currentImageTag, this.okActionCallback);
		else
			ImageTagsAjaxController.updateImageTag(this.delegate.currentImageTag, this.okActionCallback);
	},
	okActionCallback:function(resultObj) {
		if (resultObj.success == "true") {
			if (resultObj.operation == 'a')	{
				imageTagIndex = imageTagsObj.addImageTag(resultObj.imageTagId,resultObj.vendorName,resultObj.link,resultObj.comments,resultObj.x,resultObj.y,resultObj.type,resultObj.targetSpaceId,true,true);
				imageTagsObj.addImageTagHTML(imageTagIndex);
			} else if (resultObj.operation == 'u') {
				imageTagIndex = imageTagsObj.updateImageTag(resultObj.imageTagId,resultObj.vendorName,resultObj.link,resultObj.comments,resultObj.x,resultObj.y,resultObj.type,resultObj.targetSpaceId);
			}
		} else {
			alert(resultObj.error); // display the error
		}
		ImageTagsUI.dismiss();		
	}
}
ImageTagsUI.addScreen("editInfo", imageTagsEditInfoScreen);

window.hzmr.push("imageTag:2059");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End imageTag.js  **************/
/************* Start jquery.scrollTo.js for locale en-US **************/
try {!function(a){"use strict";a(["jquery"],function(a){function b(b){return a.isFunction(b)||"object"==typeof b?b:{top:b,left:b}}var c=a.scrollTo=function(b,c,d){return a(window).scrollTo(b,c,d)};return c.defaults={axis:"xy",duration:parseFloat(a.fn.jquery)>=1.3?0:1,limit:!0},c.window=function(){return a(window)._scrollable()},a.fn._scrollable=function(){return this.map(function(){var b=this,c=!b.nodeName||-1!=a.inArray(b.nodeName.toLowerCase(),["iframe","#document","html","body"]);if(!c)return b;var d=(b.contentWindow||b).document||b.ownerDocument||b;return/webkit/i.test(navigator.userAgent)||"BackCompat"==d.compatMode?d.body:d.documentElement})},a.fn.scrollTo=function(d,e,f){return"object"==typeof e&&(f=e,e=0),"function"==typeof f&&(f={onAfter:f}),"max"==d&&(d=9e9),f=a.extend({},c.defaults,f),e=e||f.duration,f.queue=f.queue&&f.axis.length>1,f.queue&&(e/=2),f.offset=b(f.offset),f.over=b(f.over),this._scrollable().each(function(){function g(a){j.animate(l,e,f.easing,a&&function(){a.call(this,k,f)})}if(null!=d){var h,i=this,j=a(i),k=d,l={},m=j.is("html,body");switch(typeof k){case"number":case"string":if(/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(k)){k=b(k);break}if(k=m?a(k):a(k,this),!k.length)return;case"object":(k.is||k.style)&&(h=(k=a(k)).offset())}var n=a.isFunction(f.offset)&&f.offset(i,k)||f.offset;a.each(f.axis.split(""),function(a,b){var d="x"==b?"Left":"Top",e=d.toLowerCase(),o="scroll"+d,p=i[o],q=c.max(i,b);if(h)l[o]=h[e]+(m?0:p-j.offset()[e]),f.margin&&(l[o]-=parseInt(k.css("margin"+d))||0,l[o]-=parseInt(k.css("border"+d+"Width"))||0),l[o]+=n[e]||0,f.over[e]&&(l[o]+=k["x"==b?"width":"height"]()*f.over[e]);else{var r=k[e];l[o]=r.slice&&"%"==r.slice(-1)?parseFloat(r)/100*q:r}f.limit&&/^\d+$/.test(l[o])&&(l[o]=l[o]<=0?0:Math.min(l[o],q)),!a&&f.queue&&(p!=l[o]&&g(f.onAfterFirst),delete l[o])}),g(f.onAfter)}}).end()},c.max=function(b,c){var d="x"==c?"Width":"Height",e="scroll"+d;if(!a(b).is("html,body"))return b[e]-a(b)[d.toLowerCase()]();var f="client"+d,g=b.ownerDocument.documentElement,h=b.ownerDocument.body;return Math.max(g[e],h[e])-Math.min(g[f],h[f])},c})}("function"==typeof define&&define.amd?define:function(a,b){"undefined"!=typeof module&&module.exports?module.exports=b(require("jquery")):b(jQuery)});

window.hzmr.push("jquery.scrollTo:2059");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End jquery.scrollTo.js  **************/
/************* Start jquery.easing.1.3.js for locale en-US **************/
try {jQuery.easing.jswing=jQuery.easing.swing,jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(a,b,c,d,e){return jQuery.easing[jQuery.easing.def](a,b,c,d,e)},easeInQuad:function(a,b,c,d,e){return d*(b/=e)*b+c},easeOutQuad:function(a,b,c,d,e){return-d*(b/=e)*(b-2)+c},easeInOutQuad:function(a,b,c,d,e){return(b/=e/2)<1?d/2*b*b+c:-d/2*(--b*(b-2)-1)+c},easeInCubic:function(a,b,c,d,e){return d*(b/=e)*b*b+c},easeOutCubic:function(a,b,c,d,e){return d*((b=b/e-1)*b*b+1)+c},easeInOutCubic:function(a,b,c,d,e){return(b/=e/2)<1?d/2*b*b*b+c:d/2*((b-=2)*b*b+2)+c},easeInQuart:function(a,b,c,d,e){return d*(b/=e)*b*b*b+c},easeOutQuart:function(a,b,c,d,e){return-d*((b=b/e-1)*b*b*b-1)+c},easeInOutQuart:function(a,b,c,d,e){return(b/=e/2)<1?d/2*b*b*b*b+c:-d/2*((b-=2)*b*b*b-2)+c},easeInQuint:function(a,b,c,d,e){return d*(b/=e)*b*b*b*b+c},easeOutQuint:function(a,b,c,d,e){return d*((b=b/e-1)*b*b*b*b+1)+c},easeInOutQuint:function(a,b,c,d,e){return(b/=e/2)<1?d/2*b*b*b*b*b+c:d/2*((b-=2)*b*b*b*b+2)+c},easeInSine:function(a,b,c,d,e){return-d*Math.cos(b/e*(Math.PI/2))+d+c},easeOutSine:function(a,b,c,d,e){return d*Math.sin(b/e*(Math.PI/2))+c},easeInOutSine:function(a,b,c,d,e){return-d/2*(Math.cos(Math.PI*b/e)-1)+c},easeInExpo:function(a,b,c,d,e){return 0==b?c:d*Math.pow(2,10*(b/e-1))+c},easeOutExpo:function(a,b,c,d,e){return b==e?c+d:d*(-Math.pow(2,-10*b/e)+1)+c},easeInOutExpo:function(a,b,c,d,e){return 0==b?c:b==e?c+d:(b/=e/2)<1?d/2*Math.pow(2,10*(b-1))+c:d/2*(-Math.pow(2,-10*--b)+2)+c},easeInCirc:function(a,b,c,d,e){return-d*(Math.sqrt(1-(b/=e)*b)-1)+c},easeOutCirc:function(a,b,c,d,e){return d*Math.sqrt(1-(b=b/e-1)*b)+c},easeInOutCirc:function(a,b,c,d,e){return(b/=e/2)<1?-d/2*(Math.sqrt(1-b*b)-1)+c:d/2*(Math.sqrt(1-(b-=2)*b)+1)+c},easeInElastic:function(a,b,c,d,e){var f=1.70158,g=0,h=d;if(0==b)return c;if(1==(b/=e))return c+d;if(g||(g=.3*e),h<Math.abs(d)){h=d;var f=g/4}else var f=g/(2*Math.PI)*Math.asin(d/h);return-(h*Math.pow(2,10*(b-=1))*Math.sin(2*(b*e-f)*Math.PI/g))+c},easeOutElastic:function(a,b,c,d,e){var f=1.70158,g=0,h=d;if(0==b)return c;if(1==(b/=e))return c+d;if(g||(g=.3*e),h<Math.abs(d)){h=d;var f=g/4}else var f=g/(2*Math.PI)*Math.asin(d/h);return h*Math.pow(2,-10*b)*Math.sin(2*(b*e-f)*Math.PI/g)+d+c},easeInOutElastic:function(a,b,c,d,e){var f=1.70158,g=0,h=d;if(0==b)return c;if(2==(b/=e/2))return c+d;if(g||(g=.3*e*1.5),h<Math.abs(d)){h=d;var f=g/4}else var f=g/(2*Math.PI)*Math.asin(d/h);return 1>b?-.5*h*Math.pow(2,10*(b-=1))*Math.sin(2*(b*e-f)*Math.PI/g)+c:h*Math.pow(2,-10*(b-=1))*Math.sin(2*(b*e-f)*Math.PI/g)*.5+d+c},easeInBack:function(a,b,c,d,e,f){return void 0==f&&(f=1.70158),d*(b/=e)*b*((f+1)*b-f)+c},easeOutBack:function(a,b,c,d,e,f){return void 0==f&&(f=1.70158),d*((b=b/e-1)*b*((f+1)*b+f)+1)+c},easeInOutBack:function(a,b,c,d,e,f){return void 0==f&&(f=1.70158),(b/=e/2)<1?d/2*b*b*(((f*=1.525)+1)*b-f)+c:d/2*((b-=2)*b*(((f*=1.525)+1)*b+f)+2)+c},easeInBounce:function(a,b,c,d,e){return d-jQuery.easing.easeOutBounce(a,e-b,0,d,e)+c},easeOutBounce:function(a,b,c,d,e){return(b/=e)<1/2.75?7.5625*d*b*b+c:2/2.75>b?d*(7.5625*(b-=1.5/2.75)*b+.75)+c:2.5/2.75>b?d*(7.5625*(b-=2.25/2.75)*b+.9375)+c:d*(7.5625*(b-=2.625/2.75)*b+.984375)+c},easeInOutBounce:function(a,b,c,d,e){return e/2>b?.5*jQuery.easing.easeInBounce(a,2*b,0,d,e)+c:.5*jQuery.easing.easeOutBounce(a,2*b-e,0,d,e)+.5*d+c}});

window.hzmr.push("jquery.easing.1.3:2059");
} catch (err) {HZ.utils.Logger.sendJsExceptionStackTrace(err)}

/*************  End jquery.easing.1.3.js  **************/
