$(document).ready(function () {

	$('div.home_scroller_footer a:first-child').addClass('active');
	
	 

    var austDay = new Date();
    //austDay = new Date(austDay.getFullYear() + 1, 1 - 1, 26);
    // alert($('#CountDownDate').val());
    austDay = new Date($('#CountDownDate').val());
    $('#countdown').countdown({ until: austDay, format: "DHMs" });
    //$('#year').text(austDay.getFullYear());
    //alert(austDay.getFullYear());

/*	
    // homepage tabs
    $(".home-tabs:first").tabs(".home-panes:first > div", { effect: 'fade', fadeOutSpeed: 500, rotate: true }).slideshow({ autoplay: true, interval: 4000 });

    $(".scrollable-tabs").tabs(".scrollable-panes > div");

    //scrollers 

    $(".scroller").scrollable({ circular: true, mousewheel: true });
	
    $(".promo-slider").scrollable({ circular: true, mousewheel: true }).navigator().autoscroll({ autoplay: true });


    var naviwidth = $(".navi").width();
    var navileft = Math.ceil((379 - naviwidth) / 2);
    $(".navi").css('padding-left', navileft);

    //When page loads...
    $(".tab_content").hide(); //Hide all content
    $("ul.tabs li:first").addClass("active").show(); //Activate first tab
    $(".tab_content:first").show(); //Show first tab content
*/



    $('.image_gallery li').hover(function () {
        $(this).find('span.play').toggle();
    });

    $('#side.moviedetail .side_links li').hover(function () {
        $(this).find('span.playtrailer').toggle();
    });

    $('.image_box li').hover(function () {
        $(this).find('span.playtrailer').toggle();
    });
	
	
	$("#tab1").click(function () {
		$('div.home_scroller_footer a#viewall1').removeClass('active');
		$('div.home_scroller_footer a#viewall2').removeClass('active');
		$('div.home_scroller_footer a#viewall3').removeClass('active');
		$('a#viewall1').addClass('active');
	 });
	 $("#tab2").click(function () {
		$('div.home_scroller_footer a#viewall1').removeClass('active');
		$('div.home_scroller_footer a#viewall2').removeClass('active');
		$('div.home_scroller_footer a#viewall3').removeClass('active');
		$('a#viewall2').addClass('active');
	 });
	 $("#tab3").click(function () {
		$('div.home_scroller_footer a#viewall1').removeClass('active');
		$('div.home_scroller_footer a#viewall2').removeClass('active');
		$('div.home_scroller_footer a#viewall3').removeClass('active');
		$('a#viewall3').addClass('active');
	 });	

	 $("#tab4").click(function () {
		$('div.home_scroller_footer a#viewall4').removeClass('active');
		$('div.home_scroller_footer a#viewall5').removeClass('active');
		$('div.home_scroller_footer a#viewall6').removeClass('active');
		$('a#viewall4').addClass('active');
	 });
	 $("#tab5").click(function () {
		$('div.home_scroller_footer a#viewall4').removeClass('active');
		$('div.home_scroller_footer a#viewall5').removeClass('active');
		$('div.home_scroller_footer a#viewall6').removeClass('active');
		$('a#viewall5').addClass('active');
	 });
	 $("#tab6").click(function () {
		$('div.home_scroller_footer a#viewall4').removeClass('active');
		$('div.home_scroller_footer a#viewall5').removeClass('active');
		$('div.home_scroller_footer a#viewall6').removeClass('active');
		$('a#viewall6').addClass('active');
	 });

	 $("#tab7").click(function () {
		$('div.home_scroller_footer a#viewall7').removeClass('active');
		$('div.home_scroller_footer a#viewall8').removeClass('active');
		$('div.home_scroller_footer a#viewall9').removeClass('active');
		$('a#viewall7').addClass('active');
	 });
	 $("#tab8").click(function () {
		$('div.home_scroller_footer a#viewall7').removeClass('active');
		$('div.home_scroller_footer a#viewall8').removeClass('active');
		$('div.home_scroller_footer a#viewall9').removeClass('active');
		$('a#viewall8').addClass('active');
	 });
	 $("#tab9").click(function () {
		$('div.home_scroller_footer a#viewall7').removeClass('active');
		$('div.home_scroller_footer a#viewall8').removeClass('active');
		$('div.home_scroller_footer a#viewall9').removeClass('active');
		$('a#viewall9').addClass('active');
	 });

});


