// JavaScript Document
/*img preloader*/
(function(c){c.widget("ui.imageLoader",{options:{async:true,images:[]},total:0,_init:function(){var a;this.total++;this.loaded=0;this.data=[];this.stats={loaded:0,errored:0,allcomplete:false};if(typeof this.options.images==="string"){var b=[];c.map(c(this.options.images),function(d){b.push(c(d).attr("src"))});this.options.images=b}for(a=0;a<this.options.images.length;a++)this.data.push({init:false,complete:false,error:false,src:this.options.images[a],img:new Image,i:a});for(a=0;a<this.data.length&&
(this.options.async===true||a===0||a<parseInt(this.options.async,10));a++)this._loadImg(a);return this},_loadImg:function(a){var b=this;if(a!==false&&a<b.data.length)if(!b.data[a].init){b.data[a].init=true;b._trigger("start",null,{i:a,data:b.getData()});setTimeout(function(){b.data[a].img.onerror=function(){b.loaded++;b.stats.errored++;b.data[a].error=true;b._trigger("error",null,{i:a,data:b.getData()});b._complete(a)};b.data[a].img.onload=function(){if(b.data[a].img.width<1)return b.data[a].img.onerror();
b.loaded++;b.stats.loaded++;b.data[a].complete=true;b._trigger("complete",null,{i:a,data:b.getData()});b._complete(a)};b.data[a].img.src=b.data[a].src},1)}},_complete:function(a){if(!this.options.async||typeof this.options.async==="number")this._loadImg(this._next(a));if(this.loaded===this.data.length){this._trigger("allcomplete",null,this.getData());this.stats.allcomplete=true}},_next:function(a){var b;for(b=0;b<this.data.length;b++)if(b!==a&&!this.data[b].init)return b;return false},getData:function(){return c.extend(true,
[],this.data)},getStats:function(){return c.extend(true,[],this.stats)},destroy:function(){c.Widget.prototype.destroy.apply(this,arguments)}})})(jQuery);
////jquery easing 1.3 min
jQuery.easing.jswing=jQuery.easing.swing;
jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(e,a,c,b,d){return jQuery.easing[jQuery.easing.def](e,a,c,b,d)},easeInQuad:function(e,a,c,b,d){return b*(a/=d)*a+c},easeOutQuad:function(e,a,c,b,d){return-b*(a/=d)*(a-2)+c},easeInOutQuad:function(e,a,c,b,d){if((a/=d/2)<1)return b/2*a*a+c;return-b/2*(--a*(a-2)-1)+c},easeInCubic:function(e,a,c,b,d){return b*(a/=d)*a*a+c},easeOutCubic:function(e,a,c,b,d){return b*((a=a/d-1)*a*a+1)+c},easeInOutCubic:function(e,a,c,b,d){if((a/=d/2)<1)return b/
2*a*a*a+c;return b/2*((a-=2)*a*a+2)+c},easeInQuart:function(e,a,c,b,d){return b*(a/=d)*a*a*a+c},easeOutQuart:function(e,a,c,b,d){return-b*((a=a/d-1)*a*a*a-1)+c},easeInOutQuart:function(e,a,c,b,d){if((a/=d/2)<1)return b/2*a*a*a*a+c;return-b/2*((a-=2)*a*a*a-2)+c},easeInQuint:function(e,a,c,b,d){return b*(a/=d)*a*a*a*a+c},easeOutQuint:function(e,a,c,b,d){return b*((a=a/d-1)*a*a*a*a+1)+c},easeInOutQuint:function(e,a,c,b,d){if((a/=d/2)<1)return b/2*a*a*a*a*a+c;return b/2*((a-=2)*a*a*a*a+2)+c},easeInSine:function(e,
a,c,b,d){return-b*Math.cos(a/d*(Math.PI/2))+b+c},easeOutSine:function(e,a,c,b,d){return b*Math.sin(a/d*(Math.PI/2))+c},easeInOutSine:function(e,a,c,b,d){return-b/2*(Math.cos(Math.PI*a/d)-1)+c},easeInExpo:function(e,a,c,b,d){return a==0?c:b*Math.pow(2,10*(a/d-1))+c},easeOutExpo:function(e,a,c,b,d){return a==d?c+b:b*(-Math.pow(2,-10*a/d)+1)+c},easeInOutExpo:function(e,a,c,b,d){if(a==0)return c;if(a==d)return c+b;if((a/=d/2)<1)return b/2*Math.pow(2,10*(a-1))+c;return b/2*(-Math.pow(2,-10*--a)+2)+c},
easeInCirc:function(e,a,c,b,d){return-b*(Math.sqrt(1-(a/=d)*a)-1)+c},easeOutCirc:function(e,a,c,b,d){return b*Math.sqrt(1-(a=a/d-1)*a)+c},easeInOutCirc:function(e,a,c,b,d){if((a/=d/2)<1)return-b/2*(Math.sqrt(1-a*a)-1)+c;return b/2*(Math.sqrt(1-(a-=2)*a)+1)+c},easeInElastic:function(e,a,c,b,d){e=1.70158;var f=0,g=b;if(a==0)return c;if((a/=d)==1)return c+b;f||(f=d*0.3);if(g<Math.abs(b)){g=b;e=f/4}else e=f/(2*Math.PI)*Math.asin(b/g);return-(g*Math.pow(2,10*(a-=1))*Math.sin((a*d-e)*2*Math.PI/f))+c},easeOutElastic:function(e,
a,c,b,d){e=1.70158;var f=0,g=b;if(a==0)return c;if((a/=d)==1)return c+b;f||(f=d*0.3);if(g<Math.abs(b)){g=b;e=f/4}else e=f/(2*Math.PI)*Math.asin(b/g);return g*Math.pow(2,-10*a)*Math.sin((a*d-e)*2*Math.PI/f)+b+c},easeInOutElastic:function(e,a,c,b,d){e=1.70158;var f=0,g=b;if(a==0)return c;if((a/=d/2)==2)return c+b;f||(f=d*0.3*1.5);if(g<Math.abs(b)){g=b;e=f/4}else e=f/(2*Math.PI)*Math.asin(b/g);if(a<1)return-0.5*g*Math.pow(2,10*(a-=1))*Math.sin((a*d-e)*2*Math.PI/f)+c;return g*Math.pow(2,-10*(a-=1))*Math.sin((a*
d-e)*2*Math.PI/f)*0.5+b+c},easeInBack:function(e,a,c,b,d,f){if(f==undefined)f=1.70158;return b*(a/=d)*a*((f+1)*a-f)+c},easeOutBack:function(e,a,c,b,d,f){if(f==undefined)f=1.70158;return b*((a=a/d-1)*a*((f+1)*a+f)+1)+c},easeInOutBack:function(e,a,c,b,d,f){if(f==undefined)f=1.70158;if((a/=d/2)<1)return b/2*a*a*(((f*=1.525)+1)*a-f)+c;return b/2*((a-=2)*a*(((f*=1.525)+1)*a+f)+2)+c},easeInBounce:function(e,a,c,b,d){return b-jQuery.easing.easeOutBounce(e,d-a,0,b,d)+c},easeOutBounce:function(e,a,c,b,d){return(a/=
d)<1/2.75?b*7.5625*a*a+c:a<2/2.75?b*(7.5625*(a-=1.5/2.75)*a+0.75)+c:a<2.5/2.75?b*(7.5625*(a-=2.25/2.75)*a+0.9375)+c:b*(7.5625*(a-=2.625/2.75)*a+0.984375)+c},easeInOutBounce:function(e,a,c,b,d){if(a<d/2)return jQuery.easing.easeInBounce(e,a*2,0,b,d)*0.5+c;return jQuery.easing.easeOutBounce(e,a*2-d,0,b,d)*0.5+b*0.5+c}});


//var dont_steal_media = "dump_file/";
var pathnothere = ("http://www.pauzeradio.com/dump_file/");

function removeLast(){
        $('#footer-site-links-final a:first').css("border-left","0");
};
playeranimateshow = function() {
// hide show player animation 
// ani-right jp-play jp-pause
  	$('#ani-left').css('display', 'inline');
	$('#ani-right').css('display', 'inline');
};
playeranimatehide = function() {
	$('#ani-left').css('display', 'none');
	$('#ani-right').css('display', 'none');
};
artistlisting = function() {
	$('.artist-letter-listing').hide();
	
	$('#artist-letter a').click(function() {
		var url = $(this).attr("href");
		$('.artist-letter-listing').hide();
		$(url).fadeIn(1000);
		 $("html, body").animate({scrollTop: $(url).offset().top});
	});
};
videolisting = function() {
	$('.video-letter-listing').hide();
	
	$('.video-letter a').click(function() {
		$(".video-letter a").removeClass("yes");
		var url = $(this).attr("href");
		$('.video-letter-listing').hide();
		$(url).fadeIn(1000);
		$(this).addClass("yes");
		 $("html, body").animate({scrollTop: $(url).offset().top});
	});
}



//a.green-arrow-wrap
// Prevent right click below
$(function() {

	$(this).bind("contextmenu", function(e) {
		e.preventDefault();
	});
	$('#animate-arrow').hover(
  function () {
    $('.arrows').stop().animate({
			marginLeft: 15
		  }, {
			duration: 1000,
			specialEasing: {
			  marginLeft: 'easeInOutBounce'
			},
			complete: function() {
			  //hello im done
			}
		  });
  }, 
  function () {
   $('.arrows').stop().animate({
			marginLeft: 0
		  }, {
			duration: 1000,
			specialEasing: {
			  marginLeft: 'easeInOutBounce'
			},
			complete: function() {
			  //hello im done
			}
		  });
	  }
	);
	removeLast();
	var images = [];

	//hide images
	var imgEls = $('img').hide();
	
	//code to collect all image srcs on page
	$.map(imgEls, function(el, i) {
		images.push($(el).attr('src'));
	});
	
	$({}).imageLoader({
		async: true,
		images: images,
		complete: function(e, ui) {
			//once loaded, show images
			$(imgEls[ui.i]).fadeIn('slow');
		}
	});
}); 
