var index = 0; function getCurrentIndex(iTarget,className){ $(iTarget).each(function(i){ if($(this).attr("class") == className){ index = i; } }); return index; } function getCurrentShowIndex(object,AttrName,AttrValue){ object.each(function(i){ if($(this).attr(AttrName) == AttrValue){ index = i; } }); return index; } function Play(i,iTarget,className,textTarget,actile){ $(iTarget).eq(i) .fadeIn() .addClass(className) .siblings() .fadeOut() .removeClass(className); $(textTarget).text(actile.eq(i).text()); } function Play2(i,iTarget,className,textTarget,actile,btnTar,btnClassName){ $(iTarget).eq(i) .fadeIn() .addClass(className) .siblings() .hide() .removeClass(className); $(btnTar).eq(i) .removeClass(btnClassName) .addClass(btnClassName) .siblings() .removeClass(btnClassName); $(textTarget).text(actile.eq(i).text()); } function showImg(obj,bigShow,tarShow,tarImg,tarContent,imgProportion){ var imgSrc = $(obj).find("img").attr("src"); var imgWid = $(obj).find("img").attr("width"); var imgHei = $(obj).find("img").attr("height"); var summer = $(obj).find(".summers").text(); summer = summer.split("$"); $(bigShow).css({ "width":$(document).width(), "height":$(document).height() },0).animate({ "opacity":0.3 },0).show(); $(tarShow).animate({ "width":imgWid * 3.2 + "px", "height":imgHei * 2 + 20 + "px" }).fadeIn(100); $(tarImg).attr({ "src":imgSrc, "width":imgWid * imgProportion + "px", "height":imgHei * imgProportion + "px" }).css({ "margin":"10px" }); $(".right_content").css({ "width":$(tarContent).css("width") - $(tarImg).css("width") + "px" }); $(tarContent).empty(); $(obj).find("a").clone(true).appendTo(tarContent); for(var index = 0;index < summer.length; index ++){ $(tarContent).append("

" + summer[index] + "

"); } } function showImg_2(obj,bigShow,tarShow,tarImg,imgProportion){ var imgSrc = $(obj).find("img").attr("src"); var imgWid = $(obj).find("img").attr("width"); var imgHei = $(obj).find("img").attr("height"); $(bigShow).css({ "width":$(document).width(), "height":$(document).height() },0).animate({ "opacity":0.3 },0).show(); $(tarShow).animate({ "width":imgWid * 2 + 20 + "px", "height":imgHei * 2 + 50 + "px" }).fadeIn(100); $(tarImg).attr({ "src":imgSrc, "width":imgWid * imgProportion + "px", "height":imgHei * imgProportion + "px" }).css({ "margin":"10px" }); $(tarShow).find(".titles_r").remove(); $(obj).find("a").clone(true).appendTo(tarShow); }