/*<script>*/
/*
AJAXed Wordpress
(C) Anthologyoi.com
*/



var aWP = function (){
	
		var _d=[]; /*_d is an object with an index of i that holds currently active "request" element information*/
		var _p=[]; /*_p is an object with an index of i that holds information that must exist between requests.*/
		var i; /*Currently processing element id*/
		var mrc = '';
		var force = 0;
		var com_hide = '';
	

	var $ = function(id) {
		return document.getElementById(id);
	};

	var pos = function(ele) {
		var e = $(ele);
		var etop = 0;
			if(e && e.style.display != 'none'){
				if (e.offsetParent) {
					etop = e.offsetTop
					while (e = e.offsetParent) {
						etop += e.offsetTop
					}
				}
			}
		return etop;

	}
	
	var get_form_data = function(i){
		var base = $(i).getElementsByTagName('input');
		var string = ''
		var string = '';
		var x = base.length;
		var value = '';
		var name = '';
		var radios=[];



		for(y=0; y<x; y++){
			if(base[y].type != 'button'){
				if(base[y].type == 'text' || base[y].type == 'hidden' || base[y].type == 'password' || base[y].type == 'select'){
						value =  base[y].value;
						name = base[y].name;

				}else if(base[y].type == 'checkbox' || base[y].type == 'radio'){

					if (base[y].checked) {
						value =  base[y].value;
						name = base[y].name;
					}

				}

				if(name && value){
					string += name+'='+escape(value)+'&';
				}

				name = value= null;
			}
		}
		base = $(i).getElementsByTagName('textarea');
		x = base.length;

		for(y=0; y<x; y++){
			string += base[y].name+'='+escape(base[y].value)+'&';
		}
		return string;
	};

	var get_throbber = function (){

			var img = document.createElement('img');
			img.src="http://www.vancouverbchotelreview.com/wp-content/plugins/ajaxd-wordpress/throbber.gif";
			img.alt="Please hold now loading";
			img.id = "throbber"+i;
			if(_d[i].submit == 'TRUE'){

				try{$(_d[i].type+'_'+_d[i][_d[i].primary]).parentNode.appendChild(img);}catch(e){}

			}else if(_d[i].this_page && _d[i].pagenum){

				try{$('awppage_'+_d[i].this_page+'_'+_d[i][_d[i].primary]+'_link').appendChild(img);}catch(e){}

			}else if(_d[i].link_num){

				try{$('awp'+_d[i].type+'_link'+_d[i].link_num+'_'+_d[i][_d[i].primary]).appendChild(img);}catch(e){}

			}else{

				try{$('awp'+_d[i].type+'_link_'+_d[i][_d[i].primary]).appendChild(img);}catch(e){}

			}
		}

	return{

		doit : function() {
			var temp = arguments[0];
			var string ='';
			
			
			if(!temp.i){
			
				if((!temp.id && !temp.primary) || !temp.type){
					return false;
				}else{
					if(!temp.primary){
						temp.primary = 'id';
					}
				}
			
				i = 'awp'+temp.type+'_'+temp[temp.primary];
				
			}else{
			
				i = temp.i;
				temp.i = null;
				
			}
			
			if(!$(i)){
				return false;
			}else{
				e = $(i);
			}

			if(!_p[i]){ 
				_p[i] = [];
			}

			_d[i] = [];
			_d[i] = temp;

			temp = null;

			if(_d[i].submit == 'TRUE'){
				try{$(_d[i].type+_d[i][_d[i].primary]).disabled = true;} catch(e){}
				string = get_form_data(i);
				_d[i].force = 1;
			}else{
				 string = 'id='+_d[i].id+'&'+_d[i].primary+'='+_d[i][_d[i].primary];
			}

			switch(_d[i].type){


				case 'commentform':

					if(isNaN(_p[i].prev_link)){
						_p[i].prev_link = 1;
					}

					if(isNaN(_d[i].com_parent)){
						_d[i].com_parent = 0;
					}
										
					break;				case 'post':
					if (_p[i].prev_page == 0 || isNaN(_p[i].prev_page)){ /*The post has never been loaded.*/

						/*If a pagenum isn't passed then there are only two pages.*/
						_d[i].this_page = (isNaN(_d[i].pagenum)) ? 2 : _d[i].pagenum;

						_p[i].prev_page = 1;

						_d[i].force = 1;

					}else{/*post has been loaded so we are toggling.*/

						if(isNaN(_d[i].pagenum)){
							_d[i].this_page  = (_p[i].prev_page == 2) ? 1 : 2;
						}else{
							_d[i].this_page  = _d[i].pagenum;
						}
					}
					break;		case 'previewcomment':
			string += '&comment=' + escape($('comment_'+_d[i].id).value);
		break;
	
					default:
				break;
			}
			var n;
			n=0;
			if(e.innerHTML){
				n = e.innerHTML.length;
			}

			if (n==0 || _d[i].force == 1){
 
				if(!_d[i].sack){
				aWP.sack = function(){_d[i].result = ajax.responseXML; ajax = null; if(_d[i].result) {aWP.update();}}
			}
				get_throbber();
				ajax = new sack('http://www.vancouverbchotelreview.com/wp-content/plugins/ajaxd-wordpress/aWP-response.php');
				ajax.method = 'POST';
				ajax.onCompletion = aWP.sack;
				ajax.runAJAX('type='+_d[i].type+'&'+string);
			
			}else{

				aWP.toggle.main();

			}
		},

		update: function (){
			var e = $(i);
			_d[i].response = '';

			var nodes = _d[i].result.getElementsByTagName("var");
			if(nodes.length > 0){
				for (j=0; j<nodes.length; j++) {
					if(nodes.item(j).getAttribute('name') && nodes.item(j).firstChild.data){
						_d[i][nodes.item(j).getAttribute('name')] = nodes.item(j).firstChild.data;
					}
				}
			}

			nodes = _d[i].result.getElementsByTagName("response");
			if(nodes.length > 0){
				for (j=0; j<nodes.length; j++) {
					if(nodes.item(j).getAttribute('name')){
						_d[i][nodes.item(j).getAttribute('name')] = nodes.item(j).firstChild.data;
					}else{
						_d[i].response += nodes.item(j).firstChild.data
					}
				}
			}

			nodes = _d[i].result.getElementsByTagName("action");
			if(nodes.length > 0){
				for (j=0; j<nodes.length; j++) {
					if(nodes.item(j).firstChild.data){
						if(nodes.item(j).getAttribute('name')){
							_d[i][nodes.item(j).getAttribute('name')] = nodes.item(j).firstChild.data;
						}else{
							eval(nodes.item(j).firstChild.data);
						}
					}
				}
			}

			if(!_d[i].update_next){
				e.innerHTML = _d[i].response;
				aWP.toggle.main();
			}else{
				eval(_d[i].update_next+'();');
			}
		},

		toggle: {
			main: function (){
				var e = $(i);
				var style = $(i).style.display; /*Otherwise we need to get it several times.*/
				var winHeight = window.innerHeight;
				if(!winHeight){
					//yet another IE fix
					winHeight = document.documentElement.clientHeight;
				}
				if(style != 'none' && style != 'block'){ /*If the element is displayed, but not explicitly set.*/
					$(i).style.display = 'block'; /*Explicitly set it.*/
				}


				setTimeout("try{document.getElementById('throbber"+i+"').parentNode.removeChild(document.getElementById('throbber"+i+"'));}catch(e){}",100);


				switch(_d[i].type){
					
//<script>
					case 'commentform':
						var comparent;

						
							if(!_p[i].nomove && style != 'none' && !_d[i].nomove){
								if(!$('awpcommentform_anchor_'+_d[i][_d[i].primary])){
									var div = document.createElement('div');
									div.id = 'awpcommentform_anchor_'+_d[i][_d[i].primary];
									div.style.display = 'none';	
									$('awpcomments_'+_d[i][_d[i].primary]).parentNode.insertBefore(div, $('awpcommentform_'+_d[i][_d[i].primary]).nextSibling);
								}
							}else{
								_p[i].nomove = 1;
							}
					
			
						if(_p[i].prev_link != _d[i].link_num || !_p[i].nomove && comparent ==0){

							try{ $('awpcommentform_link'+_d[i].link_num+'_'+_d[i][_d[i].primary]).parentNode.insertBefore($(i), $('awpcommentform_link'+_d[i].link_num+'_'+_d[i][_d[i].primary]).nextSibling);}catch(e){}

							if(style == 'none' || _d[i].quickclose == 1){
								aWP.toggle.pick_switch();
							}
     							try{
									if(_p[i].last_show){
										$('awpcommentform_link'+_p[i].prev_link+'_'+_d[i][_d[i].primary]).firstChild.data = _p[i].last_show;
									}
								}catch(e){}
								


						}else{
							if(_p[i].nomove){
								aWP.toggle.pick_switch();
							}else{
								_d[i].force = 1;
								$('awpcommentform_anchor_'+_d[i][_d[i].primary]).parentNode.insertBefore($('awpcommentform_'+_d[i][_d[i].primary]),$('awpcommentform_anchor_'+_d[i][_d[i].primary]));
								
								
							}
						}

						try{$('submit_'+_d[i][_d[i].primary]).disabled = false;} catch(e){}
				


						try{
							if($('awpcommentform_link'+_d[i].link_num+'_'+_d[i][_d[i].primary]).firstChild.data == _d[i].show){
								$('awpcommentform_link'+_d[i].link_num+'_'+_d[i][_d[i].primary]).firstChild.data = _d[i].hide;
							}else{
								$('awpcommentform_link'+_d[i].link_num+'_'+_d[i][_d[i].primary]).firstChild.data = _d[i].show;

							}
						}catch(e){}

							_p[i].last_show = _d[i].show;
							_p[i].prev_link = _d[i].link_num;
						break;
//<script>
					case 'post':
						var hideChildren;
						if(_d[i].hideChildren){
							hideChildren = 'awppost_'+_d[i][_d[i].primary];
						}
						AOI_eff.start('awppage_'+_p[i].prev_page+'_'+_d[i][_d[i].primary], {'mode': 'hide', 'eff': 'SlideUp', 'queue': ['show::'+'awppage_'+_d[i].this_page+'_'+_d[i][_d[i].primary]], 'hideChildren': hideChildren} );


							if(_d[i].pagenum){
		/*** Add class switching.  ***/
								$('awppage_'+_d[i].this_page+'_'+_d[i][_d[i].primary]+'_link').style.fontWeight = 'bold';

								if(_p[i].prev_page !=_d[i].this_page ){
										$('awppage_'+_p[i].prev_page+'_'+_d[i][_d[i].primary]+'_link').style.fontWeight = 'normal';
								}

							}else{
								var l = $('awppost_link'+'_'+_d[i][_d[i].primary]);
								if(l.firstChild.data == _p[i].hide){

									l.firstChild.data = _p[i].show;
									l.className = 'awppost_link';

								}else{

									l.firstChild.data = _p[i].hide;
									l.className = 'awppost_link_hide';

								}

							}
							_p[i].prev_page = _d[i].this_page;
					break;	
			case 'previewcomment':
		$(i).style.height = $('awpsubmit_commentform_'+_d[i].id).offsetHeight+'px'; 
		$(i).style.top = pos('awpsubmit_commentform_'+_d[i].id)+'px';
		$(i).style.width = $('awpsubmit_commentform_'+_d[i].id).offsetWidth+'px';
		$(i).style.overflow = 'auto';
		aWP.toggle.pick_switch();
		break;
	
					default:
						var toggle = 0;
						if(!_d[i].force){
							try{
								var l = $('awp'+_d[i].type+'_link'+'_'+_d[i][_d[i].primary]);

								if(l.firstChild.data == _p[i].hide){
									l.firstChild.data = _p[i].show;
									l.className = 'awp' + _d[i].type + '_link';;

								}else{

									l.firstChild.data = _p[i].hide;
									l.className = 'awp' + _d[i].type + '_link_hide';

								}
							}catch(e){}

							toggle = 1;
						}

						if( $(i).style.display != 'block' || toggle){
							aWP.toggle.pick_switch();
						}

					break;
				}
				
				if(_d[i].focus){
					setTimeout("location.href= '#"+_d[i].focus+"';",100);
				}else	if(pos(i) > 0 && !_d[i].force && !_d[i].no_jump){
					try{window.parent.scrollTo(0,pos(i) - winHeight/4);}catch(e){}
				}
				
			},

			pick_switch:function(){

				
				AOI_eff.start(i, {'eff': '', '': });
				

	
			}
		},

		complete: function (){
			try{$('throbber'+i).parentNode.removeChild($('throbber'+i));}catch(e){}
		
				switch(_d[i].type){
 //<script>
						case 'submit_commentform' :
						$('comment_result_'+_d[i][_d[i].primary]).innerHTML = _d[i].response;

						if(!_d[i].error){
							if($('awpcomments_none_'+_d[i][_d[i].primary])){
									if($('awpcomments_none_'+_d[i][_d[i].primary]).style.display != 'none'){
										$('awpcomments_none_'+_d[i][_d[i].primary]).style.display = 'none';
										$('awpcomments_link_'+_d[i][_d[i].primary]).style.display = 'inline';
									}
							}

							/*If the comment form is inside of the comment div, reloading will destroy it, so we move it.*/
							
							if(_p['awpcommentform_'+_d[i][_d[i].primary]] && !_p['awpcommentform_'+_d[i][_d[i].primary]].nomove){
								$('awpcommentform_anchor_'+_d[i][_d[i].primary]).parentNode.insertBefore($('awpcommentform_'+_d[i][_d[i].primary]),$('awpcommentform_anchor_'+_d[i][_d[i].primary]));
							}else{
								$('awpcomments_'+_d[i][_d[i].primary]).parentNode.insertBefore($('awpcommentform_'+_d[i][_d[i].primary]), $('awpcomments_'+_d[i][_d[i].primary]));
								$('awpcommentform_'+_d[i][_d[i].primary]).style.display='none';
							}


							$('comment_'+_d[i][_d[i].primary]).value = '';
							try{$(_d[i].type+'_'+_d[i][_d[i].primary]).disabled = false;} catch(e){}
							
							aWP.doit({'id': _d[i].id, 'type': 'comments', 'force': 1, 'focus': 'comment-'+_d[i].mrc});
						break;
					}
					
				}
		}
	}
}();



/* start live preview */
// <script>(to trick editors into using javascript syntax)

var aWP_livepreview = function(){
//Private Methods and Attributes are only accessible internally.
			/* private attributes */

		var characters = new Array('---', ' -- ', '--', 'xn&#8211;', '\\.\\.\\.', '\\s\\(tm\\)','(\\d+)"',"(\\d+)'","(\\w)('{2}|\")",'(`{2}|")(\\w)',"(\\w)'","'([\\s.]|\\w)");
		var replacements = new Array('&#8212;', ' &#8212; ', '&#8211;', 'xn--', '&#8230;',' &#8482;','$1&#8243;', '$1&#8242;','$1&#8221;','&#8220;$2','$1&#8216;','&#8217;$1');
		var char_regex = [];
		var charcount =characters.length;
		for(x=0; x< charcount; x++){
			char_regex[x] = new RegExp(characters[x], "g")
		}
		var delay = 0;
	
		var element = [];

		var _cleanhtml = function(text){
					return text;
		};

/* private Methods */

	/*
	// Direct translation of wptexturize from php to javascript
	// Cleaned and optimized for speed and actual usage.*/
		var _js_wptexturize =  function(text) {
			var next = true;
			var output = '';
			var curl = '';
				text = text.replace(/(<[^>]*>)/g, '@%@%@$1@%@%@');
				var textarr = text.split('@%@%@');
				var stop = textarr.length;
				var i = 0;
			while (stop > i) {
				curl = textarr[i];
					if (curl.charAt(0) != '<' && next) { // If it's not a tag

						var x = charcount;
						while(x--){
							if(curl.match(char_regex[x])){
								curl = curl.replace(char_regex[x],replacements[x]);
							}
						}
					} else if ( curl.indexOf('<code') == 0 || curl.indexOf('<pre') == 0) {
						next = false;
					} else {
						next = true;
					}
				curl = curl.replace('/&([^#])(?![a-zA-Z1-4]{1,8};)/g', '&#038;$1');
				output += curl;
				i++;
			}
		return output;

		};

	
		var _js_wpautop = function (pee) {

			pee = pee + "\n\n";
			pee = pee.replace(/<br \/>\s*<br \/>/gi, "\n\n");
			pee = pee.replace(/(<(?:dl|dd|dt|ul|ol|li|pre|blockquote|p|h[1-6])[^>]*>)/gi, "\n$1");
			pee = pee.replace(/(<\/(?:dl|dd|dt|ul|ol|li|pre|blockquote|p|h[1-6])>)/gi, "$1\n\n");
			pee = pee.replace(/\r\n|\r/g, "\n");
			pee = pee.replace(/\n\s*\n+/g, "\n\n");
			pee = pee.replace(/([\s\S]+?)\n\n/gm, '<p>$1 </p>\n');
			pee = pee.replace(/<p>\s*?<\/p>/gi, '');
			pee = pee.replace(/(<p>)*\s*(<\/?(?:dl|dd|dt|ul|ol|li|pre|blockquote|p|h[1-6]|hr)[^>]*>)\s*(<\/p>)*/gi, "$2");
			pee = pee.replace(/<p>(<li.+?)<\/p>/i, "$1");
			pee = pee.replace(/<p><blockquote([^>]*)>/gi, "<blockquote$1><p>");
			pee = pee.replace(/<\/blockquote><\/p>/gi, '</p></blockquote>');
			pee = pee.replace(/\s*\n/gi, " <br />\n");
			pee = pee.replace(/(<\/?(?:dl|dd|dt|ul|ol|li|pre|blockquote|p|h[1-6])[^>]*>)\s*<br \/>/gi, "$1");
			pee = pee.replace(/'<br \/>(\s*<\/?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)>)/gi, '$1');
			pee = pee.replace(/^((?:&nbsp;)*)\s/gm, '$1&nbsp;');

			return pee;
		};

		var _update = function (id,suf){
			var comment = '';
				if(!element[id]){
					if(suf){

						element[id] = document.getElementById('comment'+suf)
					}else{
						base = document.getElementById('commentform_'+id).getElementsByTagName('textarea');
						x = base.length;
						for(i=0; i<x; i++){
							if(base[i].id = 'comment'){
								element[id] = base[i];
								i = x;
							}
						}
					}	
				}

				comment = element[id].value
				if(comment != ''){
					comment = _js_wpautop(comment);
					comment = _js_wptexturize(comment);
					comment = _cleanhtml(comment);

					
      					document.getElementById('add_comment_live_preview_'+id).innerHTML = comment;
				}

		};

	
	/* Public Methods */
	return {
		preview: function (id,suf) {
			if(delay >= 0){
				_update(id,suf);
				delay = 0;
			}else{
				delay++;
			}
		}
	}
}();

/* start effects */

/**
*	Copyrighted 2007 to:
*	Aaron Huran http://anthologyoi.com
*	The code is released under a Creative Commons Liscense
*	(Attribution-NonCommercial-ShareAlike 2.0)
*	TERMS: (Removal this section indicates agreement with these Terms.)
*	For Personal (non-distribution) this notice (sans Terms section) must remain.
*	For Distribution this notice must remain and attribution through
*	a publically accessible "followable" link on applicable information/download page is required.
*	No Commercial use without prior approval.
**/

var AOI_eff = function () {
	var delay = 100;
	var _d = [];
	var $ = function (id) {
		return document.getElementById(id);
	};

	var hideChildren = function(id){
		var c = document.getElementById(id).getElementsByTagName('div');

		for(x=0; x < c; x++){
console.log(c.parentNode, c.parentNode.id)
			if(c.parentNode.id == id){
				console.log('hi');
			}
		console.log(id, c, document.getElementById(c).parentNode.id)
		}
		
	}

	return {
		start: function () {
			var	i = arguments[0];

			if (!_d[i]) {
				_d[i] = arguments[1] || [];

				if (!_d[i].queue) {
					_d[i].queue = '';
				}

				if (!_d[i].mode) {
					if ($(i).style.display === 'block') {
						_d[i].mode = 'hide';
					} else {
						_d[i].mode = 'show';
					}
				}
				
				if(_d[i].hideChildren)
					hideChildren(_d[i].hideChildren);
				AOI_eff.setup(i);
			}
		},
		setup: function (i) {

			if ($(i)) {
				if (_d[i].mode === 'hide') {
					_d[i].step = -10;

					AOI_eff.ready(i, 'hide');
				} else if (_d[i].mode === 'show') {

					_d[i].step = 10;
					AOI_eff.ready(i, 'show');
				} else if (_d[i].mode === 'other') {
					_d[i].step = 10;
					AOI_eff.ready(i, 'other');
				}

				if (!_d[i].delay) {
					_d[i].delay = delay;
				}

				AOI_eff.doit(i);
			} else {
				return false;
			}
		},
		ready: function (i, m) {
			var e = $(i).style;
			switch (_d[i].eff) {
				case 'Expand':

					_d[i]['overflow'] = e.overflow;
					_d[i]['lineHeight'] = e.lineHeight;
					_d[i]['letterSpacing'] = e.letterSpacing;

					if (m === 'show') {
						e.overflow = 'hidden';
						e.lineHeight = '300%';
						e.letterSpacing = '1em';
					}

					break;
				case 'SlideUp':
					_d[i]['height'] = $(i).offsetHeight;
					if (m === 'show') { /*We need an object to be displayed to retrieve height.*/
						e.position='absolute'; /*Pull the element out of its default location*/
						e.visibility='hidden'; /*Hide the element*/
						e.display='block';/*"Display" the hidden element*/
						_d[i]['height'] = $(i).offsetHeight;
						e.visibility=''; /*Show it*/
						e.position='relative'; /*Put it back where it was*/
						e.height = '0px'; /*shrink it for the effect.*/
					}
					e.overflow="hidden";
					break;

				case 'ScrollLeft':
					_d[i]['marginLeft'] = e.marginLeft;
					if (m === 'show') {
						e.marginLeft = 80+'%';
					}
					break;
				case 'Fade':
					e.zoom = 1;/*IE fix*/
					e.backgroundColor = _d[i].background;
					if (m === 'show') {
						e.filter = 'alpha(opacity=0)';
						e.opacity = 0;
					}
					break;
			}

			if (m === 'show') {
				e.display = 'block';
			}
		},
		doit: function (i) {
			var e = $(i).style; /**/
			var m = _d[i].mode;
			var s = _d[i].step;
			var v = 0;

			if ( _d[i].step !== 0  ) {
				switch (_d[i].eff) {
					case 'Expand':
						if 	( m === 'hide' ) {
							v = (100+ (10+s)*20); /*IE fix*/
							e.lineHeight = v+'%';
							e.letterSpacing = ((10+s)*3)+'px';
							_d[i].step += 1;
						} else {
							v = (300 - (10-s)*20);/*IE fix*/
							e.lineHeight = v+'%';
							e.letterSpacing = s*2+'px';
							_d[i].step -= 1;
						}
					break;

					case 'SlideUp':
						if 	( m === 'hide' ) {
							e.height =  Math.floor( _d[i]['height']*s*-0.1)+'px';
							_d[i].step += 1;
						} else {
							e.height = Math.floor( _d[i]['height']*(10-s)*0.1)+'px';
							_d[i].step -= 1;
						}
					break;

					case 'ScrollLeft':

						if 	( m === 'hide' ) {
							if ((!window.innerHeight && s < -3) || window.innerHeight ) {/*IE fix*/
								e.marginLeft=((10 + s)*10)+'%';
							}
							_d[i].step += 1;
						} else {
							e.marginLeft=(s*8)+'%';
							_d[i].step -= 1;
						}
					break;

					case 'Fade' :
						if 	( m === 'hide' ) {
							e.opacity = (s)/-10;
							e.filter = 'alpha(opacity='+(s*-10)+')';
							_d[i].step+= 1;
						} else {
							e.filter = 'alpha(opacity='+((10-s)*10)+')';
							e.opacity = (10 - s)/10;
							_d[i].step -= 1;
						}
						break;
					default:
						_d[i].step = 0;
						break;

				}
					setTimeout("AOI_eff.doit('"+i+"');",  _d[i].delay); /*Call next frame after delay.*/
			} else {
				AOI_eff.finish(i); /*Clean up*/
			}
		},
		finish: function (i) {
			var e = $(i).style; /**/
			if ( _d[i].mode === 'hide' ) {
				e.display = 'none';
			}

			switch (_d[i].eff) {
				case 'Expand':
					if ( _d[i]['overflow'] ) {
						e.overflow = _d[i]['overflow'];
					}

					e.lineHeight ="normal";
					e.letterSpacing ="normal";

					break;
				case 'SlideUp':
					e.height = _d[i]['height']+'px';
					if(window.innerHeight){ /*IE has problems setting height to auto.*/
						e.height = 'auto';}
					e.overflow="visible";
					break;
				case 'ScrollLeft':
					e.marginLeft = _d[i]['marginLeft'] ;
					break;
				default :
					e.opacity = 10;
					e.filter = 'alpha(Opacity=100)';
			}

			if ( _d[i].queue.length > 0 ) {/* Checks to see if there is another effect*/
				var val;

				val = _d[i].queue.shift().split('::'); /*Gets values for first queue'd item*/
				if (val[2]) { /*Sets effect*/
					_d[i].eff = val[2];
				}
				if (val[3]) { /*Sets delay*/
					_d[i].delay = val[3];
				}
				dtemp = _d[i];
				_d[i] = null;
				_d[val[1]] = [];
				_d[val[1]] = dtemp;
				_d[val[1]].mode = val[0];
				
				
				AOI_eff.setup(val[1]);
			} else {
				_d[i] = null;
			}
		}
	};
}();