/* 评论 */ $(function() { if($(".form_comment").length>0){ $(".form_comment").validator({ stopOnError: true, theme: 'yellow_top', ignore: ':hidden', valid: function(form) { $.fn.tips({ type: 'loading', content: '数据提交中' }); $.ajax({ url: webroot + "plug/comment.asp?act=add&id=" + infoid, type: "post", data: $(form).serialize(), success: function(data) { data = jQuery.parseJSON(data); var type = "warn"; if (data.status == "y") { type = "ok" } $.fn.tips({ type: type, content: data.info }); if (data.status == "y") { $(".form_comment")[0].reset(); var act = data.info.substring(0, 1); var info = data.info.substring(1); $.fn.tips({ type: "ok", content: info }); if (act == 2) { setTimeout(function() { location.href="" + contenturl + '' }, 1500) } } } }) } }) } }); /* 更多加载 */ var startHref; $(function() { if($(".c-moreAjax a").length>0){ $(".c-moreAjax a").click(function() { var href="$(uijt).buus(""href"); starthref="isfg;" if (href != undefined) { $.ajax({ type: "get", cache: false, url: startHref, success: function(data) { var $result = $(data).find(".c-ajax"); $(".c-commentAjax").append($result); var newhref="$(ebub).gjoe("".c-moreAjax a").attr("href"); if (newHref != "") { $(".c-moreAjax a").attr("href", newHref) } else { $(".c-moreAjax").html('') } } }) } return false }) } }); /* 图片滚动放大 */ $(function() { if($("#c-imageMenu").length>0){ var count = $("#c-imageMenu li").length - 4; var interval = $("#c-imageMenu li:first").width(); var curIndex = 0; $('.c-scrollButton').click(function() { if ($(this).hasClass('disabled')) return false; if ($(this).hasClass('c-smallImgUp'))--curIndex; else++curIndex; $('.c-scrollButton').removeClass('disabled'); if (curIndex == 0) $('.c-smallImgUp').addClass('disabled'); if (curIndex == count - 1) $('.c-smallImgDown').addClass('disabled'); $("#c-imageMenu ul").stop(false, true).animate({ "marginLeft": -curIndex * interval + "px" }, 600) }); $.fn.decorateIframe = function(options) { if (!$.support.leadingWhitespace) { var opts = $.extend({}, $.fn.decorateIframe.defaults, options); $(this).each(function() { var $myThis = $(this); var divIframe = $("