$(function() {
    $('#bannerbg').cycle({
        fx: 'fade',
        timeout: 0,
        prev: '#prev',
        next: '#next',
        pager: '#pagination',
        speed: 800,
        timeout: 6000,
        cleartype: true,
        slideExpr: '.item',
        pagerAnchorBuilder: pagerFactory
    });

    function pagerFactory(idx, slide) {
        var s = idx > $(".item").length ? ' style="display:none"' : '';
        return '<li' + s + '><a href="#"  class="nav_button"><span>' + (idx + 1) + '</span></a></li>';
    };

    $("#banner .slider_nav ul").css("width", $("#banner .slider_nav li").length * 28);



    /*image galeay*/
    picDemo("newsright", "leftarrow", "rightarrow", "budsiysdf", 4, false, true, true);

    $("#leftarrow").find("img").hover(function() { $(this).attr("src", "images/photogaleft2.gif"); }, function() { $(this).attr("src", "images/photogaleft.gif"); });

    $("#rightarrow").find("img").hover(function() { $(this).attr("src", "images/photogaright2.gif"); }, function() { $(this).attr("src", "images/photogaright.gif"); });

    picDemo2("aboutimg", "aboutimgleft", "aboutimgright", "aboutimgclass", 1, false, true, true);    

    $("#aboutimgleft").find("img").hover(function() { $(this).attr("src", "images/aboutleftimg2.gif"); }, function() { $(this).attr("src", "images/aboutleftimg.gif"); });

    $("#aboutimgright").find("img").hover(function() { $(this).attr("src", "images/aboutrightimg2.gif"); }, function() { $(this).attr("src", "images/aboutrightimg.gif"); });

    /*hometage*/
    $("#hometagemore > a").eq(0).css("display", "block");
    $("#hometage > ul > li").hover(
		function() {
		    $("#hometage > ul > li").attr("class", ""); $(this).attr("class", "defysj");
		    $("#success > span").attr("class", "").css("z-index", "-1"); $("#" + $(this).attr("id") + "2").attr("class", "hometages").css("z-index", "1");
		    $("#hometagemore > a").css("display", "none");
		    $("#" + $(this).attr("id") + "3").css("display", "block");
		}
	);
    $("#photo3").click(function() { $("#newsright > ul > li").eq(0).find("a").click() });

    /*imggbig*/
    //$('#newsright a').lightBox();
    //$("#newsright > ul > li").hover(function() { $(".bigimg").css("z-index", "2"); }, function() { $(".bigimg").css("z-index", "-1") });


    
});

