$(document).ready(function() {
	/*
	*   Examples - various
	*/

	$("a[rel=lbx]").fancybox({
		'titlePosition'		: 'inside',
		'transitionIn'		: 'none',
		'transitionOut'		: 'none'
	});


	$("#various1").fancybox({
		'titlePosition'		: 'inside',
		'transitionIn'		: 'none',
		'transitionOut'		: 'none'
	});

	$("#various2").fancybox();

	$("#various3").fancybox({
		'width'				: '75%',
		'height'			: '75%',
		'autoScale'			: false,
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'type'				: 'iframe'
	});

	$("#various4").fancybox({
		'padding'			: 0,
		'autoScale'			: false,
		'transitionIn'		: 'none',
		'transitionOut'		: 'none'
	});
});

	
function menuShow(id)
{
	$('#'+id).show();
}

function menuHide(id)
{
	$('#'+id).hide();
}

function textReplace()
{
        Cufon.replace('#navigationMenu li.navigationMenuTop a.navigationMenuLink', {hover: true});
        //Cufon.replace('.sub a', {hover: true});

        Cufon.replace('h1');
        Cufon.replace('h2');
        Cufon.replace('h3');


        Cufon.replace('.ContentContainer h1', {textShadow: '1px 1px #e0e0e0'});
        Cufon.replace('.ContentContainer h2', {textShadow: '1px 1px #e0e0e0'});
        Cufon.replace('.ContentContainer h3', {textShadow: '1px 1px #e0e0e0'});
        Cufon.replace('.ContentContainer h4', {textShadow: '1px 1px #e0e0e0'});
        Cufon.replace('.ContentContainer h5', {textShadow: '1px 1px #e0e0e0'});
        Cufon.replace('.ContentContainer h6');
        
        Cufon.replace('.LeftContainer h1', {textShadow: '1px 1px #e0e0e0'});
        Cufon.replace('.LeftContainer h2', {textShadow: '1px 1px #e0e0e0'});
        Cufon.replace('.LeftContainer h3', {textShadow: '1px 1px #e0e0e0'});
        Cufon.replace('.LeftContainer h4', {textShadow: '1px 1px #e0e0e0'});
        Cufon.replace('.LeftContainer h5', {textShadow: '1px 1px #e0e0e0'});
        
        //Cufon.replace('h4');
        //Cufon.replace('h4 span', {color: 'black'});
        //Cufon.replace('h4 span', {color: '-linear-gradient(red, 0.2=#fff, 0.8=#23d559, rgb(0, 0, 0))'});


        //Cufon.replace('h5', {hover: true, textShadow: '1px 1px white'});
        //Cufon.replace('h6', {hover: true, textShadow: '1px 1px white'});
        //Cufon.replace('ul.menu .menulink', {textShadow: '1px 1px white'});
        //Cufon.replace('.bar h3');
        //Cufon.replace('.pagination ul li a', {hover: true, textShadow: '1px 1px white'});
}

<!--  Do not remove the lines below - otherwise the hover on menu will not work -->

jQuery(function() {
window.setInterval(
function() {Cufon.refresh('#navigationMenu li.navigationMenuTop a.navigationMenuLink');},
50
	);
});


function textTooltips()
{

	//Select all anchor tag with rel set to tooltip
	$('a[rel=tooltip]').mouseover(function(e) {
		
		//Grab the title attribute's value and assign it to a variable
		var tip = $(this).attr('title');	
		
		//Remove the title attribute's to avoid the native tooltip from the browser
		$(this).attr('title','');
		
		//Append the tooltip template and its value
		$(this).append('<div id="tooltip"><div class="tipHeader"></div><div class="tipBody">' + tip + '</div><div class="tipFooter"></div></div>');		
				
		//Show the tooltip with faceIn effect
		$('#tooltip').fadeIn('500');
		$('#tooltip').fadeTo('10',0.9);
		
	}).mousemove(function(e) {
	
		//Keep changing the X and Y axis for the tooltip, thus, the tooltip move along with the mouse
		$('#tooltip').css('top', e.pageY + 10 );
		$('#tooltip').css('left', e.pageX + 20 );
		
	}).mouseout(function() {
	
		//Put back the title attribute's value
		$(this).attr('title',$('.tipBody').html());
	
		//Remove the appended tooltip template
		$(this).children('div#tooltip').remove();
		
	});
	
}


function makeFancybox()
{
	$("a[rel=lbx]").fancybox({
		'titleShow'		: false
		//'titlePosition'	: 'over'
	});
}
/*
function scrollPane(id)
{
        if(!id)
         id = '#pane1';
         
	$(id).jScrollPane({showArrows:true, scrollbarWidth: 15, arrowSize: 16});
}

function loadProdukt(this)
{

				$('.Produkty li a').blur();
				text = $(this).find("a").attr('href');
				//text = $(this).attr('href');
				text = text.replace('index.php?ToDo=', '');

				$('.Produkty li').removeClass('sel');
				$(this).parent().addClass('sel');
				$('#ProduktKarta').fadeTo(100, 0.5);
				//$('#ProduktKarta').fadeOut(10);
				$('.LoadingProduct').show();

				$('#ProduktKarta').load('remote.php?section=' + text, function() {

					//Load was performed
					textReplace();
					textTooltips();
					makeFancybox();

					$('.LoadingProduct').hide();

					$('#ProduktKarta').fadeTo(100, 1);

					//$('#ProduktKarta').fadeIn(10);
				});

}
*/

