﻿var global_currentPanoUrl;
$(function(){
    $("#commend").click(function(){
        $("#commendBox").slideToggle("slow");
    });
    
    

    try {
        $(".rightColumn img").each(function(i){
            if (!$(this).parent().is("a")) {
                $(this).wrap("<a href=" + this.src + " rel='imagebox' title='" + this.alt + "'></a>");
            }
        });

                $(".rightColumn a[rel^='image']").lightBox({
							overlayBgColor: '#000',
							overlayOpacity: 0.8,
							imageBlank: '/content/lightbox/images/blank.gif',
							imageLoading: '/content/lightbox/images/loading.gif',
							imageBtnClose: '/content/lightbox/images/close.gif',
							imageBtnPrev: '/content/lightbox/images/prev.gif',
							imageBtnNext: '/content/lightbox/images/next.gif',
							containerResizeSpeed: 350,
							txtImage: ':',
							txtOf: '/'
				});
		
		
		//超链接中有属性rel^=lightbox的图片生成弹出窗口(为了配合tinyMCE，插入链接>高级>网页到目标的关联，故而选择了rel^=lightbox)； 
		$(".rightColumn a[rel^='lightbox']").each(function(){
			this.href="/content/popin/popin_pano.html"+"?"+this.href.replace(/^http:\/\/[^\/]*/i,"");;
		});
		$(".rightColumn a[rel^='lightbox']").click(function(){global_currentPanoUrl=this.href}).popin({width:680,height:580,loaderImg:'/content/images/ajax-loader.gif'});
		
    } 
    catch (e) {
    }
		
		try{banner();}catch(e){}//首页banner
});

//tab
$(function(){
	try{
		$('#tabs').tabs();
		$('#dialog_link, ul#icons li').hover(
			function() { $(this).addClass('ui-state-hover'); $(this).trigger('click')}, 
			function() { $(this).removeClass('ui-state-hover'); }
		);
	}catch(e){}
});
//

//banner
function banner(){
    if (typeof(deconcept) !== 'undefined' && deconcept.SWFObjectUtil.getPlayerVersion().major >= 6) {
        var s = new SWFObject("/content/images/banner.swf", "homeBanner", 900,200, "9.0.28","#fff");
        s.addParam("allowFullScreen", "false");
        s.addParam("wmode", "transparent");
        s.addParam("menu", "false");
        s.useExpressInstall("/content/swfobject/expressinstall.swf");
        s.write("banner");
    }
}
