(function(){

	// Map over jQuery in case of overwrite
	if ( typeof GASTRO != "undefined" ){
		var _GASTRO = GASTRO;
	}

	var GASTRO = window.GASTRO = function() {
		// If the context is a namespace object, return a new object
		return this instanceof GASTRO ? this.init() : new GASTRO();
	};

	GASTRO.prototype = {
	
	}


	jQuery.extend(GASTRO,{
	
		//function that runs if call GASTRO()
		init: function(){},


		dataStore: [],
/* ********* VALIDATE NEW METHOD  **************** */


		validatenew: function(newoptions){
			var prop = {													//the default properties
				fireWhen: 'onready'											//when to execute the code
			}
			var options = {};												//new object 
			jQuery.extend(options, prop, newoptions)						//extend the prop object with the newoptions object to create the options object 
			if(options.fireWhen==='onready'){
				jQuery(document).ready(function(){GASTRO.validatenewprocess(options)})
			}else{
				GASTRO.validatenewprocess(options)
			}
	
		},
		validatenewprocess: function(newoptions){
			var prop = {
				formId: 'validationForm',
				errorTag: 'p',
				errorClass: 'error',
				bigAlertClass: 'error',
				limitClass: 'limitvalidate',
				requiredClass: 'acgrequired',
				validfailcallback: function(){}
			}
			var options = {};
			jQuery.extend(options, prop, newoptions)

			jQuery(options.errorTag + '.' + options.errorClass,jQuery('#' + options.formId)).remove();	//remove any the error messages
			jQuery("input."+options.requiredClass+", textarea."+options.requiredClass+", select."+options.requiredClass,jQuery('#' + options.formId)).bind("blur.mgcvalidation",function(){ //bind a blur listener to all form fields
				GASTRO.checkfieldnew(options,jQuery(this));
			});
			jQuery('#' + options.formId).submit(function(){													//bind a submit event to the form
				GASTRO.dataStore=[];
				var $submitdiv = jQuery(this).find("div.submit");
				var $submitcache = $submitdiv.html();
				$submitdiv.html('<div class="callout message"><img src="/images/anim-loading.gif" class="align-left" /> Validating</div>')
				jQuery('#error,#bigAlertUl').remove();																	//remove any previously created submit error message
				jQuery(options.errorTag + '.'+ options.errorClass,jQuery('#' + options.formId)).remove();	//remove any previously created error message
				jQuery('div.error',jQuery('#' + options.formId)).removeClass("error");
				jQuery("."+options.requiredClass,jQuery('#' + options.formId)).each(function(){
					GASTRO.checkfieldnew(options,jQuery(this));
				});
				jQuery("."+options.limitClass,jQuery('#' + options.formId)).each(function(){
					var eleme = jQuery(this)
					if(parseInt(jQuery.trim(eleme.val()).length,10)>0){
						GASTRO.checkfieldnew(options,eleme);
					}
				})

				var numWarnings=GASTRO.dataStore.length;
				if (numWarnings>0){																		//if there are errors
					options.validfailcallback();
					var $bigAlert = jQuery('<div></div>').attr({'id': 'error', 'class': options.bigAlertClass})							//create the div that will show any errors on submit
					
					$bigAlert.append('<span><strong>Please correct errors with following ' + numWarnings + ' fields:</strong></span>')	//append the first line of the submit error message
					jQuery('<div class="clear">').insertAfter($bigAlert)
					$bigAlert.insertBefore('#' + options.formId);												//insert the error message before the form
					$bigAlert.prepend('<a name="erroranchor"></a>')
					jQuery('<div class="clear">').insertAfter($bigAlert)
					var $bigAlertUl = jQuery('<ul id="bigAlertUl" class="error-list"></ul>')
					jQuery.each(GASTRO.dataStore,function(i,n){
						$bigAlertUl.append('<li>'+n+'</li>')
					})
					$bigAlertUl.insertBefore('#' + options.formId);
					$submitdiv.html($submitcache)
					window.location="#erroranchor";
					return false;																		//stop the submit from happening
				};
				$submitdiv.html('<div class="callout message"><img src="/images/anim-loading.gif" class="align-left" /> Submitting</div>')
				jQuery(".removeonsubmit",jQuery('#' + options.formId)).remove();
			});
		},
		checkfieldnew: function(newoptions,eleme){
			var prop = {
				errorTag: 'p',
				emailClass: 'email',
				phoneClass: 'phone',
				numericClass: 'numeric'
			}
			var options = {};
			jQuery.extend(options, prop, newoptions)
			eleme.next(options.errorTag).remove();																//remove any previously created error messages
			var $closediv = eleme.closest("div")
			$closediv.removeClass("error")
			if(eleme.is(".mgcradioset")){																	//if the required element is a radio button
				var curfield=eleme.find("label:first").text();

				var errorMessage = curfield + ' is a required field';								//create a variable of the error message
				var radiocheckedcount=0																//create a counter set to 0
				jQuery(":radio",eleme).each(function(){											//for each radio button in the same listitem 	
					if(jQuery(this).is(":checked")){																//if the radio is checked
						radiocheckedcount++														//add 1 to the counter (should really never reach more than 1 with radio buttons)
					}
				})
				if(radiocheckedcount==0){															//if the counter is still at 0 then no radio buttons were checked
					options.errorMessage = errorMessage				
					GASTRO.insertErrorMessagenew(options,eleme,$closediv)
					GASTRO.dataStore.push(curfield)
				}
			}
			if(eleme.is(".mgccheckset")){																	//if the required element is a checkbox
				var curfield=eleme.find("label:first").text();
				var errorMessage = curfield + ' is a required field';								//create a variable of the error message
				var checkboxcheckedcount=0																//create a counter set to 0
				jQuery(":checkbox",eleme).each(function(){											//for each checkbox in the same list item 	
					if(jQuery(this).is(":checked")){																//if the radio is checked
						checkboxcheckedcount++														//add 1 to the counter (should really never reach more than 1 with radio buttons)
					}
				})
				//return false;
				
				if(checkboxcheckedcount==0){															//if the counter is still at 0 then no checkboxes were checked
					options.errorMessage = errorMessage
					GASTRO.insertErrorMessagenew(options,eleme,$closediv)
					GASTRO.dataStore.push(curfield)
				}
				if(jQuery(".createdcheckother",eleme).attr("checked")==true){
					if(jQuery(".checkboxother",eleme).val()==''){
						errorMessage = curfield + ' Other is a required field';
						options.errorMessage = errorMessage
						GASTRO.insertErrorMessagenew(options,eleme,$closediv)
						GASTRO.dataStore.push(curfield)
					}
				}
			}

			if (eleme.attr("mgc:action")=="otherOption"){											//if this is a select field with an other afterward
				if(jQuery.trim(jQuery("option:selected",eleme).text())=='Other (please specify):') {							//if the other item is selected
					var $othertext = eleme.parents(":first").find("span.showingoption").find("input")					//set a variable to hold the jquery object of the other text field
					if($othertext.val()==''){														//if the other text field is empty
						$othertext.next('p').remove();											//remove any previously created error messages
						var curfield = jQuery("label[for="+eleme.attr("id")+"]");	//get the label of the current field
						if(curfield.length>0){
							var errorMessage = curfield.text() + ' Other is a required field';					//create a variable of the error message
							options.errorMessage = errorMessage
						}
						GASTRO.insertErrorMessagenew(options,$othertext,$closediv)
						GASTRO.dataStore.push(curfield.text() + ' Other')
					}else{																			//if the field is not blank
						$othertext.next('p').remove();											//remove error messages
					}
				}
			}
			if((eleme.is(":text") || eleme.is("textarea") || eleme.is("select") || eleme.is(":password") || eleme.is(":file"))&&((eleme.val() == '')||(eleme.val() == null))&&((!eleme.is(".mgccanbeempty"))||(eleme.val() == null))){																	//if the required input is empty

				var curfield=jQuery("label[for="+eleme.attr("id")+"]");
				if(curfield.length>0){
					var errorMessage = curfield.text() + ' is a required field';								//create a variable of the error message
					options.errorMessage = errorMessage
				}
				
				GASTRO.insertErrorMessagenew(options,eleme,$closediv)
				GASTRO.dataStore.push(curfield.text())

			}
			if(eleme.is('.' + options.emailClass)){																//if this is the email field
				if(eleme[0].value != '' && !/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(eleme[0].value)){			//if the field is not empty and fails the regular expression test

					var errorMessage = 'Please use proper email format (e.g. joe@example.com)';	//create the error messsage
					
					var curfield=jQuery("label[for="+eleme.attr("id")+"]");
					
					options.errorMessage = errorMessage
					GASTRO.insertErrorMessagenew(options,eleme,$closediv)
					GASTRO.dataStore.push(curfield.text())

				}
			}
			if(eleme.is('.mgc_passwordfirst')){																//if this field is the first of two password fields that need to be the same
				if(eleme.val()!==jQuery(".mgc_passwordsecond",eleme.parents("form:first")).val()){
					var errorMessage = 'Please make sure the two password fields match';	//create the error messsage
					
					var curfield=jQuery("label[for="+eleme.attr("id")+"]");
					
					options.errorMessage = errorMessage
					GASTRO.insertErrorMessagenew(options,eleme,$closediv)
					GASTRO.dataStore.push(curfield.text())
				}
			}
			if(eleme.is('.mgc_invalidvalue')){																//if this field has been invalidated elsewhere

					var errorMessage = 'Please use a valid value';	//create the error messsage
					
					var curfield=jQuery("label[for="+eleme.attr("id")+"]");
					
					options.errorMessage = errorMessage
					GASTRO.insertErrorMessagenew(options,eleme,$closediv)
					GASTRO.dataStore.push(curfield.text())

			}
			if(eleme.is('#tlausername')){																//if this is the tla username field
				if(eleme[0].value != '' && !/\w{6,}/.test(eleme[0].value)){			//if the field is not empty and fails the regular expression test

					var errorMessage = 'Please use proper username format (at least 6 alphanumeric characters)';	//create the error messsage
					
					var curfield=jQuery("label[for="+eleme.attr("id")+"]");
					
					options.errorMessage = errorMessage
					GASTRO.insertErrorMessagenew(options,eleme,$closediv)
					GASTRO.dataStore.push(curfield.text())

				}
			}
			if(eleme.is('#tlapassword')){																//if this is the tla username field
				if((jQuery("#tlausername")[0].value == '' || jQuery("#tlapassword")[0].value == '') && (jQuery("#tlausername").val() != '' || jQuery("#tlapassword").val() != '')){

					var errorMessage = 'Please fill out both the username and password';	//create the error messsage

					var curfield=jQuery("label[for="+eleme.attr("id")+"]");
					
					options.errorMessage = errorMessage
					GASTRO.insertErrorMessagenew(options,eleme,$closediv)
					GASTRO.dataStore.push(curfield.text())
				}
				if(jQuery("#tlapassword")[0].value != '' && jQuery("#tlapassword")[0].value.length < 6){
					var errorMessage = 'Please use proper password format (at least 6 characters)';	//create the error messsage

					var curfield=jQuery("label[for="+eleme.attr("id")+"]");
					
					options.errorMessage = errorMessage
					GASTRO.insertErrorMessagenew(options,eleme,$closediv)
					GASTRO.dataStore.push(curfield.text())
				}
			}

			if(eleme.is('.' + options.limitClass)){																//if this is the phone field
				var limit=eleme.attr("rel")
				if(limit!=''&&!isNaN(limit)){
					limit=parseInt(limit,10);
					var ellength=parseInt((eleme.val()).length,10)
					if(ellength>limit){
						var errorMessage = 'Too many characters, please limit your input to ' + limit + ' characters. You entered ' + ellength + ' characters.';							//create the error messsage
				
						var curfield=jQuery("label[for="+eleme.attr("id")+"]");
						options.errorMessage = errorMessage
						GASTRO.insertErrorMessagenew(options,eleme,$closediv)
						GASTRO.dataStore.push(curfield.text())

					}
				}
			}

			if(eleme.is('.' + options.numericClass)){																//if this is a field which should only be numeric (is marked by the class numeric)
				var curfield=jQuery("label[for="+eleme.attr("id")+"]");
				if(eleme[0].value != '' && isNaN(eleme[0].value)){											//if the field is not empty and it is not a number
					var errorMessage = 'Please enter a numeric value ' + curfield.text();						//create the error messsage
				
					options.errorMessage = errorMessage
					GASTRO.insertErrorMessagenew(options,eleme,$closediv)
					GASTRO.dataStore.push(curfield.text())

				}
			}
		},
		insertErrorMessagenew: function(newoptions,$insertAfterPoint,$closediv){
			var prop = {
				errorTag: 'p',
				errorMessage: 'There is an error with this field.'
			}
			var options = {};
			jQuery.extend(options, prop, newoptions)
			$closediv.addClass("error")

			var $errmess = jQuery('<' + options.errorTag + '></' + options.errorTag + '>')								//create the paragraph that will hold the rror message
			.text(options.errorMessage)																//put the error message in the paragraph
			.addClass(options.errorClass)																//add the error class to the paragraph
			
			$errmess.insertAfter($insertAfterPoint);															//insert the paragraph after the email field
		},
/* ********* CREATELOADING METHOD  **************** */



		createloading: function(newoptions){
			var prop = {
				loadingId: 'loadingtable',														// the id that will be added to the created table
				loadingTargetSelector: 'body',													// what the loading indicator will appear over
				loadingImage: '/images/anim-loading.gif'								// the image to use as the loading indicator
			}
			var options = {};
			jQuery.extend(options, prop, newoptions);											//overwrite the default options with any passed in options

			var $loadingImage=jQuery('<img class="dg_loadingimage" src="' + options.loadingImage + '">');	//creating the img

			var $loadingTarget = jQuery(options.loadingTargetSelector);							//the object that the  indicator will appear over

			var loadingTargetOffset =  $loadingTarget.offset()									//find the position of the element the indicator will appear over
			
			var $containTable = jQuery('<table id="' + options.loadingId + '" border="0" cellspacing="0" cellpadding="0"><tr><td></td></tr></table>');
																								//the table that will hold the indicator
			$containTable.css({																	//the css for the table
				'position': 'absolute',
				'left':loadingTargetOffset.left+'px',
				'top':loadingTargetOffset.top+'px'
			})
			jQuery("td",$containTable).css({													//the css for the td in the table
				'height': $loadingTarget.outerHeight(),
				'width': $loadingTarget.outerWidth(),
				'vertical-align': 'middle',
				'text-align': 'center'
			}).append($loadingImage);

			jQuery("body").append($containTable);

		},	
/* ********* GASTROSLIDER METHOD  ***************** */


		gastroslider: function(newoptions){
			var prop = {													//the default properties
				fireWhen: 'onready'											//when to execute the code
			}
			var options = {};												//new object 
			jQuery.extend(options, prop, newoptions)						//extend the prop object with the newoptions object to create the options object 
			if(options.fireWhen==='onready'){
				jQuery(document).ready(function(){GASTRO.gastrosliderprocess(options)})
			}else{
				GASTRO.gastrosliderprocess(options)
			}
	
		},
		gastrosliderprocess: function(newoptions){
			var prop = {
				containerselector: '.gastroslider',
				panelselector: '.gastrosliderpanel',
				easeTime: 750,
				easeFunc: "easeInOutExpo",
				activeClass: "current",
				rotateClass: "rotator",
				rotateSpeed: 2500,
				starterClass: "starthere",
				leftArrowClass: "ms_leftarrow",
				rightArrowClass: "ms_rightarrow",
				numberNavClass: "ms_numbernav",
				numberNavWrapClass: "ms_numbernavwrap",
				viewportClass: "ms_viewport",
				panelContainerClass: "ms_panelcontainer",
				widthOnUl: 'no',
				np_noshow: false
			}
			var options = {};
			jQuery.extend(options, prop, newoptions);
	
			
			jQuery(options.containerselector).each(function(){
					
				var $currSlider = jQuery(this);
				var $containEl = $currSlider.parents("div:first");
				var isscreenshotgallery=false;
				var ishighlights=false;
				if($containEl.hasClass("noshownav")){
					options.np_noshow=true;
				}
				if($containEl.hasClass("gallery")){
					isscreenshotgallery=true;
				}
				if($containEl.hasClass("highlights")){
					ishighlights=true;
				}
				var $panels = jQuery('div'+options.panelselector,$currSlider);
				var isFader=false;
				var numPanels = $panels.length;
				if($containEl.hasClass("fader")){
					isFader=true;
					$panels.slice(1,numPanels).hide()
					$panels.each(function(i){
						jQuery(this).css({'z-index':numPanels-i})
					})
				}
				var shownav=true;
				var numPanels = $panels.length;
				if((numPanels===1)&&(options.np_noshow)){
					shownav=false;
				}
				var $leftArrow = jQuery('<div class="' + options.leftArrowClass + '"><a href="#"></a></div>');
				var $rightArrow = jQuery('<div class="' + options.rightArrowClass + '"><a href="#"></a></div>');
				if(!isscreenshotgallery&&shownav){
					$rightArrow.insertAfter($currSlider)
					$leftArrow.insertAfter($currSlider)
				}
				var $numberNav = jQuery('<ul class="' + options.numberNavClass + '"></ul>')
				var defaultSelected=false;
				var currPanel = 1;
				jQuery('div'+options.panelselector,$currSlider).wrapAll('<div class="' + options.viewportClass + '"></div>').wrapAll('<div class="' + options.panelContainerClass + '"></div>').each(function(index){
					if(jQuery(this).hasClass(options.starterClass)){
						defaultSelected=true;
						currPanel=index+1;
					}
					$numberNav.append('<li><a href="#" class="progress">' + (index+1) + '</a></li>');
				});
				if(isscreenshotgallery&&shownav){
					jQuery("<li></li>").append($leftArrow).prependTo($numberNav)
					jQuery("<li></li>").append($rightArrow).appendTo($numberNav)
				}
				var panelWidth;
				if(jQuery.browser.safari){
					panelWidth = $currSlider.attr("rel").length>0 ? $currSlider.attr("rel") : parseInt(jQuery('div'+options.panelselector+':first',$currSlider).outerWidth());
				}else{
					panelWidth = parseInt(jQuery('div'+options.panelselector+':first',$currSlider).outerWidth())
				}
				var $panelContainer = jQuery("div."+options.panelContainerClass,$currSlider)
				jQuery("a.progress:first",$numberNav).addClass(options.activeClass);
				if(isscreenshotgallery){
					var panheightrun=function(){
						var panheight=jQuery('div'+options.panelselector,$currSlider).eq(0).outerHeight();
						jQuery('div.'+options.viewportClass,$currSlider).stop().animate({ height:panheight}, options.easeTime, options.easeFunc);
					}
					if(jQuery.browser.safari){
						setTimeout(panheightrun,500)
					}else{
						panheightrun()
					}
				}
				
				var removeFilter=function(element) {
					if(element.style.removeAttribute){
						element.style.removeAttribute('filter');
					}
				}
				//function to move the panels
				var movePanel = function(panel){
					if(isFader){
			            jQuery('div'+options.panelselector+':visible',$currSlider).fadeOut("normal");
        			    $panels.eq(panel).fadeIn("normal", function() {
							removeFilter(jQuery(this)[0]);
						});
					}else{
						var leftPos = (panel*panelWidth)*-1;
						$panelContainer.stop().animate({ left: leftPos}, options.easeTime, options.easeFunc);
						if(isscreenshotgallery){
							var panheight=jQuery('div'+options.panelselector,$currSlider).eq(panel).outerHeight();
							jQuery('div.'+options.viewportClass,$currSlider).stop().animate({ height:panheight}, options.easeTime, options.easeFunc);
						}
					}
				};
				
				//called when ever the user causes rotation
				var useraction = function(){
					if($currSlider.data("rotating")){
						$currSlider.trigger("mouseover");
					}
				};
				
				//events for numeric nav
				jQuery("a.progress",$numberNav).each(function(index){
					jQuery(this).click(function(){
						useraction();
						jQuery("a",$numberNav).removeClass(options.activeClass);
						jQuery(this).addClass(options.activeClass);
						currPanel = index+1;
						movePanel(index);
						return false;
					});					
				})
				
				var addclassSelector;
				
				if(shownav){
					//left arrow event
					jQuery("a",$leftArrow).click(function(){
						useraction();
						if(currPanel==1){
							currPanel=numPanels;
						}else{
							currPanel--;
						}
						jQuery("a",$numberNav).removeClass(options.activeClass);
						addclassSelector="a.progress:eq(" + (currPanel-1) + ")"
						jQuery(addclassSelector,$numberNav).addClass(options.activeClass);
						movePanel(currPanel-1);
						return false;
					});
					
					//right arrow event
					jQuery("a",$rightArrow).click(function(){
						useraction();
						if(currPanel==numPanels){
							currPanel=1;
						}else{
							currPanel++;
						}
						jQuery("a",$numberNav).removeClass(options.activeClass);
						addclassSelector="a.progress:eq(" + (currPanel-1) + ")"
						jQuery(addclassSelector,$numberNav).addClass(options.activeClass);
						movePanel(currPanel-1);
						return false;
					});
				}
				var $numberNavWrap=jQuery('<div class="' + options.numberNavWrapClass + '"></div>');
				$numberNavWrap.append($numberNav);
				if(shownav){
					$currSlider.append($numberNavWrap);
				}
				$panelContainer.width(panelWidth*numPanels);
				
				var navWidth=numPanels*2;
				
				var setnavWidth = function(){
					jQuery("li",$numberNavWrap).each(function(){
						navWidth+=jQuery(this).width();
					})
					if(options.widthOnUl=='no'){
						$numberNavWrap.width(navWidth);
					}else{
						$numberNavWrap.find("ul").width(navWidth);
					}
				}
				
				if(!isscreenshotgallery){
					if(jQuery.browser.safari){
						setTimeout(setnavWidth,200)
					}else{
						setnavWidth();
					}
				}
				//selected default code
				if(defaultSelected===true){
					jQuery("a",$numberNav).removeClass(options.activeClass);
					addclassSelector="a.progress:eq(" + (currPanel-1) + ")"
					jQuery(addclassSelector,$numberNav).addClass(options.activeClass);
					var leftstatic = ((currPanel-1)*panelWidth)*-1;
					if(isscreenshotgallery){
						var panheight=jQuery('div'+options.panelselector,$currSlider).eq(currPanel-1).outerHeight();
						jQuery('div.'+options.viewportClass,$currSlider).stop().animate({ height:panheight}, options.easeTime, options.easeFunc);
					}
					$panelContainer.css({left: leftstatic+'px'});
				}
				
				//rotator code
				if($currSlider.hasClass(options.rotateClass)){
					var rotateit = function(){
						if(currPanel==numPanels){
							currPanel=1;
						}else{
							currPanel++;
						}
						jQuery("a",$numberNav).removeClass(options.activeClass);
						addclassSelector="a.progress:eq(" + (currPanel-1) + ")";
						jQuery(addclassSelector,$numberNav).addClass(options.activeClass);
						movePanel(currPanel-1);
					}
					var rotateInterval = setInterval(rotateit,options.rotateSpeed);
					$currSlider.data("rotating",true);
					$currSlider.mouseover(function(){
						clearInterval(rotateInterval)
						$currSlider.data("rotating",false);
					});
				}

			});
			
		}	
	},GASTRO)
})();









