jQuery().ready(function(){jQuery("#show_images_table a").lightBox({fixedNavigation:true});try{var d=getCookie("viewedShopsID");var g=getCookie("viewedShopsPP");if(typeof d=="undefined"||d==""){d=[],g=[]}else{d=d.split(",");g=g.split(",")}var a=false;if(d.length){for(var c=0;c<d.length;c++){if(d[c]==shopsParams[0]){a=true;g[c]=shopsParams[1];break}}}if(!a){d.unshift(shopsParams[0]);g.unshift(shopsParams[1]);if(d.length>8){d.length=8;g.length=8}}addCookie("viewedShopsID",d.join(","),720);addCookie("viewedShopsPP",g.join(","),720);var j=new StringBuilder();var b=new StringBuilder();for(var c=0;c<d.length;c++){j.append('<a href="'+jQueryconfig.domain+"shop/show/"+d[c]+'">  ');j.append(g[c]);j.append("</a></li>");if(c<5){b.append('<a href="'+jQueryconfig.domain+"shop/show/"+d[c]+'" class="lks00">');b.append(g[c]);b.append("</a> ")}}jQuery("#viewed_shops_ul").html(j.toString());jQuery("#new_viewed_pinpai").html(b.toString())}catch(h){jQuery("#viewed_shops_div").hide()}var f=jQuery("#pro_setting1_content").height();if(f>400){jQuery("#pro_setting1_content").height(400)}var f=jQuery("#pro_setting2_content").height();if(f>400){jQuery("#pro_setting2_content").height(400)}jQuery(".close_setting").click(function(){if(!window.confirm("\u60a8\u786e\u5b9a\u8981\u5173\u95ed\u6b64\u677f\u5757\u5417\uff1f \u6ce8\uff1a\u5173\u95ed\u540e\u4efb\u4f55\u4eba\u5c06\u770b\u4e0d\u5230\u6b64\u677f\u5757\u3002")){return false}var i=jQuery(this).attr("lang").split("_");var e=this;jQuery.get(jQueryconfig.domain+"shop/setting",{target:i[1],project:shopsParams[0],flag:0},function(k){if(!k){alert("\u8bbe\u7f6e\u5931\u8d25\u3002")}else{jQuery(e).parent().parent().hide()}})}).each(function(){jQuery(this).attr("href","javascript:void(0)")});jQuery(".ship_main_verflow img").each(function(){var e=jQuery(this).width();if(e>690){jQuery(this).width(690);jQuery(this).height((690/e)*jQuery(this).height());jQuery(this).css({cursor:"pointer"});jQuery(this).click(function(){window.open(jQuery(this).attr("src"))})}});jQuery("#chat_window_control").click(function(){if(jQuery(this).html()=="\uff0d"){jQuery(this).html("\uff0b");jQuery("#chat_button").css({height:"30px",overflow:"hidden"})}else{jQuery(this).html("\uff0d");jQuery("#chat_button").css({height:"auto",overflow:"visible"})}});jQuery("#chat_window_close").click(function(){jQuery("#chat_button").hide()})});function ProImgScroll(b){if(typeof ProImgObj=="undefined"){window.ProImgObj=ProImgObj=jQuerye("ProImg");window.icount=icount=31}if(icount){if(ProImgObj.scrollLeft<0){return}ProImgObj.scrollLeft+=20*b;icount--;setTimeout("ProImgScroll("+b+")",6)}else{icount=31}}function editProject(a){Boxy.load(jQueryconfig.domain+"shop/setField/"+shopsParams[0]+"?field="+a,{title:"\u4fee\u6539\u9879\u76ee\u4fe1\u606f",modal:true,afterShow:function(){initEditor("setting_content",{w:600,h:200},"setting_content_div")},afterHide:function(){jQuery("#set_field_form").empty();jQuery("#set_field_form").remove()}})}function checkEditForm(a){if(a.setting_title.value.Trim()==""){return Boxy.alert("\u6807\u9898\u4e0d\u80fd\u4e3a\u7a7a\u3002")}var b=FCKeditorAPI.GetInstance("setting_content");a.setting_content.value=b.GetXHTML(true);if(a.setting_content.value.Trim()==""){return Boxy.alert("\u5185\u5bb9\u4e0d\u80fd\u4e3a\u7a7a\u3002")}jQuery(a).ajaxSubmit({url:jQueryconfig.domain+"shop/setField/"+shopsParams[0]+"?field="+a.field.value,success:function(c){if(c){jQuery("#pro_setting"+a.field.value+"_title").html(a.setting_title.value);jQuery("#pro_setting"+a.field.value+"_content").html(a.setting_content.value);jQuery(".title-bar").find(".close").click();Boxy.alert("\u5df2\u8bbe\u7f6e\u6210\u529f\u3002")}}})}function SetWinHeight(b){var a=b;if(a&&!window.opera){if(jQuery.browser.msie){if(jQuery.browser.version>=8){return a.height=a.contentWindow.document.body.scrollHeight}}if(a.contentDocument&&a.contentDocument.body.offsetHeight){a.height=a.contentDocument.body.offsetHeight}else{if(a.Document&&a.Document.body.scrollHeight){a.height=a.Document.body.scrollHeight}}}}function impeachThis(a){Boxy.load(jQueryconfig.domain+"shop/impeach/"+a,{title:"\u6211\u8981\u6295\u8bc9",modal:true,afterShow:function(){jQuery("#boxy_submit_form").validate(project_add_impeach)},afterHide:function(){jQuery("#boxy_submit_form").empty();jQuery("#boxy_submit_form").remove()}})};
