 $(document).ready(function(){
 	
	 /*$('.img-carosel').cycle({ 
			    fx: 'scrollHorz',
				speed: 5000,
				random : 1
			});*/
			
	 $(".share").click(function(event)
	 {
   		if($(this).parent().children('.shareCont').css('display') == 'none')
		{
			$(this).parent().children('.shareCont').show();
		}
		else
		{
			$(this).parent().children('.shareCont').hide();
		}
		
		return false;
 	});
 	
 	$(".share2").click(function(event)
	 {
   		if($('.shareCont2').css('display') == 'none')
		{
			$('.shareCont2').show();
		}
		else
		{
			$('.shareCont2').hide();
		}
		
		return false;
 	});
	
	$("#view-comment").click(function(event)
	 {
   		if($("#comments").css('display') == 'none')
		{
			$("#comments").show();
			$.scrollTo($("#comments"),2000);
		}
		else
		{
			$("#comments").hide();
		}
		
		return false;
 	});
	
	var myFile = document.location.toString();
	
  	// click the navigation item corresponding to the anchor
  	if(myFile.split('#')[1]=='comments')
	{
		$("#comments").show();
		$.scrollTo($("#comments"),2000);	
	}
  	
  	//nav expands
  	$("#nav-gallery-trigger").toggle(
  	function () {
		$(this).parent().animate({
  			height: '84px'
  		  }, 250, function() {});
  		return false;
	  },
	  function () {
		$(this).parent().animate({
  			height: '14px'
  		  }, 250, function() {});
  		return false;
	  }
	);
  	$("#nav-shop-trigger").toggle(
	  function () {
		$(this).parent().animate({
  			height: '98px'
  		  }, 250, function() {});
  		return false;
	  },
	  function () {
		$(this).parent().animate({
  			height: '14px'
  		  }, 250, function() {});
  		return false;
	  }
	);
  	//nav hovers
  	$("#root-nav a").hover(function(){
  		newClass = $(this).attr('rel');
  		$("h1").removeClass();
  		$("h1").addClass(newClass);
  	})
  	$("#root-nav a").hover(
	  function () {
		newClass = $(this).attr('rel');
		$("h1").removeClass();
		$("h1").addClass(newClass);
	  },
	  function () {
		$("h1").removeClass();
	  }
	);
  	
  	
 });

