
/* -------------- auto slide ----------------*/
jQuery(document).ready(function() {
	  browser = getbrowser();
	  var effect = 'none';
	  if(browser == 'IE'){effect = 'scrollHorz';}
	  if(browser != 'IE'){effect = 'scrollHorz';}
		jQuery(".Home .tabs").cycle({
		fx: effect,
		pause: true,
		pager: '.Home .pager .pages',
		timeout: 7000,
		speedIn:  500, 
    	speedOut: 500,
    	after: function(currSlideElement, nextSlideElement, options, forwardFlag){
    		jQuery('.tabs').css('overflow','visible');
    	},
		pagerAnchorBuilder: function(idx, slide) {
			idx++;
			switch(idx) {
				case 1:
					position = "imgOn";
				break;
				
				case 2:
					position = "imgOn";
				break;
				
				case 3:
					position = "imgOn";
				break;
				
				case 4:
					position = "imgOn";
				break;
				
				case 5:
					position = "imgOn";
				break;
				
				case 6:
					position = "imgOn";
				break;
			}
			
			return '<a href="#" id="pager-' +idx+ '" class="imgOff"><img src="img/menu-tab0' +idx+ '_Off.gif" border="0"/></a>'
    	}
		});
	
		/*This function moves the blue bar up/down depending on the active element*/
		jQuery('.pages a img').click(  
			function() { 
				var position =  jQuery(this).attr('src');
				jQuery(this).attr('src',position.replace('Off','On'));
				//alert( jQuery(this).attr('src'))
			});
		
		jQuery('.pages a img').hover(  
			function() { 
				jQuery(".Home .tabs").cycle("pause");
  
			},
			function(){
				jQuery(".Home .tabs").cycle("resume");
			
			});
});