﻿$(document).ready(function () {
    $(".social").css({ "opacity": "0.7" });

    $.get('ajax/tweet.aspx', function (data) { $('#twitter').html(data); });

    $.get('ajax/youtube.aspx', function (data) { $('#youtube-all').html(data); });

    $.get('ajax/youtube-single.aspx', function (data) { $('#youtube').html(data); });

    slider("#slider", 4000, 750, 'left', 'swing', false, true, false, false, false, false, '', '');

    $(".social").hover(
        function () {
            $(this).stop().animate({ "opacity": "1" }, "fast");
        },
        function () {
            $(this).stop().animate({ "opacity": "0.7" }, 1000);
        });


        $("#news .item").hover(
        function () {
            $(this).css({ "background-color": "#0c0c0c"});
        },
        function () {
            $(this).css({ "background-color": "" });
        });

        $("#news .item_alt").hover(
        function () {
            $(this).css({ "background-color": "#0c0c0c" });
        },
        function () {
            $(this).css({ "background-color": "" });
        });

        $(".releases").hover(
        function () {
            $(this).css({ "background-color": "#333333" });
            $(this).css({ "border:": "4px solid #333333" });
        },
        function () {
            $(this).css({ "background-color": "#0c0c0c" });
            $(this).css({ "border" : "4px solid #0c0c0c" });
        });

        $("#schedule .item").hover(
        function () {
            $(this).css({ "background-color": "#0c0c0c" });
        },
        function () {
            $(this).css({ "background-color": "" });
        });

        $("#schedule .item_alt").hover(
        function () {
            $(this).css({ "background-color": "#0c0c0c" });
        },
        function () {
            $(this).css({ "background-color": "" });
        });

        $("#logo").hover(
        function () {
            $(this).stop().animate({ "opacity": ".2" }, 1000).delay(0).animate({ "opacity": "1" }, 4000);
        },
        function () {
            $(this).stop().animate({ "opacity": "1" }, 3000);
        });

        $("a.gallery").fancybox({
            'transitionIn': 'elastic',
            'transitionOut': 'elastic',
            'speedIn': 600,
            'speedOut': 200,
            'overlayShow': false
        });



    });

    function openfancybox(youtube) {

        $.fancybox('<iframe width="560" height="345" style=""background-color:#000000"" src="http://www.youtube.com/embed/' + youtube + '" frameborder="0" allowfullscreen></iframe>',
		    {
		        'padding': 0,
		        'margin': 0,
		        'overlayOpacity': 0.5,
		        'overlayColor': '#000000',
		        'autoDimensions': false,
		        'width': '560',
		        'height': '350',
		        'transitionIn': 'none', //elastic
		        'transitionOut': 'none'
		    }
	        );
    }     
