$(document).ready(function(){

$("a.add_soc").fancybox({
	'titleShow' : false,
	'autoDimensions' : false,
	'width' :	600,
	'height' :	400,
	'href' : "#add_soc1"
	});
	
//jCarouselLite

$(function() {
    var start_value = 2;
	if (document.getElementById('slstart')) start_value = document.getElementById('slstart').value;
	
	$("div#m_slider_div").jCarouselLite({
        btnNext: "#p_match",
        btnPrev: "#n_match",
		visible: 2,
		circular: false,
		vertical: true,
		start: start_value
    });
});
$(function() {
    $("div#n_slider_div").jCarouselLite({
        btnNext: "#p_news",
        btnPrev: "#n_news",
		visible: 3,
		circular: false,
		vertical: true
    });
});


//Top slider
	//$("#featured > ul").tabs({fx:{opacity: "toggle"}}).tabs("rotate", 9000, true);
	$("#featured > ul").tabs({fx:{opacity: "toggle"}});
/*	$("#featured").hover(  
	 function() {  
	 $("#featured").tabs("rotate",0,true);  
	 },  
	 function() {  
	 $("#featured").tabs("rotate",9000,true);  
	 }  
	 );  */

//Fancy	
	$("a.fancybox").fancybox({
	'titlePosition'	: 'over'
	});
	
//Left Menu		
	$("div.sub_left_menu").hide();
	$("a.active").next('div').show();
	t=1000;
	var t;
	$('div.left_menu a.top_l').mouseover(function(){
		t=clearTimeout(t);
		if (!$(this).next('div:visible').get(0)) {
			$curDiv = $(this).next('div');
			$curA = $(this);
			t=setTimeout(function(){
			//$('ul.sub_left_menu').next('div').hide(500);
			$curA.siblings('a').removeClass("active");
			$curA.addClass("active");
			$curDiv.siblings('div:visible').slideUp(500);
			$curDiv.slideDown(500);
		},300);
		}
	});
	
	
	$('div.left_menu a').mouseout(function(){
		t=clearTimeout(t);
	}); 

	
//Nifty
window.onload=function(){
	Nifty("a.green_button","big transparent");
}
});

//NUVO slider
$(window).load(function() {
    $('#page_pic_slider').nivoSlider({
        effect:'fade', //Specify sets like: 'fold,fade,sliceDown, random'
       // slices:15,
        animSpeed:500, //Slide transition speed
        pauseTime:5000
    /*    //startSlide:0, //Set starting Slide (0 index)
        directionNav:true, //Next & Prev
        directionNavHide:true, //Only show on hover
        controlNav:true, //1,2,3...
        controlNavThumbs:false, //Use thumbnails for Control Nav
        controlNavThumbsFromRel:false, //Use image rel for thumbs
      //  controlNavThumbsSearch: '.jpg', //Replace this with...
       // controlNavThumbsReplace: '_thumb.jpg', //...this in thumb Image src
        keyboardNav:true, //Use left & right arrows
        pauseOnHover:true, //Stop animation while hovering
        manualAdvance:false //Force manual transitions*/
    });
});

