
/* fader151.js */

/* 1   */ /***********************************************
/* 2   *| * Ultimate Fade-In Slideshow (v1.51): © Dynamic Drive (http://www.dynamicdrive.com)
/* 3   *| * This notice MUST stay intact for legal use
/* 4   *| * Visit http://www.dynamicdrive.com/ for this script and 100s more.
/* 5   *| ***********************************************/
/* 6   */ //SET IMAGE PATHS. Extend or contract array as needed
/* 7   */ //fadeimages[2]=["photo3.jpg", "http://www.javascriptkit.com", "_new"] //image with link and target syntax
/* 8   */ var homeImages=new Array()
/* 9   */ var collectionImages=new Array()
/* 10  */ var occasionsImages=new Array()
/* 11  */ 
/* 12  */ homeImages[0]=["/assets/img/homeSlides/marchsale.jpg", "/collection/", ""]
/* 13  */ homeImages[1]=["/assets/img/homeSlides/01.jpg", "/collection/dressing-gowns/dressing-gown/123/40/", ""]
/* 14  */ homeImages[2]=["/assets/img/homeSlides/02.jpg", "", ""]
/* 15  */ homeImages[3]=["/assets/img/homeSlides/05.jpg", "", ""]
/* 16  */ //homeImages[8]=["/assets/img/homeSlides/new1.jpg", "", ""]
/* 17  */ //homeImages[8]=["/assets/img/homeSlides/07.jpg", "/news/", ""]
/* 18  */ collectionImages[0]=["/assets/img/collectionSlides/01.jpg", "", ""]
/* 19  */ collectionImages[1]=["/assets/img/collectionSlides/02.jpg", "", ""]
/* 20  */ var fadebgcolor="white"
/* 21  */ ////NO need to edit beyond here/////////////
/* 22  */ var fadearray=new Array() //array to cache fadeshow instances
/* 23  */ var fadeclear=new Array() //array to cache corresponding clearinterval pointers
/* 24  */ var dom=(document.getElementById) //modern dom browsers
/* 25  */ var iebrowser=document.all
/* 26  */ function fadeshow(theimages, fadewidth, fadeheight, borderwidth, delay, pause, displayorder){
/* 27  */ 	this.pausecheck=pause
/* 28  */ 	this.mouseovercheck=0
/* 29  */ 	this.delay=delay
/* 30  */ 	this.degree=10 //initial opacity degree (10%)
/* 31  */ 	this.curimageindex=0
/* 32  */ 	this.nextimageindex=1
/* 33  */ 	fadearray[fadearray.length]=this
/* 34  */ 	this.slideshowid=fadearray.length-1
/* 35  */ 	this.canvasbase="canvas"+this.slideshowid
/* 36  */ 	this.curcanvas=this.canvasbase+"_0"
/* 37  */ 	if (typeof displayorder!="undefined")
/* 38  */ 	theimages.sort(function() {return 0.5 - Math.random();}) //thanks to Mike (aka Mwinter) :)
/* 39  */ 	this.theimages=theimages
/* 40  */ 	this.imageborder=parseInt(borderwidth)
/* 41  */ 	this.postimages=new Array() //preload images
/* 42  */ 	for (p=0;p<theimages.length;p++){
/* 43  */ 		this.postimages[p]=new Image()
/* 44  */ 		this.postimages[p].src=theimages[p][0]
/* 45  */ 	}
/* 46  */ 	var fadewidth=fadewidth+this.imageborder*2
/* 47  */ 	var fadeheight=fadeheight+this.imageborder*2
/* 48  */ 	if (iebrowser&&dom||dom) //if IE5+ or modern browsers (ie: Firefox)
/* 49  */ 	document.write('<div id="master'+this.slideshowid+'" style="position:relative;width:'+fadewidth+'px;height:'+fadeheight+'px;overflow:hidden;"><div id="'+this.canvasbase+'_0" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);opacity:0.1;-moz-opacity:0.1;-khtml-opacity:0.1;background-color:'+fadebgcolor+'"></div><div id="'+this.canvasbase+'_1" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);opacity:0.1;-moz-opacity:0.1;-khtml-opacity:0.1;background-color:'+fadebgcolor+'"></div></div>')
/* 50  */ 	else

/* fader151.js */

/* 51  */ 	document.write('<div><img name="defaultslide'+this.slideshowid+'" src="'+this.postimages[0].src+'"></div>')
/* 52  */ 	if (iebrowser&&dom||dom) //if IE5+ or modern browsers such as Firefox
/* 53  */ 	this.startit()
/* 54  */ 	else{
/* 55  */ 		this.curimageindex++
/* 56  */ 		setInterval("fadearray["+this.slideshowid+"].rotateimage()", this.delay)
/* 57  */ 	}
/* 58  */ }
/* 59  */ function fadepic(obj){
/* 60  */ 	if (obj.degree<100){
/* 61  */ 		obj.degree+=10
/* 62  */ 		if (obj.tempobj.filters&&obj.tempobj.filters[0]){
/* 63  */ 			if (typeof obj.tempobj.filters[0].opacity=="number") //if IE6+
/* 64  */ 			obj.tempobj.filters[0].opacity=obj.degree
/* 65  */ 			else //else if IE5.5-
/* 66  */ 			obj.tempobj.style.filter="alpha(opacity="+obj.degree+")"
/* 67  */ 		}
/* 68  */ 		else if (obj.tempobj.style.MozOpacity)
/* 69  */ 		obj.tempobj.style.MozOpacity=obj.degree/101
/* 70  */ 		else if (obj.tempobj.style.KhtmlOpacity)
/* 71  */ 		obj.tempobj.style.KhtmlOpacity=obj.degree/100
/* 72  */ 		else if (obj.tempobj.style.opacity&&!obj.tempobj.filters)
/* 73  */ 		obj.tempobj.style.opacity=obj.degree/101
/* 74  */ 	}else{
/* 75  */ 		clearInterval(fadeclear[obj.slideshowid])
/* 76  */ 		obj.nextcanvas=(obj.curcanvas==obj.canvasbase+"_0")? obj.canvasbase+"_0" : obj.canvasbase+"_1"
/* 77  */ 		obj.tempobj=iebrowser? iebrowser[obj.nextcanvas] : document.getElementById(obj.nextcanvas)
/* 78  */ 		obj.populateslide(obj.tempobj, obj.nextimageindex)
/* 79  */ 		obj.nextimageindex=(obj.nextimageindex<obj.postimages.length-1)? obj.nextimageindex+1 : 0
/* 80  */ 		setTimeout("fadearray["+obj.slideshowid+"].rotateimage()", obj.delay)
/* 81  */ 	}
/* 82  */ }
/* 83  */ fadeshow.prototype.populateslide=function(picobj, picindex){
/* 84  */ 	var slideHTML=""
/* 85  */ 	if (this.theimages[picindex][1]!="") //if associated link exists for image
/* 86  */ 	slideHTML='<a href="'+this.theimages[picindex][1]+'" target="'+this.theimages[picindex][2]+'">'
/* 87  */ 	slideHTML+='<img src="'+this.postimages[picindex].src+'" border="'+this.imageborder+'px">'
/* 88  */ 	if (this.theimages[picindex][1]!="") //if associated link exists for image
/* 89  */ 	slideHTML+='</a>'
/* 90  */ 	picobj.innerHTML=slideHTML
/* 91  */ }
/* 92  */ fadeshow.prototype.rotateimage=function(){
/* 93  */ 	if (this.pausecheck==1) //if pause onMouseover enabled, cache object
/* 94  */ 	var cacheobj=this
/* 95  */ 	if (this.mouseovercheck==1)
/* 96  */ 	setTimeout(function(){cacheobj.rotateimage()}, 100)
/* 97  */ 	else if (iebrowser&&dom||dom){
/* 98  */ 		this.resetit()
/* 99  */ 		var crossobj=this.tempobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
/* 100 */ 		crossobj.style.zIndex++

/* fader151.js */

/* 101 */ 		fadeclear[this.slideshowid]=setInterval("fadepic(fadearray["+this.slideshowid+"])",50)
/* 102 */ 		this.curcanvas=(this.curcanvas==this.canvasbase+"_0")? this.canvasbase+"_1" : this.canvasbase+"_0"
/* 103 */ 	}else{
/* 104 */ 		var ns4imgobj=document.images['defaultslide'+this.slideshowid]
/* 105 */ 		ns4imgobj.src=this.postimages[this.curimageindex].src
/* 106 */ 	}
/* 107 */ 	this.curimageindex=(this.curimageindex<this.postimages.length-1)? this.curimageindex+1 : 0
/* 108 */ }
/* 109 */ fadeshow.prototype.resetit=function(){
/* 110 */ 	this.degree=10
/* 111 */ 	var crossobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
/* 112 */ 	if (crossobj.filters&&crossobj.filters[0]){
/* 113 */ 		if (typeof crossobj.filters[0].opacity=="number") //if IE6+
/* 114 */ 		crossobj.filters(0).opacity=this.degree
/* 115 */ 		else //else if IE5.5-
/* 116 */ 		crossobj.style.filter="alpha(opacity="+this.degree+")"
/* 117 */ 	}else if (crossobj.style.MozOpacity)
/* 118 */ 	crossobj.style.MozOpacity=this.degree/101
/* 119 */ 	else if (crossobj.style.KhtmlOpacity)
/* 120 */ 	crossobj.style.KhtmlOpacity=this.degree/100
/* 121 */ 	else if (crossobj.style.opacity&&!crossobj.filters)
/* 122 */ 	crossobj.style.opacity=this.degree/101
/* 123 */ }
/* 124 */ fadeshow.prototype.startit=function(){
/* 125 */ 	var crossobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
/* 126 */ 	this.populateslide(crossobj, this.curimageindex)
/* 127 */ 	if (this.pausecheck==1){ //IF SLIDESHOW SHOULD PAUSE ONMOUSEOVER
/* 128 */ 		var cacheobj=this
/* 129 */ 		var crossobjcontainer=iebrowser? iebrowser["master"+this.slideshowid] : document.getElementById("master"+this.slideshowid)
/* 130 */ 		crossobjcontainer.onmouseover=function(){cacheobj.mouseovercheck=1}
/* 131 */ 		crossobjcontainer.onmouseout=function(){cacheobj.mouseovercheck=0}
/* 132 */ 	}
/* 133 */ 	this.rotateimage()
/* 134 */ }

