/**
 * 首页tab切换
 * @param {} thisObj
 * @param {} Num
 */
function nTabs(thisObj,Num){
	if(thisObj.className == "active")return;
	var tabObj = thisObj.parentNode.id;
	var tabList = document.getElementById(tabObj).getElementsByTagName("li");
	for(i=0; i <tabList.length; i++){
		if (i == Num){
		   thisObj.className = "active"; 
		      document.getElementById(tabObj+"_Content"+i).style.display = "block";
		}else{
		   tabList[i].className = "normal"; 
		   document.getElementById(tabObj+"_Content"+i).style.display = "none";
		}
	} 
}

function next_czxg(){
    var current=$("#czxg_currentIndex").val().split('-');
    if(current[2]==$("#czxg_count").val()){
        return;
    }else{
        $("#czxgDiv_"+current[0]).hide();
        $("#czxgDiv_"+(parseInt(current[2])+1)).show();
        var temp=(parseInt(current[0])+1)+"-"+(parseInt(current[1])+1)+"-"+(parseInt(current[2])+1);
        $("#czxg_currentIndex").val(temp);
    }     
}

function pre_czxg(){
   var current=$("#czxg_currentIndex").val().split('-');
    if(current[0]==1){
        return;
    }else{
        $("#czxgDiv_"+current[2]).hide();
        $("#czxgDiv_"+(parseInt(current[0])-1)).show();
        var temp=(parseInt(current[0])-1)+"-"+(parseInt(current[1])-1)+"-"+(parseInt(current[2])-1);
        $("#czxg_currentIndex").val(temp);
    }
}

/**
 * 友情链接的切换效果
 * @type 
 */
$.fn.cycle.defaults = {
    fx:           'fade', // name of transition function 
    timeout:       3500,  // milliseconds between slide transitions (0 to disable auto advance) 
    speed:         1000,  // speed of the transition (any valid fx speed value) 
    next:          null,  // id of element to use as click trigger for next slide 
    prev:          null,  // id of element to use as click trigger for previous slide 
    before:        beforeShown,  // transition callback (scope set to element to be shown) 
    after:         afterShown,  // transition callback (scope set to element that was shown) 
    height:       'auto', // container height 
    sync:          0,     // true if in/out transitions should occur simultaneously 
    fit:           0,     // force slides to fit container 
    pause:         1,     // true to enable "pause on hover" 
    delay:         2000,     // additional delay (in ms) for first transition (hint: can be negative) 
    slideExpr:     'ul',  // expression for selecting slides (if something other than all children is required) 
    // the following opts let you create transitions other than fade 
    cssBefore:     {display: 'block', zIndex: 3},    // properties that define the initial state of the slide before transitioning in 
    cssAfter:      {display: 'none', zIndex: 0},    // properties that defined the state of the slide after transitioning out 
    animIn:        {},    // properties that define how the slide animates in 
    animOut:       {}     // properties that define how the slide animates out 
};

function beforeShown(currSlideElement, nextSlideElement, options, forwardFlag) {
	//var _a = $(currSlideElement).find('a');
	//$(currSlideElement).hide();
	$(nextSlideElement).show();
	//$(currSlideElement).css("z-index", 0);
	//$(nextSlideElement).css("z-index", 5);
}
function afterShown(currSlideElement, nextSlideElement, options, forwardFlag) {
	;
}
$(document).ready(function() {
    $('#outwards_links').cycle();
});
