$(document).ready(function(){
$('#viewport').carousel('#simplePrevious', '#simpleNext');

$('.partners li img').animate({'opacity' : 0.6}).hover(function() {
	$(this).animate({'opacity' : 1});
}, function() {
	$(this).animate({'opacity' : 0.6});
});
	
	
	//rollover hover
$("#viewport li").hover(function() { //On hover...

		var thumbOver = $(this).find("img").attr("src"); //Get image url and assign it to 'thumbOver'
		
		$(this).find("a").css({'background' : 'url(' + thumbOver + ') no-repeat center bottom'});
		$(this).find("em").stop().animate({bottom:"-1"}, "fast")
		//Animate the image to 0 opacity (fade it out)
		$(this).find("span").stop().fadeTo('normal', 0 , function() {
		$(this).hide() //Hide the image after fade
		});
		}, function() { //on hover out...
		//Fade the image to full opacity 
		$(this).find("span").stop().fadeTo('normal', 1).show();
		$(this).find("em").stop().animate({bottom:"-86"}, "fast")
	});

$(".list1 li").hover(function() { //On hover...

		var thumbOver = $(this).find("img").attr("src"); //Get image url and assign it to 'thumbOver'
		
		$(this).find("a").css({'background' : 'url(' + thumbOver + ') no-repeat center bottom'});
		$(this).find("span").stop().fadeTo('normal', 0 , function() {
		$(this).hide() //Hide the image after fade
		});
		}, function() { //on hover out...
		//Fade the image to full opacity 
		$(this).find("span").stop().fadeTo('normal', 1).show();
	});
	 
$('.scroll-pane').jScrollPane({showArrows:false, scrollbarWidth:11, dragMaxHeight:63});

$(".list1 a[rel^='prettyPhoto']").prettyPhoto({animation_speed:'normal',slideshow:3000,theme:'dark_rounded',default_width:800,default_height:600});
});

var name = 'l.medynski';
var name2 = 'u.medynska'; 
var name3 = 'kontakt';
var address = 'projekty-wnetrz.com';
;
var malpa ='@';
function protectmail() {
document.write('<a href=mailto:' + name + '@projekty-wnetrz.com>'+ name + malpa + address +'</a>'); 
}
function protectmailu() {
document.write('<a href=mailto:' + name2 + '@@projekty-wnetrz.com>'+ name2 + malpa + address +'</a>'); 
}
function protectmaili() {
document.write('<a href=mailto:' + name3 + '@@projekty-wnetrz.com>'+ name3 + malpa + address +'</a>'); 
}
