// JavaScript Document
$(document).ready(function() {
	
	$('a[rel*=facebox]').facebox({
        loadingImage : 'assets/scripts/facebox/loading.gif',
        closeImage   : 'assets/scripts/facebox/closelabel.gif'
    });
	
	$('a[name*=facebox]').facebox({
        loadingImage : 'assets/scripts/facebox/loading.gif',
        closeImage   : 'assets/scripts/facebox/closelabel.gif'
    });

	  
	/*$("a img").hover(function() {
		$(this).fadeTo(200, 0.4);
	},function () {
		$(this).fadeTo(400, 1);
	});*/
	
	$("#top2").orbit({
		animation: 'fade',
		//animationSpeed: 1200,                  
     	timer: false, 			 // true or false to have the timer
     	pauseOnHover: true,
		startClockOnMouseOut: false, 		 // if you hover pauses the slider
     	directionalNav: false, 		 // manual advancing directional navs
     	captions: false, 			 // do you want captions?
     	bullets: true,			 // true or false to activate the bullet navigation
	});
	
	$(".tipsyimg").tipsy({
		gravity: $.fn.tipsy.autoNS,
		title: 'alt',
		opacity: 0.1,
		offset: 0.3	
	});
	
	$(".blockbuster img").tipsy({
		gravity: 'n',
		title: 'alt',
		opacity: 0.1,
		offset: 0.3	
	});
	
	$("#vertical-menu ul li a").click(function() {
		$("#vertical-menu ul li ul").hide(100);
		if ($(this).next("ul").is(":visible") == true) {
			$(this).next("ul").slideUp(200);
		} else {
			$(this).next("ul").slideDown(200);
		};
	});
	
	$("#vertical-menu ul li ul.currentul").show(0);
	
	/*$(".commenta").click(function() {
		if ($(this).next("div").is(":visible") == true) {
			$(this).next("div").slideUp(300);
		} else {
			$(this).next("div").slideDown(300);
		};
	});*/
	
	
	$('#QapTcha').QapTcha();
});

