$( function() {
	$( '.category' ).click( function() {
		$( this ).toggleClass( 'active' )
		$( this ).siblings( '.dropdown' ).toggle();
		$( this ).find( '.indicator' ).toggleClass( 'indicator-active' );
		return false;
	} );
			
	$( '#dock > li' ).hover( function() {
		$( '.latest' ).fadeOut( 'fast' );
		$( this ).addClass( 'dock-active' );
		$( this ).children( 'span' ).fadeIn( 200 );
	}).bind( "mouseleave", function() {		
		$( this ).removeClass( 'dock-active' );	
		$( this ).children( 'span' ).fadeOut( 200 );
	} );
			
	$( '#dock' ).bind( "mouseleave", function() {
		$( '.latest' ).fadeIn( 1000 );
	} );
} );


function goINT(b,f,e)
{
	b=b.replace(/^#/,"");
	var a=self.location;
	var c=a.hostname;
	var d=a.protocol;		
					   
if(b&&b!="/")
	{
		//b=(b.match(/\.html$/)?b:(b.match(/\/$/)?b:b+".html")) //dopisanie koncowki .html bez wzgledu na adres
	}
	else
	{
		b="/"
	}
		if(f)
		{
			c=(f=="p"?"profil":(f=="w"?"www":f))+a.hostname.replace(/^[^\.]+/,""); // subdomena
			
			if(f!="p")
			{
				d="http:"
				}
		}
		
		if(e){
			d="http"+(e=="s"?"s:":":") // protokol
			}
			
			 a.href=d+"//"+c+(b?b:"/") //

}

function goEXT(b,f,e)
{
	
	var a=self.location;
	var c=a.hostname;
	var d=a.protocol;	
	b=b.replace(/^#/,"");
	//var a=self.location;
	 a.href=b;//
	
	
}

