﻿if (obj.file != '')
{
function myfunction(obj) {

tekst(obj.file,obj.file);

}
}

var tb_pathToImage = "images/loading.gif";

eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('$(o).2S(9(){1u(\'a.18, 3n.18, 3i.18\');1w=1p 1t();1w.L=2H});9 1u(b){$(b).s(9(){6 t=X.Q||X.1v||M;6 a=X.u||X.23;6 g=X.1N||P;19(t,a,g);X.2E();H P})}9 19(d,f,g){3m{3(2t o.v.J.2i==="2g"){$("v","11").r({A:"28%",z:"28%"});$("11").r("22","2Z");3(o.1Y("1F")===M){$("v").q("<U 5=\'1F\'></U><4 5=\'B\'></4><4 5=\'8\'></4>");$("#B").s(G)}}n{3(o.1Y("B")===M){$("v").q("<4 5=\'B\'></4><4 5=\'8\'></4>");$("#B").s(G)}}3(1K()){$("#B").1J("2B")}n{$("#B").1J("2z")}3(d===M){d=""}$("v").q("<4 5=\'K\'><1I L=\'"+1w.L+"\' /></4>");$(\'#K\').2y();6 h;3(f.O("?")!==-1){h=f.3l(0,f.O("?"))}n{h=f}6 i=/\\.2s$|\\.2q$|\\.2m$|\\.2l$|\\.2k$/;6 j=h.1C().2h(i);3(j==\'.2s\'||j==\'.2q\'||j==\'.2m\'||j==\'.2l\'||j==\'.2k\'){1D="";1G="";14="";1z="";1x="";R="";1n="";1r=P;3(g){E=$("a[@1N="+g+"]").36();25(D=0;((D<E.1c)&&(R===""));D++){6 k=E[D].u.1C().2h(i);3(!(E[D].u==f)){3(1r){1z=E[D].Q;1x=E[D].u;R="<1e 5=\'1X\'>&1d;&1d;<a u=\'#\'>2T &2R;</a></1e>"}n{1D=E[D].Q;1G=E[D].u;14="<1e 5=\'1U\'>&1d;&1d;<a u=\'#\'>&2O; 2N</a></1e>"}}n{1r=1b;1n="1t "+(D+1)+" 2L "+(E.1c)}}}S=1p 1t();S.1g=9(){S.1g=M;6 a=2x();6 x=a[0]-1M;6 y=a[1]-1M;6 b=S.z;6 c=S.A;3(b>x){c=c*(x/b);b=x;3(c>y){b=b*(y/c);c=y}}n 3(c>y){b=b*(y/c);c=y;3(b>x){c=c*(x/b);b=x}}13=b+30;1a=c+2G;$("#8").q("<a u=\'\' 5=\'1L\' Q=\'1o\'><1I 5=\'2F\' L=\'"+f+"\' z=\'"+b+"\' A=\'"+c+"\' 23=\'"+d+"\'/></a>"+"<4 5=\'2D\'>"+d+"<4 5=\'2C\'>"+1n+14+R+"</4></4><4 5=\'2A\'><a u=\'#\' 5=\'Z\' Q=\'1o\'>1l</a> 1k 1j 1s</4>");$("#Z").s(G);3(!(14==="")){9 12(){3($(o).N("s",12)){$(o).N("s",12)}$("#8").C();$("v").q("<4 5=\'8\'></4>");19(1D,1G,g);H P}$("#1U").s(12)}3(!(R==="")){9 1i(){$("#8").C();$("v").q("<4 5=\'8\'></4>");19(1z,1x,g);H P}$("#1X").s(1i)}o.1h=9(e){3(e==M){I=2w.2v}n{I=e.2u}3(I==27){G()}n 3(I==3k){3(!(R=="")){o.1h="";1i()}}n 3(I==3j){3(!(14=="")){o.1h="";12()}}};16();$("#K").C();$("#1L").s(G);$("#8").r({Y:"T"})};S.L=f}n{6 l=f.2r(/^[^\\?]+\\??/,\'\');6 m=2p(l);13=(m[\'z\']*1)+30||3h;1a=(m[\'A\']*1)+3g||3f;W=13-30;V=1a-3e;3(f.O(\'2j\')!=-1){1E=f.1B(\'3d\');$("#15").C();3(m[\'1A\']!="1b"){$("#8").q("<4 5=\'2f\'><4 5=\'1H\'>"+d+"</4><4 5=\'2e\'><a u=\'#\' 5=\'Z\' Q=\'1o\'>1l</a> 1k 1j 1s</4></4><U 1W=\'0\' 2d=\'0\' L=\'"+1E[0]+"\' 5=\'15\' 1v=\'15"+1f.2c(1f.1y()*2b)+"\' 1g=\'1m()\' J=\'z:"+(W+29)+"p;A:"+(V+17)+"p;\' > </U>")}n{$("#B").N();$("#8").q("<U 1W=\'0\' 2d=\'0\' L=\'"+1E[0]+"\' 5=\'15\' 1v=\'15"+1f.2c(1f.1y()*2b)+"\' 1g=\'1m()\' J=\'z:"+(W+29)+"p;A:"+(V+17)+"p;\'> </U>")}}n{3($("#8").r("Y")!="T"){3(m[\'1A\']!="1b"){$("#8").q("<4 5=\'2f\'><4 5=\'1H\'>"+d+"</4><4 5=\'2e\'><a u=\'#\' 5=\'Z\'>1l</a> 1k 1j 1s</4></4><4 5=\'F\' J=\'z:"+W+"p;A:"+V+"p\'></4>")}n{$("#B").N();$("#8").q("<4 5=\'F\' 3c=\'3b\' J=\'z:"+W+"p;A:"+V+"p;\'></4>")}}n{$("#F")[0].J.z=W+"p";$("#F")[0].J.A=V+"p";$("#F")[0].3a=0;$("#1H").11(d)}}$("#Z").s(G);3(f.O(\'37\')!=-1){$("#F").q($(\'#\'+m[\'26\']).1T());$("#8").24(9(){$(\'#\'+m[\'26\']).q($("#F").1T())});16();$("#K").C();$("#8").r({Y:"T"})}n 3(f.O(\'2j\')!=-1){16();3($.1q.35){$("#K").C();$("#8").r({Y:"T"})}}n{$("#F").34(f+="&1y="+(1p 33().32()),9(){16();$("#K").C();1u("#F a.18");$("#8").r({Y:"T"})})}}3(!m[\'1A\']){o.21=9(e){3(e==M){I=2w.2v}n{I=e.2u}3(I==27){G()}}}}31(e){}}9 1m(){$("#K").C();$("#8").r({Y:"T"})}9 G(){$("#2Y").N("s");$("#Z").N("s");$("#8").2X("2W",9(){$(\'#8,#B,#1F\').2V("24").N().C()});$("#K").C();3(2t o.v.J.2i=="2g"){$("v","11").r({A:"1Z",z:"1Z"});$("11").r("22","")}o.1h="";o.21="";H P}9 16(){$("#8").r({2U:\'-\'+20((13/2),10)+\'p\',z:13+\'p\'});3(!(1V.1q.2Q&&1V.1q.2P<7)){$("#8").r({38:\'-\'+20((1a/2),10)+\'p\'})}}9 2p(a){6 b={};3(!a){H b}6 c=a.1B(/[;&]/);25(6 i=0;i<c.1c;i++){6 d=c[i].1B(\'=\');3(!d||d.1c!=2){39}6 e=2a(d[0]);6 f=2a(d[1]);f=f.2r(/\\+/g,\' \');b[e]=f}H b}9 2x(){6 a=o.2M;6 w=1S.2o||1R.2o||(a&&a.1Q)||o.v.1Q;6 h=1S.1P||1R.1P||(a&&a.2n)||o.v.2n;1O=[w,h];H 1O}9 1K(){6 a=2K.2J.1C();3(a.O(\'2I\')!=-1&&a.O(\'3o\')!=-1){H 1b}}',62,211,'|||if|div|id|var||TB_window|function||||||||||||||else|document|px|append|css|click||href|body||||width|height|TB_overlay|remove|TB_Counter|TB_TempArray|TB_ajaxContent|tb_remove|return|keycode|style|TB_load|src|null|unbind|indexOf|false|title|TB_NextHTML|imgPreloader|block|iframe|ajaxContentH|ajaxContentW|this|display|TB_closeWindowButton||html|goPrev|TB_WIDTH|TB_PrevHTML|TB_iframeContent|tb_position||thickbox|tb_show|TB_HEIGHT|true|length|nbsp|span|Math|onload|onkeydown|goNext|Naciśnij|lub|Kliknij Zamknij|tb_showIframe|TB_imageCount|Close|new|browser|TB_FoundURL|Esc|Image|tb_init|name|imgLoader|TB_NextURL|random|TB_NextCaption|modal|split|toLowerCase|TB_PrevCaption|urlNoQuery|TB_HideSelect|TB_PrevURL|TB_ajaxWindowTitle|img|addClass|tb_detectMacXFF|TB_ImageOff|150|rel|arrayPageSize|innerHeight|clientWidth|self|window|children|TB_prev|jQuery|frameborder|TB_next|getElementById|auto|parseInt|onkeyup|overflow|alt|unload|for|inlineId||100||unescape|1000|round|hspace|TB_closeAjaxWindow|TB_title|undefined|match|maxHeight|TB_iframe|bmp|gif|png|clientHeight|innerWidth|tb_parseQuery|jpeg|replace|jpg|typeof|which|keyCode|event|tb_getPageSize|show|TB_overlayBG|TB_closeWindow|TB_overlayMacFFBGHack|TB_secondLine|TB_caption|blur|TB_Image|60|tb_pathToImage|mac|userAgent|navigator|of|documentElement|Prev|lt|version|msie|gt|ready|Next|marginLeft|trigger|fast|fadeOut|TB_imageOff|hidden||catch|getTime|Date|load|safari|get|TB_inline|marginTop|continue|scrollTop|TB_modal|class|TB_|45|440|40|630|input|188|190|substr|try|area|firefox'.split('|'),0,{}))


/* when the DOM is ready */  
window.addEvent('domready', function() {  
    /* create sortables */  
    var sb = new Sortables('sortable-list', {  
        /* set options */  
        clone:true,  
        revert: true,  
        /* initialization stuff here */  
        initialize: function() {   
  
        },  
        /* once an item is selected */  
        onStart: function(el) {  
            el.setStyle('background','#add8e6');  
        },  
        /* when a drag is complete */  
        onComplete: function(el) {  
            el.setStyle('background','#ddd');  
            //build a string of the order  
            var sort_order = '';  
            $$('#sortable-list li').each(function(li) { sort_order = sort_order +  li.get('rel')  + '|'; });  
            $('sort_order').value = sort_order;  
  
            //autosubmit if the checkbox says to  
            if($('auto_submit').checked) {  
                //do an ajax request  
                var req = new Request({  
                    url:'',  
                    method:'post',  
                    autoCancel:true,  
                    data:'sort_order=' + sort_order + '&ajax=' + $('auto_submit').checked + '&do_submit=1&byajax=1',  
                    onRequest: function() {  
                        $('message-box').set('text','Updating the sort order in the database.');  
                    },  
                    onSuccess: function() {  
                        $('message-box').set('text','Database has been updated.');  
                    }  
                }).send();  
            }  
        }  
    });  
});

$(document).ready(function(){

	$("ul.dropdown li").dropdown();

});

$.fn.dropdown = function() {

	$(this).hover(function(){
		$(this).addClass("hover");
		$('> .dir',this).addClass("open");
		$('ul:first',this).css('visibility', 'visible');
	},function(){
		$(this).removeClass("hover");
		$('.open',this).removeClass("open");
		$('ul:first',this).css('visibility', 'hidden');
	});

}


function visible_off(l,p) {
                document.getElementById('txtSearch').focus();
                mint.fx.Fade("dedykacja", 0, 1, 500);
				mint.fx.Fade("loginh3", 0, 1, 500);
				mint.fx.Fade("jhr_h1", 0, 1, 500);
				mint.fx.Fade("sugester", 0, 1, 500);
				mint.fx.Fade("myplaylist", 0, 1, 500);
				
				
			}

   			
			
function visible() {
                
                mint.fx.Fade("dedykacja", 100, 50, 500);
				mint.fx.Fade("loginh3", 100, 50, 500);
				mint.fx.Fade("jhr_h1", 100, 50, 500);
				mint.fx.Fade("sugester", 100, 50, 500);
				mint.fx.Fade("myplaylist", 100, 50, 500);
			}	

			

function mark(schema) {

   schema.focus();
   schema.select();
 }


function StartFX() {
    mint.fx.Style("tekst1", "marginLeft", null, 4, 1, 1);
    mint.fx.Style("tekst1", "width", null,  970, 0, 1);
	StartFX2();
	FadeIn3()
	
}  

function StartFX2() {
    mint.fx.Style("tekst2", "fontSize", null, 50, 1, 1);
    mint.fx.Style("tekst2", "marginLeft", null, 4, 1, 1);
    mint.fx.Style("tekst2", "width", null,  970, 5, 1);
} 

function StartFX3() {
    mint.fx.Style("tekst1", "marginLeft", null, 510, 1, 1);
    mint.fx.Style("tekst1", "width", null,  470, 1, 1);
	StartFX4();
	FadeIn2();
	document.getElementById("tekst1").innerHTML ='';
	
}  

function StartFX4() {
    mint.fx.Style("tekst2", "fontSize", null, 16, 1, 1);
    mint.fx.Style("tekst2", "marginLeft", null, 0, 1, 1);
    mint.fx.Style("tekst2", "width", null,  470, 1, 1);
} 
 
function StartFXc3() {
    mint.fx.Style("tekst1", "marginLeft", null, 510, 1, 1);
    mint.fx.Style("tekst1", "width", null,  470, 1, 1);
	StartFXc4();
	
}  

function StartFXc4() {
    mint.fx.Style("tekst2", "fontSize", null, 16, 1, 1);
    mint.fx.Style("tekst2", "marginLeft", null, 0, 1, 1);
    mint.fx.Style("tekst2", "width", null,  470, 1, 1);
} 
 


 
 function Movetxt() {
				mint.fx.Move("txtSearch", 128,66, 1, 1);
			}

function move_for_player() {
            document.getElementById("player2").style.display="block";
			//mint.fx.Move("latestsearch",0,200, 1, 1);
			//mint.fx.Move("tekst1", 505,200, 1, 1);
			//mint.fx.Move("similar", 10,600, 1,1 );
			}			
			
function Movetekst() {
				mint.fx.Move("tekst1", 583,210, 20, 10);
			}
			
			
 function Movesuggest() {
				mint.fx.Move("search_suggest", 220,140, 20, 10);
			}			
			
 function FadeOut() {
				mint.fx.Fade("logo2", 0, 20, 500);
				document.getElementById("logo2").style.display="none";
				
			}
			
function Fadelogin() {
				mint.fx.Fade("loginh", 0, 20, 500);
			}
			
function FadeOut2() {
				mint.fx.Fade("tekst1", 0, 20, 500);
				StartFXc3()
				
			}			
			
 function FadeIn() {
				mint.fx.Fade("logo", 100, 1, 20);
			}	

			

 function FadeIn2() {
				mint.fx.Fade("tekst1", 60, 1, 1);
			}

function FadeIn3() {
				mint.fx.Fade("tekst1", 90, 1, 5);
			}			
 
 function enter()
 
      {
	  
      return res(document.getElementById('txtSearch').value);
   
      }
	  
function check(e){
    var code;
      if (!e) var e = window.event;
      if (e.keyCode) code = e.keyCode;
      else if (e.which) code = e.which;
	  document.getElementById("search_suggest").style.display="none";
      if(code == 13){
	    document.getElementById("search_suggest").style.display="none";
        return res(document.getElementById('txtSearch').value);
      }
  }
  
 function check2(e){
    var code;
      if (!e) var e = window.event;
      if (e.keyCode) code = e.keyCode;
      else if (e.which) code = e.which;
      if(code == 13){
        return on_login();;
      }
  }
   


function checkInp()
{
	s_search = document.getElementById("txtSearch");
	s_submit = document.getElementById("cmdSearch");

	if(s_search.value == ""){
		alert("Musisz wpisać jakieś słowo w pole wyszukiwania!");
		s_search.focus();
		return false;
	}

	s_submit.disabled = true;
	s_submit.value = "Process...";
	return true;
}

 function enter()
 
      {
      return res(document.getElementById('txtSearch').value);
   
      }

function restrictChars(myfield, e)
{
	var key;
	var keychar;

	if (window.event)
		key = window.event.keyCode;
	else if (e)
		key = e.which;
	else
   		return true;	

	keychar = String.fromCharCode(key);

	// control keys
	if ((key==null) || (key==0) || (key==8) || (key==9) || (key==13) || (key==27) )
   	return true;
	// numbers + alphabetic chars
	else if ((("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZęółśążźćńĄĘÓŁŚŻŹĆŃ-.,\"' ").indexOf(keychar) > -1))
   		return true;
	else
		alert("Dozwolone są znaki - . , \" ' i spacje");
		return false;
}

function inject_player(url, name, n, s, i, ile, src)
{
	$.ajax({
   		beforeSend: function(){
   		},
		type: "GET",
		url: "mp3_player.php",
		data: 'url='+url+'&name='+name+'&src='+src+'',
		success: function(html){
		        move_for_player();
		        var j;
		        for (j=1;j<ile;j++){
			document.getElementById('cell'+j).style.backgroundColor = "#000";
			}
			document.getElementById('cell'+i).style.backgroundColor = "#440000";
			document.getElementById('player2').innerHTML = html;
			//tekst(n,s);
		}
	});
}

function sideshow(n,s)
{
	$.ajax({
   		beforeSend: function(){
			document.getElementById('slideshow').innerHTML = '<img src="images/loadingmp3.gif" alt="Loading..." />';
   		},
		
		type: "GET",
		url: "templates/sideshow.php",
		data: 'n='+n+'&s='+s+'',
		success: function(html){
		    document.getElementById('slideshow').style.display = "block";
			document.getElementById('slideshow').innerHTML = html;
		}
	});
}

function similar(n,s)
{
	$.ajax({
   		beforeSend: function(){
		
   		},
		type: "GET",
		url: "templates/similar.php",
		data: 'n='+n+'&s='+s+'',
		success: function(html){
			document.getElementById('similar').innerHTML = html;
		}
	});
}

function similar2(q)
{
	$.ajax({
   		beforeSend: function(){
		
   		},
		type: "GET",
		url: "templates/similar.php",
		data: 'q='+q+'',
		success: function(html){
			document.getElementById('similar').innerHTML = html;
		}
	});
}

function send_image(image)
{

	$.ajax({
   		beforeSend: function(){
			document.getElementById('myaccount').innerHTML = '<img src="images/loadingmp3.gif" alt="Loading..." />';
   		},
		type: "GET",
		url: "templates/image2.php",
		data: 'image='+image+'',
		success: function(html){
			document.getElementById('myaccount').innerHTML = html;
		}
	});
	
	
	$.ajax({
   		beforeSend: function(){
			document.getElementById('myaccount').innerHTML = '<img src="images/loadingmp3.gif" alt="Loading..." />';
   		},
		type: "GET",
		url: "templates/myaccount2.php",
		data: '',
		success: function(html){
			document.getElementById('myaccount').innerHTML = html;
		}
	});
	
	
}

function info(n,s)
{
	$.ajax({
   		beforeSend: function(){
			document.getElementById('info').innerHTML = '<img src="images/loadingmp3.gif" alt="Loading..." />';
   		},
		type: "GET",
		url: "templates/info.php",
		data: 'n='+n+'&s='+s+'',
		success: function(html){
		document.getElementById('info').innerHTML = html;
		tekst(n,s);
		}
	});
}
function res2(q)
{
	$.ajax({
	        beforeSend: function(){
		document.getElementById('search1').innerHTML = '<img src="images/loading.gif" alt="Loading..." />';
		document.getElementById('latestsearch').style.opacity = 0.60;
   		},
   		type: "GET",
		url: "display.php",
		data: 'q='+q+'&t=audio',
		success: function(html){
		document.getElementById('latestsearch').style.opacity = 1;
		document.getElementById('latestsearch').innerHTML = html;
		}
	});
}

function res(q,p)
{
	$.ajax({
	        beforeSend: function(){
		document.getElementById('latestsearch').style.opacity = 0.50;
   		},
   		type: "GET",
		url: "display.php",
		data: 'q='+q+'&page='+p+'&t=audio',
		success: function(html){
		
		document.getElementById('dedykacja').style.display = "none";
		document.getElementById('latestsearch').style.opacity = 1;
		document.getElementById('search_suggest').innerHTML = '';
		document.getElementById('search1').innerHTML = '';
		document.getElementById('dedykacja').innerHTML = '';
        Movetxt();
		Movesuggest();
		FadeOut();
		document.getElementById("logo").style.display="block";
		FadeIn();
		
		document.getElementById('latestsearch').innerHTML = html;
		if (!p) similar2(q);
		if (!p) tekst2(q);
		}
	});
}



function toplisty()
{
	$.ajax({
	    beforeSend: function(){
		document.getElementById('toplisty').innerHTML = '';
		
   		},
   		type: "GET",
		url: "templates/toplisty.php",
		data: '',
		success: function(html){
		document.getElementById('mojaplaylista').style.display = "none";
		document.getElementById('radio').style.display = "none";
		//if (document.getElementById('toplisty').style.display == "block") document.getElementById('toplisty').style.display = "none";
		document.getElementById('toplisty').style.display = "block";
		document.getElementById('toplisty').innerHTML = html;
		}
	});
}

function radio()
{
	$.ajax({
	    beforeSend: function(){
		document.getElementById('radio').innerHTML = '';
		
   		},
   		type: "GET",
		url: "templates/radio.php",
		data: '',
		success: function(html){
		document.getElementById('toplisty').style.display = "none";
		document.getElementById('mojaplaylista').style.display = "none";
		//if (document.getElementById('radio').style.display == "block") document.getElementById('radio').style.display = "none";
		document.getElementById('radio').style.display = "block";
		document.getElementById('radio').innerHTML = html;
		}
	});
}


function link_pl(link)
{
	$.ajax({
	    beforeSend: function(){
		document.getElementById('link_pl').innerHTML = '';
		
   		},
   		type: "GET",
		url: "templates/link_pl.php",
		data: 'link='+link+'',
		success: function(html){
		document.getElementById('link_embed').style.display = "none";
		if (document.getElementById('link_pl').style.display == "block") document.getElementById('link_pl').style.display = "none";
		else document.getElementById('link_pl').style.display = "block";
		document.getElementById('link_pl').innerHTML = html;
		}
	});
}

function link_embed(embed)
{
	$.ajax({
	    beforeSend: function(){
		document.getElementById('link_embed').innerHTML = '';
   		},
   		type: "GET",
		url: "templates/link_embed.php",
		data: 'embed='+embed+'',
		success: function(html){
		document.getElementById('link_pl').style.display = "none";
		if (document.getElementById('link_embed').style.display == "block") document.getElementById('link_embed').style.display = "none";
		else document.getElementById('link_embed').style.display = "block";
		document.getElementById('link_embed').innerHTML = html;
		}
	});
}

function mojaplaylista()
{
	$.ajax({
	    beforeSend: function(){
		document.getElementById('mojaplaylista').innerHTML = '';
		
   		},
   		type: "GET",
		url: "templates/mojaplaylista.php",
		data: '',
		success: function(html){
		document.getElementById('radio').style.display = "none";
		document.getElementById('toplisty').style.display = "none";
		if (document.getElementById('mojaplaylista').style.display == "block") document.getElementById('mojaplaylista').style.display = "none";
		else document.getElementById('mojaplaylista').style.display = "block";
		document.getElementById('mojaplaylista').innerHTML = html;
		}
	});
}

function logo()
{
	$.ajax({
	    beforeSend: function(){
		document.getElementById('search1').innerHTML = '<img src="images/loading.gif" alt="Loading..." />';
		
   		},
		type: "GET",
		url: "templates/latest.php",
		data: 't=audio',
		success: function(html){
		document.getElementById('latestsearch').innerHTML = html;
		document.getElementById('search1').innerHTML ='';
		document.getElementById('tekst1').innerHTML ='';
		}
	});
}



function tekst(n,s)
{
	$.ajax({
	    beforeSend: function(){
   		},
   		type: "GET",
		url: "tekst.php",
		data: 'n='+n+'+&s='+s+'',
		success: function(html){
		FadeIn2();
		document.getElementById('tekst1').style.display = "block";
		document.getElementById('tekst1').innerHTML = html;
		
		
		}
	});
}

function tekst2(n)
{
	$.ajax({
	    beforeSend: function(){
		document.getElementById('tekst1').innerHTML = '<img src="images/loading.gif" alt="Loading..." />';
   		},
   		type: "GET",
		url: "tekst.php",
		data: 'n='+n+'',
		success: function(html){
		FadeIn2();
		document.getElementById('tekst1').style.display = "block";
		document.getElementById('tekst1').innerHTML = html;
		
		
		}
	});
}

function info2(n,s)
{
	$.ajax({
	    beforeSend: function(){
		document.getElementById('info2').innerHTML = '<img src="images/loading.gif" alt="Loading..." />';
   		},
   		type: "GET",
		url: "templates/info2.php",
		data: 'n='+n+'+&s='+s+'',
		success: function(html){
		document.getElementById('info2').style.display = "block";
		document.getElementById('info2').innerHTML = html;
		
		
		}
	});
}

function close_player()
{
	$.ajax({
   		beforeSend: function(){
			document.getElementById('player1').innerHTML = '<img src="images/player_loading.gif" alt="Loading..." />';
   		},
		complete: function(){
			document.getElementById('player1').innerHTML = '';
		}
	});
}

function close()
{
	$.ajax({
   		beforeSend: function(){
			document.getElementById('tekst2').innerHTML = '<img src="images/player_loading.gif" alt="Loading..." />';
   		},
		complete: function(){
			document.getElementById('tekst2').innerHTML = '';
		}
	});
}

function mp3playlist()
{
	$.ajax({
	    beforeSend: function(){
   		},
   		type: "GET",
		url: "sort/index.php",
		data: '',
		success: function(html){
		document.getElementById('tekst1').style.display = "block";
        document.getElementById('tekst1').innerHTML = html;
		
		}
	});
}


function LoadContent(pf1, pf2, pf3)
{
	$.get("display.php", { q: pf1, src: pf2, page: pf3 },
		function(html){
			$('#' + pf2 + '').replaceWith(html);
		}
	);
}

function LoadContentVideo(pf1, pf2, pf3, pf4)
{
	$.get("display.php", { q: pf1, src: pf2, page: pf3, type: pf4 },
		function(html){
			$('#' + pf2 + '').replaceWith(html);
		}
	);
}

function alert_disable_dl()
{
	alert("Currently Disabled!");
}

function alert_disable_guest_dl()
{
	alert("Musisz się zalogować, aby pobrać ten utwór!");
}

function alert_add_playlist()
{
	alert("Musisz się zalogować, aby dodać utwór do playlist`y!");
}

function alert_add_video()
{
	alert("Musisz się zalogować, aby dodać wideo do playlist`y!");
}

function deletemp3(remove)
{ 

$.ajax({
		beforeSend: function(){
		document.getElementById(remove).innerHTML = '<img src="images/time.png" alt="Dodawanie" width="16px" height="16px" class="cellicon" />';
		},
		type: "GET",
		url: "",
		data: '',
		async: false,
		success: function(msg){
			document.getElementById(remove).innerHTML = '<img src="images/action_check.png" alt="Dodane do playlisty" width="16px" height="16px" class="cellicon" />';
		}
	});
	
}

function addMP3(link)
{
	$.ajax({
		beforeSend: function(){
		document.getElementById(link).innerHTML = '<img src="images/time.png" alt="Dodawanie" width="16px" height="16px" class="cellicon" />';
		},
		type: "GET",
		url: "index.php?p=addsong",
		data: '&' + link + '',
		async: false,
		success: function(msg){
			document.getElementById(link).innerHTML = '<img src="images/action_check.png" alt="Dodane do playlisty" width="16px" height="16px" class="cellicon" />';
		}
	});
	
		$.ajax({
	    beforeSend: function(){
		document.getElementById('search1').innerHTML = '<img src="images/loading.gif" alt="Loading..." />';
		
   		},
   		type: "GET",
		url: "templates/addsong.php",
		data: '&' + link + '',
		success: function(html){
		document.getElementById('search1').innerHTML = '';
		document.getElementById('account').innerHTML = '';
		document.getElementById('account').innerHTML = html;
		}
	});
	
	
	
	
}



function myplayer()
{
	$.ajax({
	    beforeSend: function(){
		document.getElementById('player2').innerHTML = '<img src="images/loading.gif" alt="Loading..." />';
		
   		},
   		type: "GET",
		url: "templates/playlista.php",
		data: '',
		success: function(html){
		move_for_player();
		document.getElementById('slideshow').style.display = "none";
		document.getElementById('mojaplaylista').style.display = "none";
		document.getElementById('player2').innerHTML = html;
		}
	});
}

function myplayer2()
{
	$.ajax({
	    beforeSend: function(){
		document.getElementById('player2').innerHTML = '<img src="images/loading.gif" alt="Loading..." />';
		
   		},
   		type: "GET",
		url: "templates/playlista2.php",
		data: '',
		success: function(html){
		move_for_player();
		document.getElementById('slideshow').style.display = "none";
		document.getElementById('mojaplaylista').style.display = "none";
		document.getElementById('player2').innerHTML = html;
		Movetxt();
		Movesuggest();
		FadeOut();
		document.getElementById("logo").style.display="block";
		FadeIn();
		}
	});
}

function myplayer2_revolt()
{
	$.ajax({
	    beforeSend: function(){
		document.getElementById('player2').innerHTML = '<img src="images/loading.gif" alt="Loading..." />';
		
   		},
   		type: "GET",
		url: "templates/playlista3.php",
		data: '',
		success: function(html){
		move_for_player();
		document.getElementById('slideshow').style.display = "none";
		document.getElementById('mojaplaylista').style.display = "none";
		document.getElementById('player2').innerHTML = html;
		Movetxt();
		Movesuggest();
		FadeOut();
		document.getElementById("logo").style.display="block";
		FadeIn();
		}
	});
}

function myplayer3()
{
	$.ajax({
	    beforeSend: function(){
		document.getElementById('player2').innerHTML = '<img src="images/loading.gif" alt="Loading..." />';
		
   		},
   		type: "GET",
		url: "templates/playlista4.php",
		data: '',
		success: function(html){
		move_for_player();
		document.getElementById('slideshow').style.display = "none";
		document.getElementById('mojaplaylista').style.display = "none";
		document.getElementById('player2').innerHTML = html;
		Movetxt();
		Movesuggest();
		FadeOut();
		document.getElementById("logo").style.display="block";
		FadeIn();
		}
	});
}

function myplayer4()
{
	$.ajax({
	    beforeSend: function(){
		document.getElementById('player2').innerHTML = '<img src="images/loading.gif" alt="Loading..." />';
		
   		},
   		type: "GET",
		url: "templates/playlista5.php",
		data: '',
		success: function(html){
		move_for_player();
		document.getElementById('slideshow').style.display = "none";
		document.getElementById('mojaplaylista').style.display = "none";
		document.getElementById('player2').innerHTML = html;
		Movetxt();
		FadeOut();
		document.getElementById("logo").style.display="block";
		FadeIn();
		}
	});
}

function top_lista(id_pl,name)
{
	$.ajax({
	    beforeSend: function(){
		document.getElementById('player2').innerHTML = '<img src="images/loading.gif" alt="Loading..." />';
		
   		},
   		type: "GET",
		url: "templates/top_lista.php",
		data: '&id_pl='+id_pl+'&name='+name+'',
		success: function(html){
		move_for_player();
		document.getElementById('player2').style.display = "block";
		document.getElementById('slideshow').style.display = "none";
		document.getElementById('player2').innerHTML = html;
		document.getElementById('toplisty').style.display = "none";
		Movetxt();
		Movesuggest();
		FadeOut();
		document.getElementById("logo").style.display="block";
		FadeIn();
		}
	});
}

function close_all()
{
		document.getElementById('mojaplaylista').style.display = "none";
		document.getElementById('toplisty').style.display = "none";
		document.getElementById('radio').style.display = "none";
		

}

function radio_lista(id_pl,name)
{
	$.ajax({
	    beforeSend: function(){
		document.getElementById('player2').innerHTML = '<img src="images/loading.gif" alt="Loading..." />';
		
   		},
   		type: "GET",
		url: "templates/radio_lista.php",
		data: '&id_pl='+id_pl+'&name='+name+'',
		success: function(html){
		move_for_player();
		document.getElementById('player2').style.display = "block";
		document.getElementById('slideshow').style.display = "none";
		document.getElementById('player2').innerHTML = html;
		document.getElementById('radio').style.display = "none";
		Movetxt();
		Movesuggest();
		FadeOut();
		document.getElementById("logo").style.display="block";
		FadeIn();
		}
	});
}

function gg()
{
	$.ajax({
	    beforeSend: function(){
		
   		},
   		type: "GET",
		url: "templates/gg.php",
		data: '',
		success: function(html){	
		mint.gui.RegisterDragObject("gg");
		document.getElementById('gg').style.display = 'block';
		mint.fx.Fade("tekst1", 0, 1, 500);
		mint.fx.Fade("tekst1", 100, 20, 500);
		document.getElementById('gg').innerHTML = html;
		}
	});
}

function top_lista2(id_pl,name)
{
	$.ajax({
	    beforeSend: function(){
		document.getElementById('player2').innerHTML = '<img src="images/loading.gif" alt="Loading..." />';
		
   		},
   		type: "GET",
		url: "templates/top_lista2.php",
		data: '&id_pl='+id_pl+'&name='+name+'',
		success: function(html){
		document.getElementById('slideshow').style.display = "none";
		document.getElementById('player2').innerHTML = html;
		Movetxt();
		Movesuggest();
		FadeOut();
		document.getElementById("logo").style.display="block";
		FadeIn();
		}
	});
}

function srch_all(srch_all)
{
	$.ajax({
	    beforeSend: function(){
		document.getElementById('player2').innerHTML = '<img src="images/loading.gif" alt="Loading..." />';
		
   		},
   		type: "GET",
		url: "templates/srch_all.php",
		data: '&srch_all='+srch_all+'',
		success: function(html){
		document.getElementById('slideshow').style.display = "none";
		document.getElementById('player2').innerHTML = html;
		document.getElementById('toplisty').innerHTML = '';
		}
	});
}

function myaccount()
{
	$.ajax({
	    beforeSend: function(){
		document.getElementById('myaccount').innerHTML = '<img src="images/loading.gif" alt="Loading..." />';
		
   		},
   		type: "GET",
		url: "templates/myaccount2.php",
		data: '',
		success: function(html){
		document.getElementById('myaccount').innerHTML = html;
		}
	});
}


function addVideo(add)
{
	$.ajax({
		beforeSend: function(){
			document.getElementById(add).innerHTML = '<img src="images/time.png" alt="Dodawanie" />';
		},
		type: "GET",
		url: "index.php?p=addvideo",
		data: '&' + add + '',
		async: false,
		success: function(msg){
			document.getElementById(add).innerHTML = '<img src="images/check.png" alt="Added" />';
			document.getElementById('player1').innerHTML = '';
		}
	});
			$.ajax({
	    beforeSend: function(){
		document.getElementById('search1').innerHTML = '<img src="images/loading.gif" alt="Loading..." />';
		
   		},
   		type: "GET",
		url: "templates/playlista.php",
		data: '',
		success: function(html){
		document.getElementById('search1').innerHTML = '';
		document.getElementById('player1').innerHTML = html;
		}
	});
}

function deleteVideo(remove)
{
	$.ajax({
		beforeSend: function(){
			document.getElementById(remove).innerHTML = 'Usuwanie';
		},
		type: "GET",
		url: "index.php?p=removevideo",
		data: '&id=' + remove + '',
		async: false,
		success: function(msg){
			document.getElementById(remove).innerHTML = 'Usunięto';
		}
	});
}

function on_login()
{
	uname_login = document.getElementById("username3");
	pass_login = document.getElementById("password3");
	uname_login.disabled = false;
	pass_login.disabled = false;
	$("#msgbox").addClass('messagebox').text('Sprawdzam').fadeIn(1000);
	$.post("index.php?p=do_login",{ username:$('#username3').val(),password:$('#password3').val(),rand:Math.random() } ,
		function(data)
		{
			if(data!='success')
			{
				$("#msgbox").fadeTo(200,0.1,
					function() //start fading the messagebox
					{ 
						//add message and change the class of the box and start fading
						$(this).html(data).addClass('messageboxerror').fadeTo(900,1);
					}
				);
				uname_login.disabled = false;
				pass_login.disabled = false;
			}
			else 
			{
				$("#msgbox").fadeTo(200,0.1,
					function()  //start fading the messagebox
					{ 
						//add message and change the class of the box and start fading
						$(this).html('Trwa logowanie').addClass('messageboxok').fadeTo(0,1,
							function()
							{ 
	
    
	$.ajax({
	    beforeSend: function(){
		document.getElementById('loginh2').innerHTML = '<img src="images/loading.gif" alt="Loading..." />';
		},
   		type: "GET",
		url: "templates/myaccount.php",
		data: '',
		success: function(html){
		$("#msgbox").fadeTo(200,0);
		var lol = document.getElementById('txtSearch').value;
		location.replace("http://mopla.pl/");
		document.getElementById('logintpl').innerHTML = '';
		document.getElementById('loginh2').innerHTML = html;
		if (lol){
		res(lol);
		}
		}
	});
	
	
	
	
							}
						);
					}
				);
			}		
		}
	);
	return false; 
}

function auto_login(login,pass)
{
	uname_login = login;
	pass_login = pass;
	uname_login.disabled = false;
	pass_login.disabled = false;
	$("#msgbox").addClass('messagebox').text('Sprawdzam').fadeIn(1000);
	$.post("index.php?p=do_login",{ username:$('#username3').val(),password:$('#password3').val(),rand:Math.random() } ,
		function(data)
		{
			if(data!='success')
			{
				$("#msgbox").fadeTo(200,0.1,
					function() //start fading the messagebox
					{ 
						//add message and change the class of the box and start fading
						$(this).html(data).addClass('messageboxerror').fadeTo(900,1);
					}
				);
				uname_login.disabled = false;
				pass_login.disabled = false;
			}
			else 
			{
				$("#msgbox").fadeTo(200,0.1,
					function()  //start fading the messagebox
					{ 
						//add message and change the class of the box and start fading
						$(this).html('Trwa logowanie').addClass('messageboxok').fadeTo(0,1,
							function()
							{ 
	
    
	$.ajax({
	    beforeSend: function(){
		document.getElementById('loginh2').innerHTML = '<img src="images/loading.gif" alt="Loading..." />';
		},
   		type: "GET",
		url: "templates/myaccount.php",
		data: '',
		success: function(html){
		$("#msgbox").fadeTo(200,0);
		var lol = document.getElementById('txtSearch').value;
		location.replace("http://mopla.pl/");
		document.getElementById('logintpl').innerHTML = '';
		document.getElementById('loginh2').innerHTML = html;
		if (lol){
		res(lol);
		}
		}
	});
	
	
	
	
							}
						);
					}
				);
			}		
		}
	);
	return false; 
}

function logout()

{ 

    	$.ajax({
		type: "GET",
		url: "templates/logout.php",
		data: '',
		success: function(html){
			document.getElementById('loginh3').innerHTML = html;
			location.replace("http://mopla.pl/");
		}
	});

}


function on_editp()
{
	_email = document.getElementById("email");
	_fullname = document.getElementById("fullname");
	_site = document.getElementById("site");
	_country = document.getElementById("country");
	_city = document.getElementById("city");
	_tel = document.getElementById("tel");
	_profile = document.getElementById("profile");
	_email.disabled = true;
	_fullname.disabled = true;
	_site.disabled = true;
	_country.disabled = true;
	_city.disabled = true;
	_tel.disabled = true;
	_profile.disabled = true;
	//remove all the class add the messagebox classes and start fading
	$("#msgbox").removeClass().addClass('messagebox').text('Sprawdzam....').fadeIn(1000);
	//check the username exists or not from ajax
	$.post("index.php?p=do_editaccount",{ email:$('#email').val(),fullname:$('#fullname').val(),site:$('#site').val(),country:$('#country').val(),city:$('#city').val(),tel:$('#tel').val(),profile:$('#profile').val(),rand:Math.random() } ,
		function(data)
		{
			if(data!='success')
			{
				$("#msgbox").fadeTo(200,0.1,
					function() //start fading the messagebox
					{ 
						//add message and change the class of the box and start fading
						$(this).html(data).addClass('messageboxerror').fadeTo(900,1);
					}
				);
				_email.disabled = false;
				_fullname.disabled = false;
				_site.disabled = false;
				_country.disabled = false;
				_city.disabled = false;
				_tel.disabled = false;
				_profile.disabled = false;
			}
			else 
			{
				$("#msgbox").fadeTo(200,0.1,
					function()  //start fading the messagebox
					{ 
						//add message and change the class of the box and start fading
						$(this).html('Twoje informacje zostały zmienione.').addClass('messageboxok').fadeTo(900,1,
							function()
							{ 
								//redirect to secure page
								document.location='index.php?p=myaccount';
							}
						);
					}
				);
			}		
		}
	);
	return false; //not to post the  form physically
}

function on_changep()
{
	_old_pwd = document.getElementById("old_pwd");
	_new_pwd1 = document.getElementById("new_pwd1");
	_new_pwd2 = document.getElementById("new_pwd2");
	_old_pwd.disabled = true;
	_new_pwd1.disabled = true;
	_new_pwd2.disabled = true;
	//remove all the class add the messagebox classes and start fading
	$("#msgbox").removeClass().addClass('messagebox').text('Validating....').fadeIn(1000);
	//check the username exists or not from ajax
	$.post("index.php?p=do_changepwd",{ old_pwd:$('#old_pwd').val(),new_pwd1:$('#new_pwd1').val(),new_pwd2:$('#new_pwd2').val(),rand:Math.random() } ,
		function(data)
		{
			if(data!='success')
			{
				$("#msgbox").fadeTo(200,0.1,
					function() //start fading the messagebox
					{ 
						//add message and change the class of the box and start fading
						$(this).html(data).addClass('messageboxerror').fadeTo(900,1);
					}
				);
				_old_pwd.disabled = false;
				_new_pwd1.disabled = false;
				_new_pwd2.disabled = false;
			}
			else 
			{
				$("#msgbox").fadeTo(200,0.1,
					function()  //start fading the messagebox
					{ 
						//add message and change the class of the box and start fading
						$(this).html('Zamiana hasła została przeprowadzona pomyślnie.').addClass('messageboxok').fadeTo(900,1,
							function()
							{ 
								//redirect to secure page
								document.location='index.php?p=login';
							}
						);
					}
				);
			}		
		}
	);
	return false; //not to post the  form physically
}

function register()
{
	$.ajax({
   		beforeSend: function(){
   		},
		type: "GET",
		url: "templates/register.php",
		data: '',
		success: function(html){
		    document.getElementById('register').style.display = "block";
			mint.fx.Fade("latestsearch", 20, 1, 500);
			mint.fx.Fade("tekst1", 20, 1, 500);
			mint.fx.Fade("info", 10, 1, 500);
			mint.fx.Fade("register", 0, 1, 1);
			mint.fx.Fade("register", 100, 60, 400);
			mint.fx.Style("register", "width", null, 280, 1, 1);
			mint.fx.Style("register", "width", null, 300, 20, 100);	
            mint.fx.Style("register", "height", null, 470, 1, 1);
			mint.fx.Style("register", "height", null, 510, 20, 100);				
			mint.fx.Style("register", "marginTop", null, 320, 1, 1);
			mint.fx.Style("register", "marginTop", null, 280, 20, 100);
			mint.fx.Style("register", "marginLeft", null, 640, 1, 1);
			mint.fx.Style("register", "marginLeft", null, 600, 20, 100);
			mint.fx.Style("register", "width", null, 350, 20, 100);	
			document.getElementById('register').innerHTML = html;
		}
	});
}

function close_r()
{
           
			mint.fx.Fade("register", 0, 20, 500);
			document.getElementById('register').style.display = 'none';
			mint.fx.Fade("latestsearch", 100, 10, 500);
			mint.fx.Fade("tekst1", 60, 10, 500);
			mint.fx.Fade("info", 60, 10, 500);

}


function przewodnik()
{
	$.ajax({
   		beforeSend: function(){
			document.getElementById('przewodnik').innerHTML = '<img src="images/loadingmp3.gif" alt="Loading..." />';
   		},
		type: "GET",
		url: "templates/przewodnik.php",
		data: '',
		success: function(html){
		    document.getElementById('przewodnik').style.display = "block"; 
			document.getElementById('przewodnik').innerHTML = html;
		}
	});
}



function do_register()
{
	//remove all the class add the messagebox classes and start fading
	$("#msgbox2").removeClass().addClass('messagebox2').text('Sprawdzam....').fadeIn(1000);
	//check the username exists or not from ajax
	$.post("index.php?p=do_register",{ username:$('#username').val(), password:$('#password').val(), password2:$('#password2').val(), email:$('#email').val(), fullname:$('#fullname').val(), image:$('#image').val(), rand:Math.random() } ,
		function(data)
		{
			if(data!='register1' && data!='register2' && data!='register-1' && data!='register-2')
			{
				$("#msgbox2").fadeTo(200,0.1,
					function() //start fading the messagebox
					{ 
						//add message and change the class of the box and start fading
						$(this).html(data).addClass('messageboxerror').fadeTo(900,1);
					}
				);
			}
			else 
			{
				if(data=='register1')
				{
					$("#msgbox2").fadeTo(200,0.1,
						function() //start fading the messagebox
						{ 
							//add message and change the class of the box and start fading
							$(this).html("Rejestracja przebiegła pomyślnie.<br /> Możesz się już zalogować :)").addClass('messageboxok').fadeTo(900,1);
						}
					);
				}
				else if(data=='register2')
				{
					$("#msgbox2").fadeTo(200,0.1,
						function() //start fading the messagebox
						{ 
							//add message and change the class of the box and start fading
							$(this).html("Rejestracja przebiegła pomyślnie.<br /> Został wysłany do ciebie email w którym znajdziesz szczegóły jak aktywować konto.").addClass('messageboxok').fadeTo(900,1);
						}
					);
				}
				else if(data=='register-1')
				{
					$("#msgbox2").fadeTo(200,0.1,
						function() //start fading the messagebox
						{ 
							//add message and change the class of the box and start fading
							$(this).html("<font class=\"error\">Faild sending registration email,<br /> please report this to the webmaster</font><br /> Registration was successfull.<br /> you can now login.").addClass('messageboxok').fadeTo(900,1);
						}
					);
				}
				else
				{
					$("#msgbox2").fadeTo(200,0.1,
						function() //start fading the messagebox
						{ 
							//add message and change the class of the box and start fading
							$(this).html("<font class=\"error\">Faild sending registration email,<br /> please report this to the webmaster</font><br /> Registration was successfull.<br> Please go and check your email.<br> You'll find how to activate your account.").addClass('messageboxok').fadeTo(900,1);
						}
					);
				}
			}		
		}
	);
	return false; //not to post the  form physically
}

function on_forgotp()
{
	uname_forgotp = document.getElementById("username");
	pass_forgotp = document.getElementById("email");
	uname_forgotp.disabled = true;
	pass_forgotp.disabled = true;
	//remove all the class add the messagebox classes and start fading
	$("#msgbox").removeClass().addClass('messagebox').text('Sprawdzam').fadeIn(1000);
	//check the username exists or not from ajax
	$.post("index.php?p=do_forgotpwd",{ username:$('#username').val(),email:$('#email').val(),rand:Math.random() } ,
		function(data)
		{
			if(data!='success')
			{
				$("#msgbox").fadeTo(200,0.1,
					function() //start fading the messagebox
					{ 
						//add message and change the class of the box and start fading
						$(this).html(data).addClass('messageboxerror').fadeTo(900,1);
					}
				);
				uname_forgotp.disabled = false;
				pass_forgotp.disabled = false;
			}
			else 
			{
				$("#msgbox").fadeTo(200,0.1,
					function()  //start fading the messagebox
					{ 
						//add message and change the class of the box and start fading
						$(this).html('Nowe hasło zostało wysłane na twój adres email.').addClass('messageboxok').fadeTo(900,1,
							function()
							{ 
								//redirect to secure page
								document.location='index.php?p=login';
							}
						);
					}
				);
			}		
		}
	);
	return false; //not to post the  form physically
}


function onfocus_hide()
{
	$("#msgbox").hide("slow");
}

function slideSwitch() {
    var $active = $('#slideshow IMG.active');

    if ( $active.length == 0 ) $active = $('#slideshow IMG:last');

    // use this to pull the images in the order they appear in the markup
    var $next =  $active.next().length ? $active.next()
        : $('#slideshow IMG:first');

    // uncomment the 3 lines below to pull the images in random order
    
    // var $sibs  = $active.siblings();
    // var rndNum = Math.floor(Math.random() * $sibs.length );
    // var $next  = $( $sibs[ rndNum ] );


    $active.addClass('last-active');

    $next.css({opacity: 0.0})
        .addClass('active')
        .animate({opacity: 1.0}, 1000, function() {
            $active.removeClass('active last-active');
        });
}

$(function() {
    setInterval( "slideSwitch()", 8000 );
});

/**
Vertigo Tip by www.vertigo-project.com
Requires jQuery
*/
this.vtip=function(){this.xOffset=-10;this.yOffset=10;$(".vtip").unbind().hover(function(a){this.t=this.title;this.title="";this.top=(a.pageY+yOffset);this.left=(a.pageX+xOffset);$("body").append('<p id="vtip"><img id="vtipArrow" />'+this.t+"</p>");$("p#vtip #vtipArrow").attr("src","images/vtip_arrow.png");$("p#vtip").css("top",this.top+"px").css("left",this.left+"px").fadeIn("slow")},function(){this.title=this.t;$("p#vtip").fadeOut("slow").remove()}).mousemove(function(a){this.top=(a.pageY+yOffset);this.left=(a.pageX+xOffset);$("p#vtip").css("top",this.top+"px").css("left",this.left+"px")})};jQuery(document).ready(function(a){vtip()}); 



