$(window).load(function() {
    $('#slider').nivoSlider({
        effect:'fade,boxRain', // Specify sets like: 'fold,fade,sliceDown'
        animSpeed:500, // Slide transition speed
        keyboardNav:true // Use left & right arrows
    });
});

$(document).ready(function() {
	$(".tab_content").hide();
	$(".tablink:first").addClass("active").fadeIn();
	$(".tab_content:first").slideDown();
	
	//OnClick Event
	$(".tablink").click(function() {
		$(".tablink").removeClass("active");
		$(this).addClass("active");
		$(".tab_content").hide();
		var activeTab = $(this).find("a").attr("href");
		$(activeTab).fadeIn();
		return false;
	});
	
	$("a[rel=all_pictures]").fancybox({
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'titlePosition' 	: 'over',
				'titleFormat'       : function(title, currentArray, currentIndex, currentOpts) {
					return '<span id="fancybox-title-over"><div style="float:left;">' + title + '</div> <div style="float:right;">Image ' +  (currentIndex + 1) + ' / ' + currentArray.length + '</div><div style="clear:both;"></div></span>';
				}
			});
	
	$(".video").click(function() {
		$.fancybox({
				'padding'		: 0,
				'autoScale'		: false,
				'transitionIn'	: 'none',
				'transitionOut'	: 'none',
				'title'			: this.title,
				'width'			: 680,
				'height'		: 495,
				'href'			: this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'),
				'type'			: 'swf',
				'swf'			: {
				'wmode'		: 'transparent',
				'allowfullscreen'	: 'true'
			}
		});

		return false;
	});
	
	$("a[rel=interested]").fancybox({
				'width'				: '50%',
				'height'			: '50%',
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'type'				: 'iframe'
			});
});

ddsmoothmenu.init({
	mainmenuid: "menu", //Menu DIV id
	orientation: 'v', //Horizontal or vertical menu: Set to "h" or "v"
	classname: 'ddsmoothmenu-v' //class added to menu's outer DIV
});
