jQuery.noConflict(); 





jQuery(document).ready(function(){
	/* The code here is executed on page load */
	
	/* Replacing all the paragraphs */
	jQuery('.contact div').replaceWith(function(){
	jQuery('.cf').css("display","block");
		/* The style, class and title attributes of the p are copied to the slideout: */
		
		return '\
		<div class="slideOutTip '+jQuery(this).attr('class')+'" style="'+jQuery(this).attr('style')+'">\
			\
			<div class="tipVisible">\
				<div class="tipIcon"><div class="plusIcon"></div></div>\
				</div>\
			\
			<div class="slideOutContent">\
				<p>'+jQuery(this).html()+'</p>\
			</div>\
		</div>';
	});

	jQuery('.slideOutTip').each(function(){

		/*
			Implicitly defining the width of the slideouts according to the width of its title,
			because IE fails to calculate it on its own.
		*/
		
		jQuery(this).width(30);
	});
	
	/* Listening for the click event: */
	
	jQuery('.tipVisible').bind('click',function(){
		var tip = jQuery(this).parent();
		
		/* If a open/close animation is in progress, exit the function */
		if(tip.is(':animated'))
			return false;

		if(tip.find('.slideOutContent').css('display') == 'none')
		{
			tip.trigger('slideOut');
		}
		else tip.trigger('slideIn');

	});
	
	jQuery('.slideOutTip').bind('slideOut',function(){

		var tip = jQuery(this);
		var slideOut = tip.find('.slideOutContent');
		
		/* Closing all currently open slideouts: */
		jQuery('.slideOutTip.isOpened').trigger('slideIn');
		
		/* Executed only the first time the slideout is clicked: */
		if(!tip.data('dataIsSet'))
		{
			tip	.data('origWidth',tip.width())
				.data('origHeight',tip.height())
				.data('dataIsSet',true);
			
			if(tip.hasClass('openTop'))
			{
				/*
					If this slideout opens to the top, instead of the bottom,
					calculate the distance to the bottom and fix the slideout to it.
				*/
				
				tip.css({
					bottom	: tip.parent().height()-(tip.position().top+tip.outerHeight()),
					top		: 'auto'
				});
				
				/* Fixing the title to the bottom of the slideout, so it is not slid to the top on open: */
				tip.find('.tipVisible').css({position:'absolute',bottom:3});
				
				/* Moving the content above the title, so it can slide open to the top: */
				tip.find('.slideOutContent').remove().prependTo(tip);
			}
			
			if(tip.hasClass('openLeft'))
			{
				/*
					If this slideout opens to the left, instead of right, fix it to the
					right so the left edge can expand without moving the entire div:
				*/
				tip.css({
					right	: Math.abs(tip.parent().outerWidth()-(tip.position().left+tip.outerWidth())),
					left	: 'auto'
				});
				
				tip.find('.tipVisible').css({position:'absolute',right:3});
			}
		}
		
		/* Resize the slideout to fit the content, which is then faded into view: */
		
		tip.addClass('isOpened').animate({
			width	: Math.max(slideOut.outerWidth()+ 32,tip.data('origWidth')) ,
			height	: slideOut.outerHeight()+tip.data('origHeight')-192
		},function(){
			slideOut.fadeIn();
		});

	}).bind('slideIn',function(){
		var tip = jQuery(this);

		/* Hide the content and restore the original size of the slideout: */
		
		tip.find('.slideOutContent').fadeOut('fast',function(){
			tip.animate({
				width	: tip.data('origWidth'),
				height	: tip.data('origHeight')
			},function(){
				tip.removeClass('isOpened');
			});
		});

	});
});










jQuery(document).ready(function(){
  jQuery("#slides").slides({
				play: 10000,
				preload: true,
				generatePagination: false,
				generateNextPrev: true
			});

});

jQuery(document).ready(function(){	
		//cache nav
		var nav = jQuery("div.menu-main-menu-container");
		jQuery("ul.level-0").parents('li').addClass('parent-li').append("<span/>"); 

		jQuery("li.parent-li").hover(
		function(){
			jQuery(this).find("span").addClass("subhover");		
		},
		function(){ 
			jQuery(this).find("span").removeClass("subhover");
		}
); 
		
		//add indicators and hovers to submenu parents
		nav.find("li").each(function() {
			if (jQuery(this).find("ul.level-0").length > 0) {

				//show subnav on hover
				jQuery(this).mouseenter(function() {
					jQuery(this).find("ul.level-0").stop(true, true).slideDown('fast');
				});

				//hide submenus on exit
				jQuery(this).mouseleave(function() {
					jQuery(this).find("ul.level-0").stop(true, true).slideUp();
				});
			}
		});
		
});
 
 
jQuery(document).ready(function(){
    jQuery("a[rel^='prettyPhoto']").prettyPhoto();
}); 
 
jQuery(function() {
	jQuery('.scroll-pane').jScrollPane();
});

jQuery(document).ready(function(){
		jQuery('#myGallery').galleryView({
		panel_width: 440,
        panel_height: 482,
        frame_width: 50,
        frame_height: 50,
        frame_opacity: 0.2,
        frame_gap: 10,
        transition_interval: 6000,
        transition_speed: 1000,
        overlay_opacity: 1,
        filmstrip_position: 'right',
        filmstrip_style: 'show all',
        show_filmstrip_nav: false,
        pointer_size: 0,
        show_panel_nav: false,
        show_captions: false,
        show_overlays: false

		});
	});
	
	
	

		var flashvars = {};
		var params = {};

		params.wmode = "transparent";

		var attributes = {};
		attributes.id = "ribbon";
		swfobject.embedSWF("http://ventana.pl/wp-content/uploads/2011/04/ribon.swf", "myAlternativeContent", "170", "170", "10.0.0", false, flashvars, params, attributes);
		
		
	
function PopupCenter(pageURL, title, w, h) {
var left = (screen.width/2)-(w/2);
var top = (screen.height/2)-(h/2);
window.open(''+pageURL+'', 'belee', 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left+'');

//	var targetWin = window.open(pageURL, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left);
}




function closeFlash(){
jQuery('#splash').css("display","none");
jQuery('.fl-box').css("display","block");
jQuery('body').css("overflow","visible");
}

function bgColor(){
jQuery('#splash').css("backgroundColor","transparent");
}



















