/* menu */
$(function() {
		// set opacity to nill on page load
		$("ul#menu span").css("opacity","0");
		$("ul#menu .active span").css("opacity","3");
		// on mouse over
		$("ul#menu span").hover(function () {
			// animate opacity to full
			$(this).stop().animate({
				opacity: 15
			}, 'slow');
		},
		// on mouse out
		function () {			
			if ($(this).parent().hasClass("active")){
				//pass;
			}
			else{
				$(this).stop().animate({
					opacity: 0
				}, 'slow');	
			}
		});		
});
/* /menu */

/* nospam */
function nospamf(box, domain) {
 if(typeof(domain)=="undefined") domain="50rocks.cz";
 var proto=String.fromCharCode(109,97,105,108,116,111,58)
 w=window.open(proto+box+String.fromCharCode(64)+domain);
 if (w!=null) w.close(); //FF
}
function nospam(box, domain, attr) {
 if(typeof(domain)=="undefined") domain="50rocks.cz";
 if(typeof(attr)=="undefined") attr="";
 document.write("<a href=\"javascript:nospamf('"+box+"', '"+domain+"')\""+(attr.length>0?" ":"")+attr+">"+box+String.fromCharCode(64)+domain+"</a>");
}
function zavinac() {
 document.write(String.fromCharCode(64));
}
/* /nospam */

/* tweet */
$(document).ready(function() {
        $(".tweet").tweet({
        username: "50Rocksteam",
        list: "team",
        //username: ["50RocksFamily", "LiborPodmol", "FrantisekMaca", "petrvesa", "Neugec"],
        //join_text: "auto",
        avatar_size: 30,
        count: 30,
        //refresh_interval: 10,
        loading_text: "loading tweets..."
    }).ajaxStop(function() {
		$('.tweet').vTicker();
	});
});
/* /tweet */

/* lightbox */
$(document).ready(function() {
	//$('p.p-fotografie a').lightBox();
	//$('div.gallery a').lightBox();
	//$('div.detail-pojem a').lightBox();
	$("a[href$='.jpg']").lightBox();
	$("a[href$='.JPG']").lightBox();
	$("a[href$='.gif']").lightBox();
	$("a[href$='.GIF']").lightBox();
	$("a[href$='.png']").lightBox();
	$("a[href$='.PNG']").lightBox();
	$("a[href$='.jpeg']").lightBox();
	$("a[href$='.JPEG']").lightBox();
	// $('a[rel*=lightbox]').lightBox();
	// $('a').lightBox();
});
/* /lightbox */

/* nivo slider */
$(window).load(function() {
    $('#slider-in').nivoSlider({
	effect: 'boxRandom',
	slices: 15,
	boxCols: 8,
	boxRows: 8,
	animSpeed: 500,
	pauseTime: 5000,
	startSlide: 0,
    directionNav: false, // Next & Prev navigation
	directionNavHide: false, // Only show on hover
	controlNav: false,
    keyboardNav: true, // Use left & right arrows
	pauseOnHover: false,
	});
});
/* /nivo slider */
