Commits

Shu Zong Chen committed a978efb

Fixes for ie

Comments (0)

Files changed (1)

js/eldridge_park.js

 	item_style: {},
 	hover_style: {},
 	constructor: function(opts){
+		if (typeof opts == 'undefined'){
+			opts = {};
+		}
 		dojo.safeMixin(this, opts);
 		this._items = [];
 		this.addNav();
 		var top_item = items.splice(idx, 1);
 		this.curr = idx;
 		this.onActive(top_item[0]);
-		dojo.every(items, function(e){
+		dojo.forEach(items, function(e){
 			this.onUnHover(e);
 		}, this);
 	},
 	},
 	item_style: {
 		'float': 'left',
-		'color': '#333',
+		'color': '#666',
 		'fontSize': '30px',
 		'lineHeight': '1px',
 		'marginRight': '5px',
 		'cursor': 'pointer'
 	},
 	item_hover_style: {
-		'color':'#666'
+		'color':'#999'
 	},
 	item_active_style: {
-		'color':'#999'
+		'color':'#aaa'
 	},
 	item_text: "<p>&bull;</p>",
 	constructor: function(opts){
 	width: 300,
 	_default_navigation: eldridge_park.block_nav,
 	constructor: function(root, opts){
+		if (typeof opts == 'undefined'){
+			opts = {};
+		}
 		dojo.safeMixin(this, opts);
 		this.root = dojo.query(root)[0];
 		if (typeof this.root == "undefined"){
 		this.overlay = dojo.query(this.overlay_selector, this.root)[0];
 		this._items = dojo.query(this.item_selector, this.overlay);
 		this.len = this._items.length;
-		if (this.len <= 0){
+		if (this.len <= 1){
 			return;
 		}
 		dojo.style(this.root, {
 			position: "relative",
 			width: this.width + "px",
-			height: this.height + "px",
-			overflow: "hidden"
+			height: this.height + "px"
 		});
 		dojo.style(this.overlay, {
 			width: this.width + "px",
 		);
 	},
 	lower: function(e){
-		e.style("zIndex", this.lowered_z);
+		dojo.style(e, "zIndex", this.lowered_z);
 	},
 	raise: function(e){
-		e.style("zIndex", this.raised_z);
+		dojo.style(e, "zIndex", this.raised_z);
 	},
 	setFull: function(e){
-		e.style("opacity", "1.0");
+		dojo.style(e, "opacity", "1.0");
 	},
 	setClear: function(e){
-		e.style("opacity", "0.0");
+		dojo.style(e, "opacity", "0.0");
 	},
 	jumpTo: function(n){
 		var items = this.items();
 		var top_item = items.splice(n, 1);
-		this.raise(top_item);
-		this.setFull(top_item);
-		this.lower(items);
+		this.raise(top_item[0]);
+		this.setFull(top_item[0]);
+		dojo.forEach(items, function(e){
+			this.lower(e);
+			this.setClear(e);
+		}, this);
 		this.curr = n;
 		this.move = null;
 	},
 		var top_item = items.splice(i, 1);
 		this.move = i;
 		this.clearTimer();
-		this.setClear(top_item);
-		this.raise(top_item);
-		this.lower(items);
+		this.setClear(top_item[0]);
+		this.raise(top_item[0]);
+		dojo.forEach(items, function(e){
+			this.lower(e);
+		}, this);
 		dojo.fadeIn({
 			node: top_item[0],
 			duration: dur,