/* Simple JavaScript Inheritance
* By John Resig http://ejohn.org/
* MIT Licensed.
*/
// Inspired by base2 and Prototype
(function(){
var initializing = false, fnTest = /xyz/.test(function(){xyz;}) ? /\b_super\b/ : /.*/;
// The base Class implementation (does nothing)
this.JClass = function(){};
// Create a new JClass that inherits from this JClass
JClass.extend = function(prop) {
var _super = this.prototype;
// Instantiate a base class (but only create the instance,
// don't run the init constructor)
initializing = true;
var prototype = new this();
initializing = false;
// Copy the properties over onto the new prototype
for (var name in prop) {
// Check if we're overwriting an existing function
prototype[name] = typeof prop[name] == "function" &&
typeof _super[name] == "function" && fnTest.test(prop[name]) ?
(function(name, fn){
return function() {
var tmp = this._super;
// Add a new ._super() method that is the same method
// but on the super-class
this._super = _super[name];
// The method only need to be bound temporarily, so we
// remove it when we're done executing
var ret = fn.apply(this, arguments);
this._super = tmp;
return ret;
};
})(name, prop[name]) :
prop[name];
}
// The dummy class constructor
function JClass() {
// All construction is actually done in the init method
if ( !initializing && this.init )
this.init.apply(this, arguments);
}
// Populate our constructed prototype object
JClass.prototype = prototype;
// Enforce the constructor to be what we expect
JClass.prototype.constructor = JClass;
// And make this class extendable
JClass.extend = arguments.callee;
return JClass;
};
})();
function dakisIsIE()
{return((navigator.userAgent.toLowerCase().indexOf("msie")!=-1)&&!window.opera)?true:false;}
function fakeFunction()
{}
var g_dakisGalleryImages=new Array();var g_dakisNbImageGalleries=0;function dakisCreateImageGallery(thumbnailClass,changeImageEvent,fullImageElementId,fullImageSuffix,selectedImageClass,textElementId)
{thumbnails=document.getElementsByClassName(thumbnailClass);firstThumbnail=null;if(g_dakisNbImageGalleries>0)
{fullImageElementId=fullImageElementId+(g_dakisNbImageGalleries+1).toString();}
fullImageElement=$("#"+fullImageElementId);if(fullImageElement.length==0)
{alert("Gallery Image Error: The large gallery image element doesn't exist. Make sure an element has the id: "+fullImageElementId);return;}
if(fullImageElement[0].nodeName.toLowerCase()!="img")
{alert("Gallery Image Error: The large gallery must be an image. It is actually a: "+fullImageElement.tagName);return;}
for(var i=0;i0)
{$("#"+textElementId).html(this.alt);}
if($("#"+fullImageElementId).attr("src")==largeFile)
{return;}
$("#"+fullImageElementId).attr("src",largeFile);};}};if(firstThumbnail==null)
{alert("Gallery Image Error: No thumbnail found for the full image element id: "+fullImageElementId);}
firstThumbnail[changeImageEvent]();g_dakisNbImageGalleries++;}
var g_templateHoverImages={};function templateLoadHoverImage(image,hoverSrc,forceReload)
{if(!forceReload&&typeof(image.hoverImage)!="undefined"&&image.hoverImage!=null)
{return;}
if(typeof(image.src)=="undefined"||image.src==null)
{setTimeout(function(){templateLoadHoverImage(image,hoverSrc,forceReload);},100);return;}
var originalSrc=image.src;image.originalImage=new Image();image.originalImage.src=originalSrc;var hoverImage=g_templateHoverImages[hoverSrc];if(hoverImage==null)
{hoverImage=new Image();hoverImage.src=hoverSrc;g_templateHoverImages[hoverSrc]=hoverImage;}
image.hoverImage=hoverImage;image.hoverIndex=g_nbHoverImages;g_nbHoverImages++;}
function templateOnImageMouseHover(image,originalSrc,hoverSrc)
{if(typeof(originalSrc)=="undefined")
{if(typeof(image.originalImage)=="undefined")
{return;}
originalSrc=image.originalImage.src;hoverSrc=image.hoverImage.src;}
var queueName="templateHover"+image.hoverIndex;jQuery(image).fadeTo(120,0.6,function(){image.src=hoverSrc;jQuery(image).fadeTo(200,1.0);});}
function templateOnImageMouseOut(image,originalSrc,hoverSrc)
{if(typeof(originalSrc)=="undefined")
{if(typeof(image.originalImage)=="undefined")
{return;}
originalSrc=image.originalImage.src.replace(/&/g,"%26");hoverSrc=image.hoverImage.src.replace(/&/g,"%26");}
if(originalSrc==hoverSrc)
{return;}
var queueName="templateHover"+image.hoverIndex;jQuery(image).fadeTo(120,0.6,function(){image.src=originalSrc;jQuery(image).fadeTo(200,1.0);});}
function templateMakeSureUsingOriginalImageSrc(image)
{if(typeof(image)!="undefined"&&image!=null&&typeof(image.originalImage)!="undefined")
{image.src=image.originalImage.src;}}
function dakisButtonUpEvent(element)
{Element.setOpacity(element,1);}
function dakisButtonDownEvent(element,width)
{$(element).css("opacity",0.75);}
function dakisBackToTop()
{var x1=x2=x3=0;var y1=y2=y3=0;if(document.documentElement){x1=document.documentElement.scrollLeft||0;y1=document.documentElement.scrollTop||0;}
if(document.body){x2=document.body.scrollLeft||0;y2=document.body.scrollTop||0;}
x3=window.scrollX||0;y3=window.scrollY||0;var x=Math.max(x1,Math.max(x2,x3));var y=Math.max(y1,Math.max(y2,y3));window.scrollTo(Math.floor(x/2),Math.floor(y/2));if(x>0||y>0){window.setTimeout("dakisBackToTop()",25);}}
function dakisLoadAdRotators(templateElementId)
{var id=0;var adRotators=document.getElementsByClassName("dakisAdRotator");adRotators.each(function(element)
{element.id="dakisAdRotator"+id;var advertiser=new DakisProductAdvertiser2(element.id,templateElementId);advertiser.imageWidth=g_dakisAdRotatorImageWidth;advertiser.imageHeight=g_dakisAdRotatorImageHeight;advertiser.delay=g_dakisAdRotatorDelay;advertiser.afterMerchandiseImported=dakisProcessImportedProduct;advertiser.start();id++;});}
function dakisLoadAdRotators2(templateElementId,host,retailer_guid,lang)
{var id=0;var adRotators=jQuery(".dakisAdRotator");var firstIndex=0;if(g_dakisAdRotatorRandomOrder)
{firstIndex=Math.random()*100;}
for(var t=0;t0&&!merchandise.hidePriceEnabled)
{regPriceElement.show();if(isMap)
{regPriceElement.html("see price in cart!");}}
if(isMap)
{var ourPriceElement=$("#"+id+"_ourprice");if(ourPriceElement.length>0)
{ourPriceElement.html(merchandise.regPrice);}}}}
function zoomToStore(index)
{var storeIndexArgName="index";var src=document.getElementById('dakisMapFrame').src;var storeIndexPos=src.indexOf(storeIndexArgName+"=");if(storeIndexPos!=-1)
{src=src.substr(0,storeIndexPos-1);}
src=src+"&"+storeIndexArgName+"="+index;document.getElementById('dakisMapFrame').src=src;}
function resizeToFitParentElement(element)
{var parentNode=element.parentNode;while(parentNode!=null)
{if(parentNode.tagName!="FONT"&&parentNode.tagName!="P"&&parentNode.style.height!=null&&parentNode.style.height.indexOf("px")!=-1)
{element.style.height=parentNode.style.height;if(parentNode.style.width!=null||element.offsetWidth==0)
{if(parentNode.clientWidth!=null&&parentNode.clientWidth!=0)
{element.style.width=parentNode.clientWidth;}
else if(parentNode.offsetWidth!=null&&parentNode.offsetWidth!=0)
{element.style.width=parentNode.offsetWidth;}
else if(parentNode.style.width!=null&&parentNode.style.width.indexOf("px")!=-1)
{element.style.width=parentNode.style.width;}}
break;}
parentNode=parentNode.parentNode;}}
function includeJsIfUndefined(testVar,jsPath)
{if(testVar==undefined)
{includeJs(jsPath);testVar="defined";}}
function includeJs(jsPath)
{document.write('<'+'script');document.write(' language="javascript"');document.write(' type="text/javascript"');document.write(' src="'+jsPath+'">');document.write(''+'script'+'>');}
function redirectToPrintAppIfNeeded(serverUrl,lang,retailerGuid,appVersion)
{try
{var remote=isRemoteLayout;}
catch(e)
{redirectToPrintAppWhenReady(serverUrl,lang,retailerGuid,appVersion);}}
function redirectToPrintAppWhenReady(serverUrl,lang,retailerGuid,appVersion)
{if(typeof(g_websiteVersion)!="undefined"&&typeof(g_sessionId)!="undefined"&&g_sessionId!=0){redirectToPrintApp(serverUrl,lang,retailerGuid,appVersion);}
else{setTimeout(function(){redirectToPrintAppWhenReady(serverUrl,lang,retailerGuid,appVersion);},100);}}
function parseParams(merchandiseId)
{var additional_params='gift_merchandise_id='+merchandiseId+'&cartPage='+g_shoppingCartPageFile;jQuery("input.parametric").each(function(i,s){s=jQuery(s);if(s.attr("type")=="number"||s.attr("type")=="text"||(s.attr("type")=="radio"&&s.is(':checked'))||(s.attr("type")=="checkbox"&&s.is(':checked')))
additional_params+='&'+s.attr("name")+'='+s.val();});dakisGoToPrintApp('gift_editing',additional_params);}
function redirectToPrintApp(serverUrl,lang,retailerGuid,appVersion,layoutFile)
{window.location.replace(computePrintAppUrl(serverUrl,lang,retailerGuid,appVersion,layoutFile));}
function goToPrintApp(serverUrl,lang,retailerGuid,appVersion,layoutFile,params)
{window.location=computePrintAppUrl(serverUrl,lang,retailerGuid,appVersion,layoutFile,params);}
function computePrintAppUrl(serverUrl,lang,retailerGuid,appVersion,layoutFile,params)
{var baseUrl=(typeof(g_baseURL)!=='undefined')?baseUrl=g_baseURL:getDocDomainDir();var pageFile=layoutFile;var baseRoute="/guid/"+retailerGuid+"/"+lang+"/photo/"+appVersion+"?";if(pageFile==null){pageFile=window.location.pathname.substring(window.location.pathname.lastIndexOf("/")+1);}
if(typeof(params)=="undefined"||params==""){params="";}else if(appVersion!=="gift_editing"){params="&"+params;if((params.lastIndexOf("gift_merchandise_id")!=-1)||(params.lastIndexOf("order_id")!=-1)){baseRoute="/guid/"+retailerGuid+"/"+lang+"/photo_gift/"+appVersion+"?";}}
if(typeof(g_sessionId)=="undefined"){g_sessionId="";}
if(appVersion=="pro_event"||appVersion=="photo_prints"){params="&"+params;baseRoute="?";if(appVersion=="pro_event"){baseRoute="/guid/"+retailerGuid+"/"+lang+"/pro_event/login?"}
params+="&cartUrl="+g_shoppingCartPageFile;if((typeof(DakisRUA)!='undefined')&&DakisRUA.isInitialized()&&DakisRUA.isSignedIn()){params+="&rua_token="+DakisRUA.getStoredData("token");}}
var url=serverUrl+baseRoute+"base_url="+baseUrl+"&page_file="+pageFile+"&page_version="+g_websiteVersion+"&lang="+lang+"&session_id="+g_sessionId+"&retailer_guid="+retailerGuid+
params;if(appVersion==="gift_editing"){if(params.lastIndexOf("order_id")!==-1){var order_id=params.match(/order_id=([^&]*)/)[1];url=serverUrl+"#/loadOrder/"+lang
+"/"+retailerGuid
+"/"+order_id
+"/"+g_sessionId
+"/"+encodeURIComponent(baseUrl)
+"/"+pageFile+"/"
+g_websiteVersion
+"/ignored/false?"+params}else if(params.lastIndexOf("gift_merchandise_id")!==-1){var merchandise_id=params.match(/gift_merchandise_id=([^&]*)/)[1];url=serverUrl+"#/load/"+lang
+"/"+retailerGuid
+"/"+merchandise_id
+"/"+g_sessionId
+"/"+encodeURIComponent(baseUrl)
+"/"+pageFile+"/"
+g_websiteVersion
+"/ignored/true?"+params}}
if(typeof(g_gaLinker)!="undefined"&&g_gaLinker!=null)
{url=g_gaLinker.decorate(url,true);}
return url;}
function redirectToCashierIfNeeded(serverUrl,lang,retailerGuid,sessionId,layoutFile)
{try
{var remote=isRemoteLayout;}
catch(e)
{redirectToCashierWhenReady(serverUrl,lang,retailerGuid,sessionId,layoutFile);}}
function redirectToCashierWhenReady(serverUrl,lang,retailerGuid,sessionId,layoutFile)
{if(typeof(g_websiteVersion)!="undefined"&&typeof(g_sessionId)!="undefined"&&g_sessionId!=0){redirectToCashier(serverUrl,lang,retailerGuid,sessionId,layoutFile);}
else{setTimeout(function(){redirectToCashierWhenReady(serverUrl,lang,retailerGuid,sessionId,layoutFile);},100);}}
function goToCashier(serverUrl,lang,retailerGuid,sessionId,layoutFile)
{window.location=computeCashierAppUrl(serverUrl,lang,retailerGuid,sessionId,layoutFile);}
function redirectToCashier(serverUrl,lang,retailerGuid,sessionId,layoutFile)
{var url=computeCashierAppUrl(serverUrl,lang,retailerGuid,sessionId,layoutFile);window.location.replace(url);}
function computeCashierAppUrl(serverUrl,lang,retailerGuid,sessionId,layoutFile)
{var baseUrl=getDocDomainDir();var pageFile=layoutFile;if(pageFile==null)
{pageFile=window.location.pathname.substring(window.location.pathname.lastIndexOf("/")+1);}
var url=serverUrl+"/checkout?"+"base_url="+baseUrl+"&page_file="+pageFile+"&page_version="+g_websiteVersion+"&lang="+lang+"&session_id="+sessionId+"&retailer_guid="+retailerGuid;if(typeof(g_gaLinker)!="undefined"&&g_gaLinker!=null)
{url=g_gaLinker.decorate(url);}
return url;}
function setElementClass(element,className)
{jQuery(element).attr("class",className);jQuery(element).attr("className",className);}
function bookmarkThisPage()
{if(document.all)
{window.external.AddFavorite(document.URL,document.title);}
else if(window.sidebar)
{window.sidebar.addPanel(document.title,document.URL,"")}}
function dakisPopupWindow(url,args,width,height,centered,menubar,location,scrollbars,resizable)
{if(g_designMode){return;}
var left=0;var top=0;if(width==0||height==0)
{width=screen.width;height=screen.height;}
if(centered)
{left=(screen.width-width)/2;top=(screen.height-height)/2;}
var params='width='+width+',height='+height+',left='+left+',top='+top+', menubar='+menubar+', toolbar='+menubar+',scrollbars='+scrollbars+',resizable='+resizable+',location='+location;if(args!='')
{url+='?'+args;}
var popup=window.open(url,window.location.href+"_popup",params);popup.focus();}
function winopen(url,width,height,args)
{var left=(screen.width-width)/2;var top=(screen.height-height)/2;var params='width='+width+',height='+height+',left='+left+',top='+top+'menubar=no,scrollbars=yes,resizable=no,location=no'
var popup=window.open(url+'?'+args,'popup',params);popup.focus();}
function winopenResizable(url,width,height,args)
{var left=(screen.width-width)/2;var top=(screen.height-height)/2;var params='width='+width+',height='+height+',left='+left+',top='+top+'menubar=no,scrollbars=yes,resizable=yes,location=no'
var popup=window.open(url+'?'+args,'popup',params);popup.focus();}
function flashAppOpen()
{flashAppOpenArgs('');}
function flashAppOpenProduct(productGuid)
{flashAppOpenArgs('skipL=true&p1='+productGuid);}
function flashAppOpenPL(plGuid)
{flashAppOpenArgs('pl='+plGuid);}
function flashAppOpenDM(dmGuid)
{flashAppOpenArgs('dm='+dmGuid);}
function templateOnLink(url)
{if(url.indexOf('http://')==-1)
{refreshVisibleContentDivFromHref(url);}}
DakisFlashObject=JClass.extend({objectWidth:0,objectHeigth:0,htmlElementId:'dhe_flash_object',created:false,cssUrl:'none',flashUrl:'',className:'dhe_flash_object',callbackObj:'',randomized:false,init:function(callbackObj,flashUrl,w,h,htmlElementId,cssUrl)
{this.callbackObj=callbackObj;this.flashUrl=this.getPublicUrl(flashUrl,{obj:callbackObj,cssUrl:cssUrl,language:g_dakisLang});this.objectWidth=w;this.objectHeigth=h;if(htmlElementId!==undefined){this.htmlElementId=htmlElementId;this.className=htmlElementId;}
if(cssUrl!==undefined)
this.cssUrl=cssUrl;},hideObject:function()
{$(this.htmlElementId).style.visibility="hidden";$(this.htmlElementId).style.display="none";removeOverlay();},promptObject:function()
{if(!this.created)
this.createObject();this.showObject();},createObject:function()
{var self=this;var someRand=Math.floor(Math.random()*10);this.addObjectDiv();var so=new SWFObject(this.flashUrl,"flashObj"+someRand,this.objectWidth,this.objectHeigth,"7","#FFFFFF");so.write(this.htmlElementId);this.created=true;},addObjectDiv:function()
{var bodyElem=document.getElementsByTagName("body")[0];var obj=document.createElement("div");obj.setAttribute('id',this.htmlElementId);obj.className=this.className;obj.style.zIndex='102';obj.style.position="absolute";obj.style.display="none";obj.style.visibility="hidden";bodyElem.appendChild(obj);},showObject:function()
{$(this.htmlElementId).style.visibility="visible";$(this.htmlElementId).style.display="block";this.positionMiddle();addOverlay();},positionMiddle:function()
{var element=$(this.htmlElementId);var windowHeight;var windowWidth;var scrolled;if(ie)
{if(document.documentElement&&document.documentElement.clientHeight){windowHeight=document.documentElement.clientHeight;windowWidth=document.documentElement.clientWidth;}
else{windowHeight=document.body.clientHeight;windowWidth=document.body.clientWidth;}
scrolled=document.documentElement.scrollTop;}
else
{windowHeight=self.innerHeight;windowWidth=self.innerWidth;scrolled=pageYOffset;}
element.style.top="0px";element.style.left="0px";element.style.top=Math.round(scrolled+windowHeight/2-element.clientHeight/2)+"px";element.style.left=Math.round(windowWidth/2-element.clientWidth/2)+"px";},getPublicUrl:function(fileName,params){if(params!==undefined)
return g_dakisServerUrl+fileName+'?'+$H(params).toQueryString();else
return g_dakisServerUrl+fileName;}});DakisDHEBanner=DakisFlashObject.extend({imageDelay:5000,imagePath:'./../images/banner/',randomized:false,transparency:false,init:function(flashUrl,htmlElementId,imagePath,delay,transparency){this.flashUrl=flashUrl;this.imagePath=imagePath;this.imageDelay=delay;this.transparency=transparency;if(htmlElementId!==undefined)
{this.htmlElementId=htmlElementId;this.className=htmlElementId;var el=document.getElementById(htmlElementId);this.objectWidth=el.offsetWidth;this.objectHeight=el.offsetHeight;this.createObject();}},createObject:function()
{var so=new SWFObject(this.flashUrl,this.htmlElementId+"_flash",this.objectWidth,this.objectHeight,"8","#FFFFFF");if(this.transparency==true)
so.addParam('wmode','transparent');so.write(this.htmlElementId);this.created=true;},getJSReady:function(){return true;},getImagePath:function(){return this.imagePath;},getImageDelay:function(){return this.imageDelay;},getImageHeight:function(){return this.objectHeight;},getImageWidth:function(){return this.objectWidth;}});if(typeof deconcept=="undefined"){var deconcept=new Object();}if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="