﻿/*---- Part1: BASIC & JQUERY PLUGINS ----*/

/*重写jQuery.browser，加载完jquery马上用*/
var userAgent = navigator.userAgent.toLowerCase();
jQuery.browser = {
version: (userAgent.match( /.(?:rv|it|ra|ie)[\/: ]([\d.]+)/ ) || [])[1],
safari: /webkit/.test( userAgent ),
opera: /opera/.test( userAgent ),
msie: /msie/.test( userAgent ) && !/opera/.test( userAgent ),
mozilla: /mozilla/.test( userAgent ) && !/(compatible|webkit)/.test( userAgent )
};
   
/*
 * jQuery BBQ: Back Button & Query Library - v1.0.3 - 12/2/2009
 * http://benalman.com/projects/jquery-bbq-plugin/
 * 
 * (c) 2009 "Cowboy" Ben Alman
 * Dual licensed under the MIT and GPL licenses.
 */
(function($,c){var g,m=c.location,i=Array.prototype.slice,F=decodeURIComponent,a=$.param,o,d,r,p=$.bbq=$.bbq||{},q,e,A,b="hashchange",w="querystring",z="fragment",y="elemUrlAttr",h="href",E="src",D=$.browser,n=D.msie&&D.version<8,l="on"+b in c&&!n,s=/^.*\?|#.*$/g,B=/^.*\#/,u={};function t(G){return typeof G==="string"}function x(H){var G=i.call(arguments,1);return function(){return H.apply(this,G.concat(i.call(arguments)))}}function j(G){return G.replace(/^[^#]*#?(.*)$/,"$1")}function k(G){return G.replace(/(?:^[^?#]*\?([^#]*).*$)?.*/,"$1")}function f(H,O,G,I,L){var N,M,K,P,J;if(I!==g){K=G.match(H?/^([^#]*)\#?(.*)$/:/^([^#?]*)\??([^#]*)(#?.*)/);J=K[3]||"";if(L===2&&t(I)){M=I.replace(H?B:s,"")}else{P=d(K[2]);I=t(I)?d[H?z:w](I):I;M=L===2?I:L===1?$.extend({},I,P):$.extend({},P,I);M=a(M)}N=K[1]+(H?"#":M||!K[1]?"?":"")+M+J}else{N=O(G!==g?G:m[h])}return N}a[w]=x(f,0,k);a[z]=o=x(f,1,j);$.deparam=d=function(J,H){var I={},G={"true":!0,"false":!1,"null":null};$.each(J.replace(/\+/g," ").split("&"),function(N,P){var M=P.split("="),Q=F(M[0]),L,R=I,O=0,S=Q.split("]["),K=S.length-1;if(/\[/.test(S[0])&&/\]$/.test(S[K])){S[K]=S[K].replace(/\]$/,"");S=S.shift().split("[").concat(S);K=S.length-1}else{K=0}if(M.length===2){L=F(M[1]);if(H){L=L&&!isNaN(L)?+L:L==="undefined"?g:G[L]!==g?G[L]:L}if(K){for(;O<=K;O++){Q=S[O]===""?R.length:S[O];R=R[Q]=O<K?R[Q]||(S[O+1]&&isNaN(S[O+1])?{}:[]):L}}else{if($.isArray(I[Q])){I[Q].push(L)}else{if(I[Q]!==g){I[Q]=[I[Q],L]}else{I[Q]=L}}}}else{if(Q){I[Q]=H?g:""}}});return I};function v(I,H,G){if(H===g||typeof H==="boolean"){G=H;H=a[I?z:w]()}else{H=t(H)?H.replace(I?B:s,""):H}return d(H,G)}d[w]=x(v,0);d[z]=r=x(v,1);$[y]||($[y]=function(G){return $.extend(u,G)})({a:h,base:h,iframe:E,img:E,input:E,form:"action",link:h,script:E});e=$[y];function C(J,G,I,H){if(!t(I)&&typeof I!=="object"){H=I;I=G;G=g}return this.each(function(){var M=$(this),K=G||e()[(this.nodeName||"").toLowerCase()]||"",L=K&&M.attr(K)||"";M.attr(K,a[J](L,I,H))})}$.fn[w]=x(C,w);$.fn[z]=x(C,z);p.pushState=q=function(J,I){if(t(J)&&/^#/.test(J)&&I===g){I=2}var H=J!==g,G=o(m[h],H?J:{},H?I:2);m[h]=G+(/#/.test(G)?"":"#")};p.getState=function(H,G){return H===g||typeof H==="boolean"?r(H):r(G)[H]};p.pollDelay=100;$.event.special[b]={setup:function(){if(l){return false}A.start()},teardown:function(){if(l){return false}A.stop()},add:function(G,I,H){return function(K){var J=K[z]=o();K.getState=function(M,L){return M===g||typeof M==="boolean"?d(J,M):d(J,L)[M]};G.apply(this,arguments)}}};A=(function(){var H={},L,G,I,K;function J(){I=K=function(M){return M};if(n){G=$('<iframe src="javascript:0"/>').hide().appendTo("body")[0].contentWindow;K=function(){return j(G.document.location[h])};I=function(O,M){if(O!==M){var N=G.document;N.open().close();N.location.hash="#"+O}};I(o())}}H.start=function(){if(L){return}var N=o();I||J();(function M(){var P=o(),O=K(N);if(P!==N){I(N=P,O);$(c).trigger(b)}else{if(O!==N){q("#"+O)}}L=setTimeout(M,p.pollDelay)})()};H.stop=function(){if(!G){L&&clearTimeout(L);L=0}};return H})()})(jQuery,this);

/*
 * tools.tooltip 1.1.3 - Tooltips done right.
 * 
 * (c) 2009 Tero Piirainen
 * http://flowplayer.org/tools/tooltip.html
 *
 * Dual licensed under MIT and GPL 2+ licenses
 *
 */
(function(c){var d=[];c.tools=c.tools||{};c.tools.tooltip={version:"1.1.3",conf:{effect:"toggle",fadeOutSpeed:"fast",tip:null,predelay:0,delay:30,opacity:1,lazy:undefined,position:["top","center"],offset:[0,0],cancelDefault:true,relative:false,oneInstance:true,events:{def:"mouseover,mouseout",input:"focus,blur",widget:"focus mouseover,blur mouseout",tooltip:"mouseover,mouseout"},api:false},addEffect:function(e,g,f){b[e]=[g,f]}};var b={toggle:[function(e){var f=this.getConf(),g=this.getTip(),h=f.opacity;if(h<1){g.css({opacity:h})}g.show();e.call()},function(e){this.getTip().hide();e.call()}],fade:[function(e){this.getTip().fadeIn(this.getConf().fadeInSpeed,e)},function(e){this.getTip().fadeOut(this.getConf().fadeOutSpeed,e)}]};function a(f,g){var p=this,k=c(this);f.data("tooltip",p);var l=f.next();if(g.tip){l=c(g.tip);if(l.length>1){l=f.nextAll(g.tip).eq(0);if(!l.length){l=f.parent().nextAll(g.tip).eq(0)}}}function o(u){var t=g.relative?f.position().top:f.offset().top,s=g.relative?f.position().left:f.offset().left,v=g.position[0];t-=l.outerHeight()-g.offset[0];s+=f.outerWidth()+g.offset[1];var q=l.outerHeight()+f.outerHeight();if(v=="center"){t+=q/2}if(v=="bottom"){t+=q}v=g.position[1];var r=l.outerWidth()+f.outerWidth();if(v=="center"){s-=r/2}if(v=="left"){s-=r}return{top:t,left:s}}var i=f.is(":input"),e=i&&f.is(":checkbox, :radio, select, :button"),h=f.attr("type"),n=g.events[h]||g.events[i?(e?"widget":"input"):"def"];n=n.split(/,\s*/);if(n.length!=2){throw"Tooltip: bad events configuration for "+h}f.bind(n[0],function(r){if(g.oneInstance){c.each(d,function(){this.hide()})}var q=l.data("trigger");if(q&&q[0]!=this){l.hide().stop(true,true)}r.target=this;p.show(r);n=g.events.tooltip.split(/,\s*/);l.bind(n[0],function(){p.show(r)});if(n[1]){l.bind(n[1],function(){p.hide(r)})}});f.bind(n[1],function(q){p.hide(q)});if(!c.browser.msie&&!i&&!g.predelay){f.mousemove(function(){if(!p.isShown()){f.triggerHandler("mouseover")}})}if(g.opacity<1){l.css("opacity",g.opacity)}var m=0,j=f.attr("title");if(j&&g.cancelDefault){f.removeAttr("title");f.data("title",j)}c.extend(p,{show:function(r){if(r){f=c(r.target)}clearTimeout(l.data("timer"));if(l.is(":animated")||l.is(":visible")){return p}function q(){l.data("trigger",f);var t=o(r);if(g.tip&&j){l.html(f.data("title"))}r=r||c.Event();r.type="onBeforeShow";k.trigger(r,[t]);if(r.isDefaultPrevented()){return p}t=o(r);l.css({position:"absolute",top:t.top,left:t.left});var s=b[g.effect];if(!s){throw'Nonexistent effect "'+g.effect+'"'}s[0].call(p,function(){r.type="onShow";k.trigger(r)})}if(g.predelay){clearTimeout(m);m=setTimeout(q,g.predelay)}else{q()}return p},hide:function(r){clearTimeout(l.data("timer"));clearTimeout(m);if(!l.is(":visible")){return}function q(){r=r||c.Event();r.type="onBeforeHide";k.trigger(r);if(r.isDefaultPrevented()){return}b[g.effect][1].call(p,function(){r.type="onHide";k.trigger(r)})}if(g.delay&&r){l.data("timer",setTimeout(q,g.delay))}else{q()}return p},isShown:function(){return l.is(":visible, :animated")},getConf:function(){return g},getTip:function(){return l},getTrigger:function(){return f},bind:function(q,r){k.bind(q,r);return p},onHide:function(q){return this.bind("onHide",q)},onBeforeShow:function(q){return this.bind("onBeforeShow",q)},onShow:function(q){return this.bind("onShow",q)},onBeforeHide:function(q){return this.bind("onBeforeHide",q)},unbind:function(q){k.unbind(q);return p}});c.each(g,function(q,r){if(c.isFunction(r)){p.bind(q,r)}})}c.prototype.tooltip=function(e){var f=this.eq(typeof e=="number"?e:0).data("tooltip");if(f){return f}var g=c.extend(true,{},c.tools.tooltip.conf);if(c.isFunction(e)){e={onBeforeShow:e}}else{if(typeof e=="string"){e={tip:e}}}e=c.extend(true,g,e);if(typeof e.position=="string"){e.position=e.position.split(/,?\s/)}if(e.lazy!==false&&(e.lazy===true||this.length>20)){this.one("mouseover",function(h){f=new a(c(this),e);f.show(h);d.push(f)})}else{this.each(function(){f=new a(c(this),e);d.push(f)})}return e.api?f:this}})(jQuery);

/*
 * jqModal - Minimalist Modaling with jQuery
 *   (http://dev.iceburg.net/jquery/jqModal/)
 *
 * (c) 2007,2008 Brice Burgess
 * Dual licensed under the MIT and GPL licenses
 * 
 * $Version: 03/01/2009 +r14 
 */
(function($) {
$.fn.jqm=function(o){
var p={
overlay: 50,
overlayClass: 'jqmOverlay',
closeClass: 'jqmClose',
trigger: '.jqModal',
ajax: F,
ajaxText: '',
target: F,
modal: F,
toTop: F,
onShow: F,
onHide: F,
onLoad: F
};
return this.each(function(){if(this._jqm)return H[this._jqm].c=$.extend({},H[this._jqm].c,o);s++;this._jqm=s;
H[s]={c:$.extend(p,$.jqm.params,o),a:F,w:$(this).addClass('jqmID'+s),s:s};
if(p.trigger)$(this).jqmAddTrigger(p.trigger);
});};

$.fn.jqmAddClose=function(e){return hs(this,e,'jqmHide');};
$.fn.jqmAddTrigger=function(e){return hs(this,e,'jqmShow');};
$.fn.jqmShow=function(t){return this.each(function(){t=t||window.event;$.jqm.open(this._jqm,t);});};
$.fn.jqmHide=function(t){return this.each(function(){t=t||window.event;$.jqm.close(this._jqm,t)});};

$.jqm = {
hash:{},
open:function(s,t){var h=H[s],c=h.c,cc='.'+c.closeClass,z=(parseInt(h.w.css('z-index'))),z=(z>0)?z:3000,o=$('<div></div>').css({height:'100%',width:'100%',position:'fixed',left:0,top:0,'z-index':z-1,opacity:c.overlay/100});if(h.a)return F;h.t=t;h.a=true;h.w.css('z-index',z);
 if(c.modal) {if(!A[0])L('bind');A.push(s);}
 else if(c.overlay > 0)h.w.jqmAddClose(o);
 else o=F;

 h.o=(o)?o.addClass(c.overlayClass).prependTo('body'):F;
 if(ie6){$('html,body').css({height:'100%',width:'100%'});if(o){o=o.css({position:'absolute'})[0];for(var y in {Top:1,Left:1})o.style.setExpression(y.toLowerCase(),"(_=(document.documentElement.scroll"+y+" || document.body.scroll"+y+"))+'px'");}}

 if(c.ajax) {var r=c.target||h.w,u=c.ajax,r=(typeof r == 'string')?$(r,h.w):$(r),u=(u.substr(0,1) == '@')?$(t).attr(u.substring(1)):u;
  r.html(c.ajaxText).load(u,function(){if(c.onLoad)c.onLoad.call(this,h);if(cc)h.w.jqmAddClose($(cc,h.w));e(h);});}
 else if(cc)h.w.jqmAddClose($(cc,h.w));

 if(c.toTop&&h.o)h.w.before('<span id="jqmP'+h.w[0]._jqm+'"></span>').insertAfter(h.o);	
 (c.onShow)?c.onShow(h):h.w.show();e(h);return F;
},
close:function(s){var h=H[s];if(!h.a)return F;h.a=F;
 if(A[0]){A.pop();if(!A[0])L('unbind');}
 if(h.c.toTop&&h.o)$('#jqmP'+h.w[0]._jqm).after(h.w).remove();
 if(h.c.onHide)h.c.onHide(h);else{h.w.hide();if(h.o)h.o.remove();} return F;
},
params:{}};
var s=0,H=$.jqm.hash,A=[],ie6=$.browser.msie&&($.browser.version == "6.0"),F=false,
i=$('<iframe src="javascript:false;document.write(\'\');" class="jqm"></iframe>').css({opacity:0}),
e=function(h){if(ie6)if(h.o)h.o.html('<p style="width:100%;height:100%"/>').prepend(i);else if(!$('iframe.jqm',h.w)[0])h.w.prepend(i); f(h);},
f=function(h){try{$(':input:visible',h.w)[0].focus();}catch(_){}},
L=function(t){$()[t]("keypress",m)[t]("keydown",m)[t]("mousedown",m);},
m=function(e){var h=H[A[A.length-1]],r=(!$(e.target).parents('.jqmID'+h.s)[0]);if(r)f(h);return !r;},
hs=function(w,t,c){return w.each(function(){var s=this._jqm;$(t).each(function() {
 if(!this[c]){this[c]=[];$(this).click(function(){for(var i in {jqmShow:1,jqmHide:1})for(var s in this[i])if(H[this[i][s]])H[this[i][s]].w[i](this);return F;});}this[c].push(s);});});};
})(jQuery);

/*
 * jqDnR - Minimalistic Drag'n'Resize for jQuery.
 * (c) 2007 Brice Burgess , http://www.iceburg.net
 * Licensed under the MIT License
 * $Version: 2007.08.19 +r2
 */
(function($){
$.fn.jqDrag=function(h){return i(this,h,'d');};
$.fn.jqResize=function(h){return i(this,h,'r');};
$.jqDnR={dnr:{},e:0,
drag:function(v){
 if(M.k == 'd')E.css({left:M.X+v.pageX-M.pX,top:M.Y+v.pageY-M.pY});
 else E.css({width:Math.max(v.pageX-M.pX+M.W,0),height:Math.max(v.pageY-M.pY+M.H,0)});
  return false;},
stop:function(){E.css('opacity',M.o);$().unbind('mousemove',J.drag).unbind('mouseup',J.stop);}
};
var J=$.jqDnR,M=J.dnr,E=J.e,
i=function(e,h,k){return e.each(function(){h=(h)?$(h,e):e;
 h.bind('mousedown',{e:e,k:k},function(v){var d=v.data,p={};E=d.e;
 // attempt utilization of dimensions plugin to fix IE issues
 if(E.css('position') != 'relative'){try{E.position(p);}catch(e){}}
 M={X:p.left||f('left')||0,Y:p.top||f('top')||0,W:f('width')||E[0].scrollWidth||0,H:f('height')||E[0].scrollHeight||0,pX:v.pageX,pY:v.pageY,k:d.k,o:E.css('opacity')};
 E.css({opacity:1});$().mousemove($.jqDnR.drag).mouseup($.jqDnR.stop);
 return false;
 });
});},
f=function(k){return parseInt(E.css(k))||false;};
})(jQuery);
/*
* jQuery Wait
* http://docs.jquery.com/Cookbook/wait
*/
$.fn.wait = function(time, type) {
        time = time || 1000;
        type = type || "fx";
        return this.queue(type, function() {
            var self = this;
            setTimeout(function() {
                $(self).dequeue();
            }, time);
        });
    };

















/*---- Part2: CUSTOM FUNCTION ----*/

/*pager*/
      
function pagerSetting(selectorTag,selectorCount,pageNumber,pageCount,callback)
{        
    for(i=0;i<=selectorCount;i++)
    { 
        if(pageNumber == 0 && pageCount == 0)
        {
            $("#"+selectorTag+i).html("");
        }
       else
        {
         $("#"+selectorTag+i).pager({ pagenumber: pageNumber, pagecount: pageCount, buttonClickCallback: callback });
        }
    }
}
/*pageMenu*/
$(document).ready(function(){
//    $('#pageMenu li a').click(
//			function(){ 
//				$('#pageMenu li.current').removeClass("current"); 
//				$(this).closest('li').addClass("current");
//				$(this).blur();
//			}
//		)
});

$(document).ready(function(){
    $("#userBox .btnLogin").click(function(){ dialog("快速登陆","../User/uc.aspx?uc=login");});
    $("#btnReg").click(function(){ dialog("免费注册","../User/uc.aspx?uc=reg","/");});
    
     function runIt() {
      $("#userBox .userWelcome").wait(5000)
              .animate({bottom:'+=25'},1000)
              .wait()
              .animate({bottom:'+=63'},1000)
              .wait()
              .animate({left:'-=20'},1000)
              .animate({left:'+=40'},2000)
              .animate({left:'-=20'},1000)
              .wait(5000)
              .animate({bottom:'-=88'},1000,runIt);
    }
    
    runIt();      
});

function loading()
{
    return '<div class=loading />'; 
}

function goTop() {
 window.scrollTo(0,0);
}

/* jqModal: Overriding Javascript's Alert Dialog */
/*enter*/
function enterKey(event,func)
{
    var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
    if (keyCode == 13)
        { 
           func();
        }
}
/*ctrl+enter*/
function ctrlEnter(e,func){
     e = (e) ? e : ((window.event) ? window.event : "")
    var key = e.keyCode?e.keyCode:e.which;
    if(e.ctrlKey && (key == 13 || key == 10)){
        func();
     }
}

function alertResult(selector,msg) {
   $(selector).prepend("<div id='resultAlert'>提示:"+msg+"</div>");
        setTimeout(function() {
           $('#resultAlert').remove();
        }, 3000);
}

function alert(msg) {
  $('#jqmAlert')
  .jqDrag('div.jqmAlertTitle')
    .jqmShow()
    .find('div.jqmAlertContent')
      .html(msg);
  setTimeout(function() {
                $('#jqmAlert').jqmHide();
            }, 1500);
}

function confirm(title,msg,callback) {
  var jd = $('#jqmConfirm')
  jd.jqDrag('div.jqmAlertTitle')
    jd.jqmShow()
    title && jd.find('div.jqmAlertTitle h1').html(title);
    jd.find('div.jqmAlertContent')
      .html(msg)
    .end()
    jd.find(':input:visible')
      .click(function(){
        if(this.value == '确定')
          (typeof callback == 'string') ?
            window.location.href = callback :
            callback();
        jd.jqmHide();
      });
}

function dialog(title,url) {
  var jd = $('#jqmDialog')
    jd.jqDrag('div.jqmDialogTitle');
    $('#jqmDialog .jqmDialogContent').html("载入中...");
    jd.jqmShow();
    title && jd.find('div.jqmDialogTitle h1').html(title);
    if(url)
    {
        $.get( url + "&t=" + Math.random(),function(data){
            $('#jqmDialog .jqmDialogContent').html(data);
        });
    }
}

function dialogJSBox(title,url,callback) {
  var jd = $('#jqmDialogBox')
    jd.jqDrag('div.jqmDialogBoxTitle');
     $('#jqmDialogBox .jqmDialogBoxTitle').html("<h1>温馨提示</h1>");
     $('#jqmDialogBox .jqmDialogBoxContent').html("载入中...");
     $('#jqmDialogBox .jqmDialogBoxBottom').html("");
    jd.jqmShow();
    title && jd.find('div.jqmDialogBoxTitle h1').html(title);
    if(url)
    {
        $.getScript( url,function(){
            //$('#jqmDialogBox .jqmDialogBoxContent').html('');
            callback();
        });
    }
}

$(document).ready(function() {
  $('#jqmAlert').jqm({overlay:10, trigger: false });
  $('#jqmConfirm').jqm({overlay:10, trigger: false, modal:true });
  $('#jqmDialog').jqm({
      overlay:10,
      trigger: false, 
      modal:true
  });
  $('#jqmDialogBox').jqm({
      overlay:15,
      trigger: false, 
      modal:true
  });
});


/* jqModal: Overriding Javascript's Confirm Dialog */

// NOTE; A callback must be passed. It is executed on "cotinue". 
//  This differs from the standard confirm() function, which returns
//   only true or false!

// If the callback is a string, it will be considered a "URL", and
//  followed.

// If the callback is a function, it will be executed.


//function confirm(msg,callback) {
//  $('#jqmConfirm')
//    .jqmShow()
//    .find('p.jqmConfirmMsg')
//      .html(msg)
//    .end()
//    .find(':input:visible')
//      .click(function(){
//        if(this.value == 'yes')
//          (typeof callback == 'string') ?
//            window.location.href = callback :
//            callback();
//        $('#jqmConfirm').jqmHide();
//      });
//}


//BBQ
//$(document).ready(function() {
//        var cache = {'': $('.mainBoxDefault')};
//        $(window).bind( 'hashchange', function(e) {
//        
//            var url = $.param.fragment();
//                //页面导航
//                url && $('#pageMenu li.current').removeClass("current"); 
//                url && $( 'a[href="#' + url + '"]' ).closest('li').addClass( 'current' ); 
//                
//           $( '#mainBoxContent' ).children( ':visible' ).hide();
//           
//            if ( cache[ url ] ) {
//              cache[ url ].show();              
//            } else {
//              cache[ url ] = $( '<div class="mainContent"/>' )
//                
//                // Append the content container to the parent container.
//               .appendTo('#mainBoxContent')
//               .html(loading())
//                // Load external content via AJAX. Note that in order to keep this
//                // example streamlined, only the content in .infobox is shown. You'll
//                // want to change this based on your needs.
//               .load( url, function(){
//                  // Content loaded, hide "loading" content.
//                  //$( '.loading' ).hide();
//                   
//                });
//            }
//          })

//  
//      // Since the event is only triggered when the hash changes, we need to trigger
//      // the event now, to handle the hash the page may have loaded with.
//      $(window).trigger( 'hashchange' );

// });  
 


//    function tooltip()
//    {
//        // select all desired input fields and attach tooltips to them 
//        $("#loginDialog :input").tooltip({ 
//         
//            // place tooltip on the right edge 
//            position: "center right", 
//         
//            // a little tweaking of the position 
//            offset: [-2, 10], 
//         
//            // use the built-in fadeIn/fadeOut effect 
//            effect: "fade", 
//         
//            // custom opacity setting 
//            opacity: 0.7, 
//         
//            // use this single tooltip element 
//            tip: '.checkResult' 
//         
//        });
//    }
    
/*---- Part3: CUSTOM SETTING  ----*/
$(document).ready(function() {
    /*$("#defaultProductMenuBox .productMenu li a.pclass").click(function(){
        $("#defaultProductMenuBox .productMenu li").removeClass("current");
        $(this).blur().parent().addClass("current");
        $("#defaultProductMenuBox .cbody").hide();
        $("#defaultProductMenuBox div.pclass").show();
    });
    $("#defaultProductMenuBox .productMenu li a.pbrand").click(function(){
        $("#defaultProductMenuBox .productMenu li").removeClass("current");
        $(this).blur().parent().addClass("current");
        $("#defaultProductMenuBox .cbody").hide();
        $("#defaultProductMenuBox div.pbrand").show();
    });*/
    
    //$("#searchKey").focus();
    $("#searchHead li a").click(function(){
        $("#searchHead li a").removeClass("current");
        $(this).blur().addClass("current");
        $("#currentSearchKey").val($(this).attr("id"));
    });
    
    $("#pageMenuBar .pageClassBox").mouseover(function(){$(this).addClass("current");$(this).children(".class").hide();$(this).children(".tempclass").show();}).mouseout(function(){$(this).removeClass("current");$(this).children(".tempclass").hide();$(this).children(".class").show();});
});

//function search()
//{
//    var csk = $("#currentSearchKey").val();
//    var skey = $("#searchKey").val();
//    if(!csk) csk="searchCompany";
//    if(!skey)
//    {
//        $("#searchKey").focus().addClass('state-error');
//        return false;
//    }
//    location = "search.aspx?stype="+csk+"&skey="+skey;
//}