$(document).ready(function(){
	//$('html').prepend('<div id="overlay"/>');
	//$('html.enhanced body').css('visibility', 'visible');
	
	$('html.enhanced body').addClass('fouc').animate({opacity:1},1400,function()
                    {
                       // $(this).remove();
					   $(".fade img").fadeIn(3000);
					   $(".fade_a img").delay(800).fadeIn(3000);
                    }
).css('visibility', 'visible');
$("#scroller").scrollable({easing: 'custom', speed: 1800, circular: true, mousewheel: true}).navigator().autoscroll({
	interval: 8000,
	autoplay: true	
});
$.easing.custom = function (x, t, b, c, d) { 
    var s = 0.40158;  
    if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b; 
    return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b; 
}	
				
					

	$("p, .msg_body ul li, #tracklist ul li").hover(
	function(){
		$(this).animate({ color: '#92AFD6' }, 1000 );
		}, function() {
		$(this).animate({ color: '#6C88AE' }, 600 );	
		});
 

	$('.latest_release:not(.latest_release:first)').prepend('<div class="spacer"/>');


	// to dos $('#overlay').remove();
	  $('#nav').spasticNav();
	 $("#fade_three img").fadeIn(1000);
	$("#fade_two img").fadeIn(1500);
	$("#fade_one img").fadeIn(3000);

	  //$('.msg_head').wrapInner('<span/>')
   // $(".fade img").fadeIn(1600);
	//hide the all of the element with class msg_body
	$(".msg_body").hide();


			
		  $(".msg_head").click(function (event) {
			var target = this.id + '_toggle';
			var clicked = $(this);
			$('#' + target).toggle("blind", 600);
			$(this).toggleClass("highl");
		  });

});
//jquery cookie plugin
//jQuery.cookie = function(name, value, options) {
//    if (typeof value != 'undefined') { // name and value given, set cookie
//        options = options || {};
//        if (value === null) {
//            value = '';
//            options.expires = -1;
//        }
//        var expires = '';
//        if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
//            var date;
//            if (typeof options.expires == 'number') {
//                date = new Date();
//                date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
//            } else {
//                date = options.expires;
//            }
//            expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE
//        }
//        // CAUTION: Needed to parenthesize options.path and options.domain
//        // in the following expressions, otherwise they evaluate to undefined
//        // in the packed version for some reason...
//        var path = options.path ? '; path=' + (options.path) : '';
//        var domain = options.domain ? '; domain=' + (options.domain) : '';
//        var secure = options.secure ? '; secure' : '';
//        document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
//    } else { // only name given, get cookie
//        var cookieValue = null;
//        if (document.cookie && document.cookie != '') {
//            var cookies = document.cookie.split(';');
//            for (var i = 0; i < cookies.length; i++) {
//                var cookie = jQuery.trim(cookies[i]);
//                // Does this cookie string begin with the name we want?
//                if (cookie.substring(0, name.length + 1) == (name + '=')) {
//                    cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
//                    break;
//                }
//            }
//        }
//        return cookieValue;
//    }
//};
////end plugin
//		
//        $(document).ready(function() {
//			$("#intro").css({'height':$(document).height()});
//		if (!$.cookie("in_flag")) {
//$("#intro").click(function() {
//    $("#intro").fadeOut("normal", function() {
//        $(this).hide();
//		return false;
//    });
//});
//$.cookie("in_flag","1");
//}
//else
//{
// $("#intro").css("display","none");
// 	
//}
//$(".locandina").click(function(){
//	$("#intro").fadeIn('slow', function(){
//	$(this).click(function(){
//	$(this).fadeOut('slow');	
//	})	
//	});
//	});
//});

