var site_url = 'http://www.arctixbottoms.com/';
jQuery(document).ready(
	function()
	{
		jQuery('.doSildeDown').click(function()
		{
			jQuery('#section'+jQuery(this).attr('rel')).slideToggle("normal");
		});

		jQuery(".hover").hover(function () {
			// on
			jQuery(this).stop().animate({
				opacity:1
			},200);
		}, function () {
			// off
			jQuery(this).stop().animate({
				opacity:0
			},200);
		});
		
		jQuery('#imagesContainer a.lightbox').lightBox({
		imageLoading: site_url+'jquery-lightbox-0.5/images/lightbox-ico-loading.gif',
		imageBtnClose: site_url+'jquery-lightbox-0.5/images/lightbox-btn-close.gif',
		imageBtnPrev: site_url+'jquery-lightbox-0.5/images/lightbox-btn-prev.gif',
		imageBtnNext: site_url+'jquery-lightbox-0.5/images/lightbox-btn-next.gif'
	   });
	}
	
	
);
/***********************************************
* Image Power Zoomer- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for this script and 100s more
***********************************************/
jQuery(document).ready(function(){ //fire on DOM ready
	/*
	EXAMPLE 1:
	$('#myimage').addpowerzoom()

	EXAMPLE 2:*/
	jQuery('#myimage').addpowerzoom({
		defaultpower: 3,
		powerrange: [2,5],
		largeimage: null,
		magnifiersize: [200,200] //<--no comma following last option!
	});
	
});

jQuery(document).ready(function() {
	jQuery('.featuredBox').cycle({
		fx:     'scrollHorz', 
		prev:   '.prev', 
		next:   '.next',
		timeout: 10000
		/*timeout: 10000*/
		/*delay:   -1000*/
	});
	jQuery('.featuredBox2').cycle({
		fx:     'scrollHorz', 
		prev:   '.prev2', 
		next:   '.next2',
		pause: 1,
		/*timeout: 15000*/
		timeout: 10000
		/*delay:   -1000*/
	});
	
	jQuery('.featuredBox2', '.play').mouseenter(function(){
		jQuery('.play').css('display','block');
		jQuery('.featuredBox2').cycle('pause');
	});
	jQuery('.featuredBox2').mouseleave(function(){
		jQuery('.play').css('display','none');
		jQuery('.featuredBox2').cycle('resume');
	});
	
});

// Fade Effects on anything with a "hover" class.
jQuery(document).ready(function () {
	jQuery('#headerSlideshow').cycle({
		fx: 'fade',
		speed:  1000,
		timeout: 4000 
		//autostop:'5'
	});
});

// Fade Effects on anything with a "hover" class.
/*jQuery(document).ready(function () {
	var location = window.location.href;
	var pos = location.search('index.php')
	if(pos == -1){
		var msie6 = jQuery.browser == 'msie' && jQuery.browser.version < 7;
		if (!msie6) {
			var top1 = jQuery('#sideMenu').offset().top - parseFloat(jQuery('#sideMenu').css('margin-top').replace(/auto/, 0));
			//alert(top1);
			var top = top1 - 0;
			var screenHeight = screen.height;
			var bottom = screenHeight - 290;
			jQuery(window).scroll(function (event) {
			  // what the y position of the scroll is
			  var y = jQuery(this).scrollTop();
			  //var x = jQuery(this).scrollBottom();
			  
			  var sidenavHeight = jQuery("#sideMenu").height(); //Get height of sidenav
		      var winHeight = jQuery(window).height(); //Get height of viewport
			  var container = jQuery('#subRep').height();
			  //alert('con: '+container+' Top: '+y);
			  var dif = container - y;
			  //alert(dif);
			  
			 // alert(x);
			  // whether that's below the form
			  if (y >= top) {
				// if so, ad the fixed class
				if (dif < 220) { //If sidenav is taller than viewport...
					jQuery('#sideMenu').removeClass('fixed');
					//jQuery('#sideMenu').addClass('fixedBottom');
				}
				else{
					//jQuery('#sideMenu').removeClass('fixedBottom');
					jQuery('#sideMenu').addClass('fixed');
				}
			  } 
			  else {
				// otherwise remove it
				jQuery('#sideMenu').removeClass('fixed');
			  }
			});
		}
	}
});*/
