//var isGclTopModOpen = false;
//var isGclTopModHeight = -55;


var $gclFeaturedLinks;
var gclFeaturedLinkCurPos = -1;



var $gclContentRotatorLinks;
var $gclContentRotatorContents;
var gclContentRotatorLinkCurPos = 0;
var gclContentRotatorLinkHeight = 36;
var gclContentRotatorLinkTop = 8;



$(document).ready(function() {
				
  
/*
  $("#gcl-topmod-tab-toggle").click(function () {
	if(isGclTopModOpen) {
		$("#gcl-topmod-wrapper").animate( { marginTop: isGclTopModHeight }, 1200);
		isGclTopModOpen = false;
		$(this).removeClass("gcl-topmod-tab-up");
		$(this).addClass("gcl-topmod-tab-down");
	} else {
		$("#gcl-topmod-wrapper").animate( { marginTop: "0" }, 1200);
		isGclTopModOpen = true;
		$(this).removeClass("gcl-topmod-tab-down");
		$(this).addClass("gcl-topmod-tab-up");
	}
  });

*/


  $gclFeaturedLinks = $(".gcl-featured-link");
  $gclFeaturedLinks.mouseover(function () {
    if(gclFeaturedLinkCurPos != $gclFeaturedLinks.index(this)) {
      $(this).animate({ top:4 }, 70).animate( { top:0 }, 70);
      gclFeaturedLinkCurPos = $gclFeaturedLinks.index(this);
    }
  });




  $gclContentRotatorLinks = $("#gcl-content-rotator li a");
  $gclContentRotatorContents = $(".gcl-content-rotator-content");
  $gclContentRotatorLinks.attr({'href': 'javascript:void(0)'});

  if ($.browser.msie) { gclContentRotatorLinkHeight += 2; }
  
  $gclContentRotatorLinks.click(function () { 
	if(gclContentRotatorLinkCurPos != $gclContentRotatorLinks.index(this)) {
		gclContentRotatorLinkCurPos = $gclContentRotatorLinks.index(this);
		$("#gcl-content-rotator-arrow").animate({ top:(gclContentRotatorLinkCurPos*gclContentRotatorLinkHeight)+gclContentRotatorLinkTop }, "fast");
		$gclContentRotatorLinks.removeClass("selected");
		$(this).addClass("selected");
		$gclContentRotatorContents.fadeOut("fast");
		$gclContentRotatorContents.eq(gclContentRotatorLinkCurPos).fadeIn("slow");
	}
  });

 

});
