jQuery(document).ready(function($) {
    $('#mycarousel').jcarousel({
    	wrap: 'circular'
    });
    $('#mycarousel .thumb').hover( 
    	function() {
    		$(this).children().next().animate({bottom:'75px'},{queue:false,duration:100});
    	},
    	function () {
    		$(this).children().next().animate({bottom:'0px'},{queue:false,duration:100});
    	}
    );
    $(".latest-news").show();
  	$("#menu-main-menu").find(".menu-item").each(function(i) {
  		if($(this).children().hasClass("sub-menu")) {
  			$(this).addClass("has-sub-menu");
  		}
  	});
  	var $movie = $('.hover-menu.movie-news ul').height();
  	var $television = $('.hover-menu.television-news ul').height();
  	var $general = $('.hover-menu.general-entertainment-news ul').height();
  	var $popular = $('.hover-menu.sidebar-most-popular ul').height();
  	$("ul.hover-list").hide();
  	$("div.open").children().show();
    $(".hover-menu").hoverIntent(
    	function() {
    		if($(this).children().is(':hidden') && $(this).hasClass('close')) {
    			if ($(this).hasClass('movie-news')) {
    				$(this).children().next().height($movie);
    			} else if ($(this).hasClass('television-news')) {
    				$(this).children().next().height($television);
    			} else if ($(this).hasClass('general-entertainment-news')) {
    				$(this).children().next().height($general);
    			} else if ($(this).hasClass('sidebar-most-popular')) {
    				$(this).children().next().height($popular);
    			}
    			$("div.open").removeClass('open').addClass('close');
    			$(this).removeClass('close').addClass('open');
    			$(this).children().next().slideDown(function() {
    					$("div.close").children().next().slideUp();
    				}
    			);
    		}
    	},
    	function() {}
    );
    $("#review_buttons a").click(
    	function() {
    		$("#review_buttons").find("a").each(function() {
    			$(this).removeClass("current");
    		});
    		$(this).addClass("current");
    		$(".movie-details").children().hide();
    		if ($(this).hasClass("button-overview")) {
    			$(".movie-overview").show();
    		} else if ($(this).hasClass("button-synopsis")) {
    			$(".movie-synopsis").show();
    		} else if ($(this).hasClass("button-images")) {
    			$(".movie-images").show();
    		} else if ($(this).hasClass("button-trailer")) {
    			$(".movie-trailer").show();
    		}
    		return false;
    	}
    );
    
    $(".gsc-input").val("");
    $(".gsc-input").focus(function() {
    	$(this).addClass("focus");
    });
    $(".gsc-input").blur(function() {
    	if ($(this).val() == "") {
    		$(this).removeClass("focus");
    	}
    });
	
	$(".red_corner_right").hover(
    	function() {
    		$(this).next().animate({bottom:'0px'},{queue:false,duration:100});
    	},
    	function() {
    		$(this).next().animate({bottom:'-35px'},{queue:false,duration:100});
    	}
    );
    $(".hover_thumb").hover(
    	function() {
    		$(this).next().next().animate({bottom:'0px'},{queue:false,duration:100});
    	},
    	function() {
    		$(this).next().next().animate({bottom:'-35px'},{queue:false,duration:100});
    	}
    );
	$(".red_corner_left").hover(
    	function() {
    		$(this).prev().animate({bottom:'0px'},{queue:false,duration:100});
    	},
    	function() {
    		$(this).prev().animate({bottom:'-25px'},{queue:false,duration:100});
    	}
    );
	$(".tax-spotlight-category .red_corner_left").hover(
    	function() {
    		$(this).prev().animate({bottom:'0px'},{queue:false,duration:100});
    	},
    	function() {
    		$(this).prev().animate({bottom:'-32px'},{queue:false,duration:100});
    	}
    );
    
	
});
