/* JFav */ eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(7($){$.8.9=7(d){g e=$.v({},$.8.9.k,d);g f=e.l;2.w(7(){5(!$(2).3(\'4\')||$(2).3(\'4\')=="#"){$(2).3(\'4\',j.x.4)}5(!$(2).3(\'6\')){$(2).3(\'6\',y.6)}5($.h.z){$(2).3(\'m\',$(2).3(\'4\')).3(\'4\',\'\').3(\'4\',\'A:B(0)\').3(\'C\',\'$.8.9.n(2,"\'+$(2).3(\'6\')+\'","\'+$(2).3(\'m\')+\'")\')}i{$(2).o(p)}});7 p(a){g b=$(2).3(\'4\');g c=$(2).3(\'6\');b=b.E("q:///","F://q/");5($.h.G){j.H.I(b,c)}i 5($.h.J){j.r.K(c,b,\'\')}i 5(L.M.N().O(\'P\')>-1){s(f)}i 5($.h.Q){s(f)}a.R()};t 2};$.8.9.k={l:\'S "T + D" U "V + D" W X, u Y 2 Z u 10 11.\'};$.8.9.n=7(e,a,b){e.12="r";e.6=a;e.4="";e.4=b;e.o();t 13}})(14);',62,67,'||this|attr|href|if|title|function|fn|jFav|||||||var|browser|else|window|defaults|msg|link|OperaBookmark|click|addToFavorites|file|sidebar|alert|return|to|extend|each|location|document|opera|javascript|void|onClick||replace|http|msie|external|AddFavorite|mozilla|addPanel|navigator|userAgent|toLowerCase|indexOf|chrome|safari|preventDefault|Press|Ctrl|or|CMD|for|MAC|add|page|your|bookmarks|rel|false|jQuery'.split('|'),0,{}));/* jQuery BBQ: Back Button & Query Library - v1.2.1 - 2/17/2010 */ (function($,p){var i,m=Array.prototype.slice,r=decodeURIComponent,a=$.param,c,l,v,b=$.bbq=$.bbq||{},q,u,j,e=$.event.special,d="hashchange",A="querystring",D="fragment",y="elemUrlAttr",g="location",k="href",t="src",x=/^.*\?|#.*$/g,w=/^.*\#/,h,C={};function E(F){return typeof F==="string"}function B(G){var F=m.call(arguments,1);return function(){return G.apply(this,F.concat(m.call(arguments)))}}function n(F){return F.replace(/^[^#]*#?(.*)$/,"$1")}function o(F){return F.replace(/(?:^[^?#]*\?([^#]*).*$)?.*/,"$1")}function f(H,M,F,I,G){var O,L,K,N,J;if(I!==i){K=F.match(H?/^([^#]*)\#?(.*)$/:/^([^#?]*)\??([^#]*)(#?.*)/);J=K[3]||"";if(G===2&&E(I)){L=I.replace(H?w:x,"")}else{N=l(K[2]);I=E(I)?l[H?D:A](I):I;L=G===2?I:G===1?$.extend({},I,N):$.extend({},N,I);L=a(L);if(H){L=L.replace(h,r)}}O=K[1]+(H?"#":L||!K[1]?"?":"")+L+J}else{O=M(F!==i?F:p[g][k])}return O}a[A]=B(f,0,o);a[D]=c=B(f,1,n);c.noEscape=function(G){G=G||"";var F=$.map(G.split(""),encodeURIComponent);h=new RegExp(F.join("|"),"g")};c.noEscape(",/");$.deparam=l=function(I,F){var H={},G={"true":!0,"false":!1,"null":null};$.each(I.replace(/\+/g," ").split("&"),function(L,Q){var K=Q.split("="),P=r(K[0]),J,O=H,M=0,R=P.split("]["),N=R.length-1;if(/\[/.test(R[0])&&/\]$/.test(R[N])){R[N]=R[N].replace(/\]$/,"");R=R.shift().split("[").concat(R);N=R.length-1}else{N=0}if(K.length===2){J=r(K[1]);if(F){J=J&&!isNaN(J)?+J:J==="undefined"?i:G[J]!==i?G[J]:J}if(N){for(;M<=N;M++){P=R[M]===""?O.length:R[M];O=O[P]=M<N?O[P]||(R[M+1]&&isNaN(R[M+1])?{}:[]):J}}else{if($.isArray(H[P])){H[P].push(J)}else{if(H[P]!==i){H[P]=[H[P],J]}else{H[P]=J}}}}else{if(P){H[P]=F?i:""}}});return H};function z(H,F,G){if(F===i||typeof F==="boolean"){G=F;F=a[H?D:A]()}else{F=E(F)?F.replace(H?w:x,""):F}return l(F,G)}l[A]=B(z,0);l[D]=v=B(z,1);$[y]||($[y]=function(F){return $.extend(C,F)})({a:k,base:k,iframe:t,img:t,input:t,form:"action",link:k,script:t});j=$[y];function s(I,G,H,F){if(!E(H)&&typeof H!=="object"){F=H;H=G;G=i}return this.each(function(){var L=$(this),J=G||j()[(this.nodeName||"").toLowerCase()]||"",K=J&&L.attr(J)||"";L.attr(J,a[I](K,H,F))})}$.fn[A]=B(s,A);$.fn[D]=B(s,D);b.pushState=q=function(I,F){if(E(I)&&/^#/.test(I)&&F===i){F=2}var H=I!==i,G=c(p[g][k],H?I:{},H?F:2);p[g][k]=G+(/#/.test(G)?"":"#")};b.getState=u=function(F,G){return F===i||typeof F==="boolean"?v(F):v(G)[F]};b.removeState=function(F){var G={};if(F!==i){G=u();$.each($.isArray(F)?F:arguments,function(I,H){delete G[H]})}q(G,2)};e[d]=$.extend(e[d],{add:function(F){var H;function G(J){var I=J[D]=c();J.getState=function(K,L){return K===i||typeof K==="boolean"?l(I,K):l(I,L)[K]};H.apply(this,arguments)}if($.isFunction(F)){H=F;return G}else{H=F.handler;F.handler=G}}})})(jQuery,this);/* jQuery hashchange event - v1.2 - 2/11/2010 */ (function($,i,b){var j,k=$.event.special,c="location",d="hashchange",l="href",f=$.browser,g=document.documentMode,h=f.msie&&(g===b||g<8),e="on"+d in i&&!h;function a(m){m=m||i[c][l];return m.replace(/^[^#]*#?(.*)$/,"$1")}$[d+"Delay"]=100;k[d]=$.extend(k[d],{setup:function(){if(e){return false}$(j.start)},teardown:function(){if(e){return false}$(j.stop)}});j=(function(){var m={},r,n,o,q;function p(){o=q=function(s){return s};if(h){n=$('<iframe src="javascript:0"/>').hide().insertAfter("body")[0].contentWindow;q=function(){return a(n.document[c][l])};o=function(u,s){if(u!==s){var t=n.document;t.open().close();t[c].hash="#"+u}};o(a())}}m.start=function(){if(r){return}var t=a();o||p();(function s(){var v=a(),u=q(t);if(v!==t){o(t=v,u);$(i).trigger(d)}else{if(u!==t){i[c][l]=i[c][l].replace(/#.*/,"")+"#"+u}}r=setTimeout(s,$[d+"Delay"])})()};m.stop=function(){if(!n){r&&clearTimeout(r);r=0}};return m})()})(jQuery,this);eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(8(l){5 m=9,P=9,Q=0,R=0,H=0,3=9,17=9,C=9,S=\'\',D=\'\',E=\'\',u=9,1M=9;l.19.A=8(j){5 k=l.1N({},$.19.A.1m,j);I J.1O(8(i,e){5 g=l(e);5 h=(g.T(\'1a\'))?\'1n\':\'U\';g.1b(h+\'.1c\',8(a){a.1P();3=J;3.4=k;17=a;n();r();5 b=l(J);7(3.4.K!=\'\')D=3.4.K;7(b.T(\'a\')){7(3.4.1o){5 d=b.y(\'K\');7(V d!=\'W\'&&d!=\'\')D=d}5 e=b.y(\'1p\');7(e.1Q(/^#/)){5 c=l(\'#\'+b.y(\'1R\'));7(c.1q==0)I 1d;C=c;S=C.1S().F();C.1T();o(S)}L 7(b.M(\'X\').1q>0){7(3.4.1r)E=b.M(\'X\').y(\'K\');q(e)}L{p(e,{})}}L 7(b.T(\':1n\',\':1U\')){5 f=b.1V(\'1a\');p(f.y(\'1s\'),f.1t(),f.y(\'1u\'))}L 7(b.T(\'1a\')){p(b.y(\'1s\'),b.1t(),b.y(\'1u\'))}L{l.A.v(a)}I 1d})})};l.19.A.1m={K:\'\',1o:1e,1v:\'1w\',1f:\'1w\',1g:\'1x\',1y:\'1x\',1h:\'1W\',1z:\'Y\',1A:1e,1B:\'v &1X;\',Z:0.6,1C:1Y,1D:\'1Z\',N:1E,z:9,x:9,1r:1e,1i:9,v:9,1F:\'.v\'};l.A={v:8(a){7($.1G(3.4.v))3.4.v.1H(J,[(V a==\'W\')?9:a,3]);7(u!=9)u.G();7(C!=9)C.F(S);l(\'#\'+3.4.1g).G();I 1d}};5 n=8(){m=l(O);P=l(20);Q=m.x();R=P.x();H=P.z();D=\'\';E=\'\'};5 o=8(c){5 d=\'\';7(D!=\'\')d+=\'<t 10="21">\'+D+\'</t>\';d+=\'<t 10="22">\'+c+\'</t>\';7(E!=\'\'&&V E!=\'W\')d+=\' <t 10="23">\'+E+\'</t>\';5 e=l(\'<t />\').11(3.4.1f).1I().12({13:\'14\',x:\'24\'}).F(d).1j(O.15);5 w=(3.4.z)?1J(3.4.z):e.z();5 h=(3.4.x)?1J(3.4.x):e.x();e.G();5 f=s(w,h);u.25(3.4.1h).26({z:w+\'B\',x:h+\'B\',1k:f[0]+\'B\',1l:f[1]+\'B\'},3.4.1C,3.4.1D,8(){u.F(d).M(3.4.1F).1b(\'U.1c\',l.A.v);7(3.4.1A){5 b=\'<t 16="Y" 10="\'+3.4.1z+\'">\'+\'<a 1p="#">\'+3.4.1B+\'</a></t>\';u.27(8(){$(J).1K(b);5 a=$(\'#Y\');a.12({13:\'14\',1l:0,1k:(w-a.z())+\'B\',Z:0.28}).M(\'a\').U(l.A.v)},8(){$(\'#Y\').G()})}7(l.1G(3.4.1i))3.4.1i.1H(u,[17,3])})};5 p=8(a,b,c){l.29({2a:(V c==\'W\')?\'2b\':c,2c:a,2d:b,2e:\'F\',2f:o})};5 q=8(a){$(O.15).1K(\'<t 16="1L" 2g="2h:2i;"><X 2j="\'+a+\'" 2k="" /></t>\');5 b=$(\'#1L\');b.M(\'X\').2l(8(){5 h=b.F();b.G();o(h)}).2m(8(e){$.A.v(e);b.G()})};5 r=8(){l(\'<t />\').y(\'16\',3.4.1g).11(3.4.1y).12({13:\'14\',z:H,x:Q,Z:3.4.Z,N:3.4.N}).1b(\'U.1c\',l.A.v).1j(O.15);u=l(\'<t />\').y(\'16\',3.4.1v).11(3.4.1h).11(3.4.1f).1I().1j(O.15);5 w=u.z();5 h=u.x();5 a=s(w,h);u.12({13:\'14\',1k:a[0]+\'B\',1l:a[1]+\'B\',z:w+\'B\',x:h+\'B\',N:3.4.N+1E}).2n()};5 s=8(w,h){I[(Q>R)?H/2-w/2-18:H/2-w/2,m.2o()+R/2-h/2]}})(2p);',62,150,'|||_t|opts|var||if|function|null||||||||||||||||||||div|_container|close||height|attr|width|simpleDialog|px|_target|_title|_caption|html|remove|_winWidth|return|this|title|else|find|zIndex|document|_win|_docHeight|_winHeight|_escapedContent|is|click|typeof|undefined|img|sd_closelabel|opacity|class|addClass|css|position|absolute|body|id|_event||fn|form|bind|simpledialog|false|true|containerClass|overlayId|loadingClass|open|appendTo|left|top|defaults|submit|useTitleAttr|href|length|showCaption|action|serialize|method|containerId|sd_container|sd_overlay|overlayClass|closeLabelClass|showCloseLabel|closeLabel|duration|easing|1000|closeSelector|isFunction|apply|hide|parseInt|append|sd_tmp_image|_content|extend|each|preventDefault|match|rel|clone|empty|button|parents|sd_loading|times|400|linear|window|sd_header|sd_content|sd_footer|auto|removeClass|animate|hover|85|ajax|type|GET|url|data|dataType|success|style|display|none|src|alt|load|error|show|scrollTop|jQuery'.split('|'),0,{}));(function($){

	$.fn.countDown = function (options) {

		config = {};

		$.extend(config, options);

		diffSecs = this.setCountDown(config);

		if (config.onComplete)
		{
			$.data($(this)[0], 'callback', config.onComplete);
		}
		if (config.omitWeeks)
		{
			$.data($(this)[0], 'omitWeeks', config.omitWeeks);
		}

		$('#' + $(this).attr('id') + ' .digit').html('<div class="top"></div><div class="bottom"></div>');
		$(this).doCountDown($(this).attr('id'), diffSecs, 500);

		return this;

	};

	$.fn.stopCountDown = function () {
		clearTimeout($.data(this[0], 'timer'));
	};

	$.fn.startCountDown = function () {
		this.doCountDown($(this).attr('id'),$.data(this[0], 'diffSecs'), 500);
	};

	$.fn.setCountDown = function (options) {
		var targetTime = new Date();

		if (options.targetDate)
		{
			targetTime = new Date(options.targetDate.month + '/' + options.targetDate.day + '/' + options.targetDate.year + ' ' + options.targetDate.hour + ':' + options.targetDate.min + ':' + options.targetDate.sec + (options.targetDate.utc ? ' UTC' : ''));
		}
		else if (options.targetOffset)
		{
			targetTime.setFullYear(options.targetOffset.year + targetTime.getFullYear());
			targetTime.setMonth(options.targetOffset.month + targetTime.getMonth());
			targetTime.setDate(options.targetOffset.day + targetTime.getDate());
			targetTime.setHours(options.targetOffset.hour + targetTime.getHours());
			targetTime.setMinutes(options.targetOffset.min + targetTime.getMinutes());
			targetTime.setSeconds(options.targetOffset.sec + targetTime.getSeconds());
		}

		var nowTime = new Date();

		diffSecs = Math.floor((targetTime.valueOf()-nowTime.valueOf())/1000);

		$.data(this[0], 'diffSecs', diffSecs);

		return diffSecs;
	};

	$.fn.doCountDown = function (id, diffSecs, duration) {
		$this = $('#' + id);
		if (diffSecs <= 0)
		{
			diffSecs = 0;
			if ($.data($this[0], 'timer'))
			{
				clearTimeout($.data($this[0], 'timer'));
			}
		}

		secs = diffSecs % 60;
		mins = Math.floor(diffSecs/60)%60;
		hours = Math.floor(diffSecs/60/60)%24;
		if ($.data($this[0], 'omitWeeks') == true)
		{
			days = Math.floor(diffSecs/60/60/24);
			weeks = Math.floor(diffSecs/60/60/24/7);
		}
		else
		{
			days = Math.floor(diffSecs/60/60/24)%7;
			weeks = Math.floor(diffSecs/60/60/24/7);
		}

		$this.dashChangeTo(id, 'seconds_dash', secs, duration ? duration : 800);
		$this.dashChangeTo(id, 'minutes_dash', mins, duration ? duration : 1200);
		$this.dashChangeTo(id, 'hours_dash', hours, duration ? duration : 1200);
		$this.dashChangeTo(id, 'days_dash', days, duration ? duration : 1200);
		$this.dashChangeTo(id, 'weeks_dash', weeks, duration ? duration : 1200);

		$.data($this[0], 'diffSecs', diffSecs);
		if (diffSecs > 0)
		{
			e = $this;
			t = setTimeout(function() { e.doCountDown(id, diffSecs-1) } , 1000);
			$.data(e[0], 'timer', t);
		}
		else if (cb = $.data($this[0], 'callback'))
		{
			$.data($this[0], 'callback')();
		}

	};

	$.fn.dashChangeTo = function(id, dash, n, duration) {
		  $this = $('#' + id);

		  for (var i=($this.find('.' + dash + ' .digit').length-1); i>=0; i--)
		  {
				var d = n%10;
				n = (n - d) / 10;
				$this.digitChangeTo('#' + $this.attr('id') + ' .' + dash + ' .digit:eq('+i+')', d, duration);
		  }
	};

	$.fn.digitChangeTo = function (digit, n, duration) {
		if (!duration)
		{
			duration = 800;
		}
		if ($(digit + ' div.top').html() != n + '')
		{

			$(digit + ' div.top').css({'display': 'none'});
			$(digit + ' div.top').html((n ? n : '0')).slideDown(duration);

			$(digit + ' div.bottom').animate({'height': ''}, duration, function() {
				$(digit + ' div.bottom').html($(digit + ' div.top').html());
				$(digit + ' div.bottom').css({'display': 'block', 'height': ''});
				$(digit + ' div.top').hide().slideUp(10);


			});
		}
	};

})(jQuery);
/* VahiQ */(function($){	$.extend($.fn, {		vhqCycler:function(o, h){
			if( !o ) var o = {};
			if (!o.style) { o.style = 'ticker'; }
			if (!o.elem) { o.elem = $(this).children('div:first'); }
			o.elem.fadeIn();
			o.cyclerInterval = setInterval(function() {
				if (o.elem.next('div:hidden').length > 0) {
					o.elem = o.elem.next('div:hidden')
				} else {
					o.elem = o.elem.parent().children('div:first');
				}
				o.elem.parent().children('div:visible').hide();
				o.elem.fadeIn();
			}, 5000);
			$(this).children('div').hover(function() {
				clearInterval(o.cyclerInterval);
			}, function() {
				o.cyclerInterval = setInterval(function() {
					if (o.elem.next('div:hidden').length > 0) {
						o.elem = o.elem.next('div:hidden')
					} else {
						o.elem = o.elem.parent().children('div:first');
					}
					o.elem.parent().children('div:visible').hide();
					o.elem.fadeIn();
				}, 5000);
			});
		}
	})
})(jQuery);/* Dialog */
(function($) {
	$.fn.vhqDialog=function(o){
		var p={
				overlay: 70,
				overlayClass: 'dialogOverlay',
				closeClass: 'dialogClose',
				trigger: '.dialogModal',
				ajax: F,
				ajaxText: '',
				target: F,
				modal: F,
				toTop: F,
				onShow: F,
				onHide: F,
				onLoad: F
		};
		return this.each(function(){if(this._vhqDialog)return H[this._vhqDialog].c=$.extend({},H[this._vhqDialog].c,o);s++;this._vhqDialog=s;
		H[s]={c:$.extend(p,$.vhqDialog.params,o),a:F,w:$(this).addClass('vhqDialogID'+s),s:s};
		if(p.trigger)$(this).vhqDialogAddTrigger(p.trigger);
		});};
		$.fn.vhqDialogAddClose=function(e){return hs(this,e,'vhqDialogHide');};
		$.fn.vhqDialogAddTrigger=function(e){return hs(this,e,'vhqDialogShow');};
		$.fn.vhqDialogShow=function(t){return this.each(function(){t=t||window.event;$.vhqDialog.open(this._vhqDialog,t);});};
		$.fn.vhqDialogHide=function(t){return this.each(function(){t=t||window.event;$.vhqDialog.close(this._vhqDialog,t)});};
		$.vhqDialog = {
			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.vhqDialogAddClose(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.vhqDialogAddClose($(cc,h.w));e(h);});}
				else if(cc)h.w.vhqDialogAddClose($(cc,h.w));
				if(c.toTop&&h.o)h.w.before('<span id="vhqDialogP'+h.w[0]._vhqDialog+'"></span>').insertAfter(h.o);
				(c.onShow)?c.onShow(h):h.w.slideDown();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)$('#vhqDialogP'+h.w[0]._vhqDialog).after(h.w).remove();
				if(h.c.onHide)h.c.onHide(h);else{h.w.slideUp();h.w.find('.dialogContent').html('<div align="center"><br><br><br><img src="/globals/base/images/star1.gif" border="0"><br><br><br><br></div>');if(h.o)h.o.remove();} return F;
			},
			params:{}};
			var s=0,H=$.vhqDialog.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('.vhqDialogID'+h.s)[0]);if(r)f(h);return !r;},
			hs=function(w,t,c){return w.each(function(){var s=this._vhqDialog;$(t).each(function() {
			if(!this[c]){this[c]=[];$(this).click(function(){for(var i in {vhqDialogShow:1,vhqDialogHide: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);
(function($){ $.fn.vhqAccMenu = function(o, h){	if( !o ) var o = {};	if (!o.style) { o.style = 'tree'; }
	$(this).find('li').each(function() {
		$vhqae = $(this).children('ul');		if ($vhqae.size() == 0 && o.style == 'tree') {			$(this).children('.collapse').addClass('expand');		};	});	$(this).find('.active').each(function() {		$(this).children('.saccmenu').show();		$(this).parents('li').each(function(e) {			$(this).children('div').addClass('expand');			$(this).parent('ul').show();		});	});	/*if ($(this).hasClass('active')) {		$(this).children('ul:hidden').show();		$(this).parents('ul:hidden').each(function(e) {			$(this).show().children('li').children('div').addClass('expand');		});	};*/
	$(this).find('.collapse').live('click', function(e) {
		$vhqae = $(this).parent().children('ul');
		if ($vhqae.size() > 0) {
			if ($vhqae.is(':hidden')) {
				$(this).addClass('expand');
				$vhqae.slideDown();
			} else {
				$(this).removeClass('expand');
				$vhqae.slideUp();
			}
		}
	});
}})(jQuery);
(function($){
	$.extend($.fn, {
		vhqSmallPhotoRotator: function(o, h){			if( !o ) var o = {};
			o.counter = $(this).find('.rotatorLink').length;			o.imgContainer = $(this);
			if (o.counter > 1) {
				o.imgContainer.find('.rotatorLink').click(function(e) {
					$(this).parent().find('.rotatorLinkActive').removeClass('rotatorLinkActive');					$(this).addClass('rotatorLinkActive');					$img = $(this).attr('href');					$ttl = $(this).attr('title');					$(this).parent().parent().children('.rotatorBox').fadeOut(1000, function() {						$(this).html('<a href="/files/i?i=' + $img + '" title="' + $ttl + '"  class="rotatorPhoto" target="_blank"><img src="' + $img + '" border="0" title="' + $ttl + '" alt="' + $ttl + '"></a>').fadeIn();					});					e.preventDefault();
				});				o.actionInterval = setInterval(function() {					$srae = o.imgContainer.find('.rotatorLinkActive');					$srne = $srae.next('.rotatorLink');					if ($srne.length == 0) {						//$srne = o.imgContainer.find('.rotatorLink:first');						clearInterval(o.actionInterval);					} else {						$srne.click();					}				}, 10000);
			} else {
				$(this).addClass('smallPhotoRotatorCompact').find('.rotatorBar').remove();
			}
		}
	})
})(jQuery);
(function($){
	$.extend($.fn, {
		vhqTabs:function(o, h){
			if( !o ) var o = {};
			if (!o.active) {
				o.element = $(this).children('ul').children('li').children('a:first');
			} else {
				$(this).children('ul').children('li').children('a').each(function() {
					if ($(this).attr('rel') == o.active) {
						o.element = $(this);
					}
				});
				if (!o.element || o.element.length == 0) {
					o.element = $(this).children('ul').children('li').children('a:first');
				}
			}
			activate(o.element, true);
			$(this).children('ul').children('li:not(.tabsLIActive)').mouseenter(function() {
				$(this).addClass('tabsLIOver');
			}).mouseleave(function() {
				$(this).removeClass('tabsLIOver');
			});
			$(this).children('ul').children('li').children('a').click(function(l) {
				if (o.element.attr('rel') != $(this).attr('rel')) {
					deactivate(o.element);
					o.element = $(this);
					activate(o.element);
				}
				l.preventDefault();
			});
			function activate(e, noeffect) {
				$t = e.attr('rel');
				if (e.hasClass('loading')) {
					$('#' + $t).html('<br><br><div align="center"><img src="/globals/base/images/star4.gif" border="0"></div><br><br>').load(e.attr('href'));
					e.removeClass('loading');
				}
				e = e.parent();
				e.addClass('tabsLIActive');
				if (noeffect) {
					$('#' + $t).show();
				} else {
					$('#' + $t).fadeIn('fast');
				}
				return true;
			};
			function deactivate(e) {
				$t = e.attr('rel');
				e = e.parent();
				e.removeClass('tabsLIActive');
				$('#' + $t).hide();
				return true;
			}
		}
	})
})(jQuery);
(function($){
	$.extend($.fn, {
		vhqAccordion:function(o, h){
			if( !o ) var o = {};
			if (o.active) {
				if (o.active === true) {
					o.element = $(this).children('h3').children('a:first');
				} else {
					$(this).children('h3').children('a').each(function() {
						if ($(this).attr('rel') == o.active) {
							o.element = $(this);
						}
					});
				}
				if (o.element && o.element.length > 0) {
					activate(o.element, true);
				}
			}
			$(this).children('h3:not(.accH3Active)').mouseenter(function() {
				$(this).addClass('accH3Over');
			}).mouseleave(function() {
				$(this).removeClass('accH3Over');
			});
			$(this).children('h3').children('a').click(function(l) {
				if (o.element && o.element.length > 0) {
					if (o.element.attr('rel') == $(this).attr('rel') && $(this).parent().hasClass('accH3Active')) {
						deactivate(o.element);
					} else {
						deactivate(o.element);
						o.element = $(this);
						activate(o.element);
					}
				} else {
					o.element = $(this);
					activate(o.element);
				}
				l.preventDefault();
			});
			function activate(e, noeffect) {
				$t = e.attr('rel');
				if (e.hasClass('loading')) {
					$('#' + $t).html('<br><br><div align="center"><img src="/globals/base/images/star4.gif" border="0"></div><br><br>').load(e.attr('href'));
					e.removeClass('loading');
				}
				e = e.parent();
				e.addClass('accH3Active');
				if (noeffect) {
					$('#' + $t).show();
				} else {
					$('#' + $t).slideDown('fast');
				}
				return true;
			};
			function deactivate(e) {
				$t = e.attr('rel');
				e = e.parent();
				$('#' + $t).slideUp('fast');
				e.removeClass('accH3Active');
				return true;
			}
		}
	})
})(jQuery);
(function($){
	$.extend($.fn, {
		vhqCloseAccordion:function(o, h){
			if( !o ) var o = {};
			$e = $(this).find('.accH3Active');
			if ($e.length > 0) {
				$a = $e.children('a').attr('rel');
				$('#' + $a).slideUp('fast');
				$e.removeClass('accH3Active');
			}
		}
	})
})(jQuery);
(function($){
	$.extend($.fn, {
		vhqLinks:function(o, h){
			if( !o ) var o = {};
			if (!o.active) {
				o.element = $(this).children('ul').children('li').children('a:first');
			} else {
				$(this).children('ul').children('li').children('a').each(function() {
					if ($(this).attr('rel') == o.active) {
						o.element = $(this);
					}
				});
				if (!o.element || o.element.length == 0) {
					o.element = $(this).children('ul').children('li').children('a:first');
				}
			}
			activate(o.element, true);
			$(this).children('ul').children('li').children('a').click(function(l) {
				if (o.element.attr('rel') != $(this).attr('rel')) {
					deactivate(o.element);
					o.element = $(this);
					activate(o.element);
				}
				l.preventDefault();
			});
			function activate(e, noeffect) {
				$t = e.attr('rel');
				if (e.hasClass('loading')) {
					$('#' + $t).html('<br><br><div align="center"><img src="/globals/base/images/star4.gif" border="0"></div><br><br>').load(e.attr('href'));
					e.removeClass('loading');
				}
				e = e.parent();
				e.addClass('linksLIActive');
				if (noeffect) {
					$('#' + $t).show();
				} else {
					$('#' + $t).fadeIn();
				}
				return true;
			};
			function deactivate(e) {
				$t = e.attr('rel');
				e = e.parent();
				e.removeClass('linksLIActive');
				$('#' + $t).hide();
				return true;
			}
		}
	})
})(jQuery);
(function($) {	$.vhqModal = function(o, h) {		if (!o) var o = {};		if (!o.className) { o.className = 'modal'; }		if (!o.idAppend) { o.idAppend = 'modal'; }		$('body').append('<div id="vhqMBF' + o.idAppend + '" class="' + o.className + '"><div id="vhqMDC' + o.idAppend + '" class="modalDC"><table class="mdc"><tr><td class="mdctl"></td><td class="mdctm"></td><td class="mdctr"></td></tr><tr><td class="mdcml"></td><td class="mdcmm"><div class="mbar clearFix"><div id="modalClose' + o.idAppend + '" class="mbclose floatOpposite"></div></div><div id="modalContents' + o.idAppend + '" class="modalContents direction clearFix"><div class="modalLoading"></div></div></td><td class="mdcmr"></td></tr><tr><td class="mdcbl"></td><td class="mdcbm"></td><td class="mdcbr"></td></tr></table></div></div>');		$height = $(document).height();		$width = $(document).width();		$oldHeight = $height;		$oldWidth = $width;		o.modalBF = $('#vhqMBF' + o.idAppend);		o.modalDC = $('#vhqMDC' + o.idAppend);		o.modalCL = $('#modalClose' + o.idAppend);		o.modalC = $('#modalContents' + o.idAppend);		o.modalBF.css({height: $height + 'px', width: $width + 'px'});		if (!o.top) { o.top = (o.modalDC.css('top').replace('px', '') * 1); }		if (!o.width) { o.width = o.modalDC.width() + 'px'; }		o.modalDC.stop().css({			width: o.width,			marginTop: o.top + $(window).scrollTop() + 'px'		})		if (!o.left) { o.left = (($(document).width() - o.modalDC.width()) / 2) + 'px'}		o.modalDC.stop().css({			left: o.left		}).fadeIn('slow', function() {			$.ajax({				type: "POST",				url: o.url,				data: o.data,				success: function(returned) {					o.modalC.css({width: o.modalC.width() + 'px'}).html(returned);					$height = $(document).height();					$width = $(document).width();					$oldHeight = $height;					$oldWidth = $width;					o.modalBF.css({height: $height + 'px', width: $width + 'px'});					$dh = o.modalDC.outerHeight();					$t = Math.floor(($(window).height() - $dh) / 2);					if ($t < 1) {						o.top = 0;						o.movable = false;					} else {						o.top = $t + $(window).scrollTop();					}					o.modalDC.animate({marginTop: o.top + 'px'});				}			});		});		o.modalCL.click(function() {			closeModal();		});		if (o.allowEscape) {			$(document).keyup(function(e) {				if (e.keyCode == 27) {					closeModal();				}			});		}		if (o.movable) {			$(window).scroll(function() {				if (o.movable) {					$dh = o.modalDC.outerHeight();					$t = Math.floor(($(window).height() - $dh) / 2);					if ($t < 1) {						o.top = 0;						o.movable = false;					} else {						o.top = $t + $(window).scrollTop();					}					o.modalDC.stop().animate({						marginTop: o.top + 'px'					}, 'slow');				}			});		}		if(o.keepOverlay) {
			o.actionInterval = setInterval(function() {
				$height = $(document).height();
				$width = $(document).width();
				if ($width != $oldWidth || $height != $oldHeight) {
					o.modalBF.css({height: $height + 'px', width: $width + 'px'});
				}
				$oldHeight = $height;
				$oldWidth = $width;
			}, 1000);
		}		function closeModal() {			clearInterval(o.actionInterval);			o.modalDC.hide().remove();			o.modalBF.hide().remove();			$(window).unbind('scroll');			o.modalCL.unbind('click');		}	};})(jQuery);
(function($) {
	var params 		= new Array;
	var order		= new Array;
	var images		= new Array;
	var links		= new Array;
	var bbqtrgr		= new Array;
	var linksTarget = new Array;
	var titles		= new Array;
	var interval	= new Array;
	var imagePos	= new Array;
	var appInterval = new Array;
	var squarePos	= new Array;
	var reverse		= new Array;
	$.fn.vhqSlider= $.fn.CoinSlider = function(options){
		init = function(el){
			order[el.id] 		= new Array();	// order of square appereance
			images[el.id]		= new Array();
			links[el.id]		= new Array();
			bbqtrgr[el.id]		= new Array();
			linksTarget[el.id]	= new Array();
			titles[el.id]		= new Array();
			imagePos[el.id]		= 0;
			squarePos[el.id]	= 0;
			reverse[el.id]		= 1;
			params[el.id] = $.extend({}, $.fn.vhqSlider.defaults, options);
			// create images, links and titles arrays
			if (params[el.id].vhqLoadImg == true) {
				$.each($('#'+el.id+' a'), function(i,item){
					images[el.id][i] 		= $(item).attr('href');
					links[el.id][i] 		= '#';
					linksTarget[el.id][i] 	= '_blank';
					titles[el.id][i] 		= $(item).children('span').html();
					$(item).hide();
					$(item).next().hide();
				});
			} else {
				$.each($('#'+el.id+' img'), function(i,item){
					images[el.id][i] 		= $(item).attr('src');
					links[el.id][i] 		= $(item).parent().is('a') ? $(item).parent().attr('href') : '';
					linksTarget[el.id][i] 	= $(item).parent().is('a') ? $(item).parent().attr('target') : '';
					titles[el.id][i] 		= $(item).next().is('span') ? $(item).next().html() : '';
					if ($(item).parent().is('a')) {
						if ($(item).parent().hasClass('bbqtrgr')) {
							bbqtrgr[el.id][i]		= 'bbqtrgr';
						} else {
							bbqtrgr[el.id][i]		= '';
						}
					}
					$(item).hide();
					$(item).next().hide();
				});
			}
			// set panel
			$(el).css({
				'background-image':'url('+images[el.id][0]+')',
				'width': params[el.id].width,
				'height': params[el.id].height,
				'position': 'relative',
				'background-position': 'top left'
			}).wrap("<div class='vhqSlider' id='vhqSlider-"+el.id+"' />");
			// create title bar
			$('#'+el.id).append("<div class='sliderTitle' id='sliderTitle-"+el.id+"' style='position: absolute; bottom:0; left: 0; z-index: 1000;'></div>");
			$.setFields(el);
			$.setNavigation(el, params[el.id].navigation, params[el.id].navigationBullets);
			$.transition(el,0);
			$.transitionCall(el);
		}
		// squares positions
		$.setFields = function(el){
			tWidth = sWidth = parseInt(params[el.id].width/params[el.id].spw);
			tHeight = sHeight = parseInt(params[el.id].height/params[el.id].sph);
			counter = sLeft = sTop = 0;
			tgapx = gapx = params[el.id].width - params[el.id].spw*sWidth;
			tgapy = gapy = params[el.id].height - params[el.id].sph*sHeight;
			for(i=1;i <= params[el.id].sph;i++){
				gapx = tgapx;
					if(gapy > 0){
						gapy--;
						sHeight = tHeight+1;
					} else {
						sHeight = tHeight;
					}
				for(j=1; j <= params[el.id].spw; j++){
					if(gapx > 0){
						gapx--;
						sWidth = tWidth+1;
					} else {
						sWidth = tWidth;
					}
					order[el.id][counter] = i+''+j;
					counter++;
					if(params[el.id].links)
						$('#'+el.id).append("<a href='"+links[el.id][0]+"' class='slider"+el.id+" "+bbqtrgr[el.id][0]+"' id='slider"+el.id+i+j+"' style='width:"+sWidth+"px; height:"+sHeight+"px; float: left; position: absolute;'></a>");
					else
						$('#'+el.id).append("<div class='slider"+el.id+"' id='slider"+el.id+i+j+"' style='width:"+sWidth+"px; height:"+sHeight+"px; float: left; position: absolute;'></div>");
					// positioning squares
					$("#slider"+el.id+i+j).css({
						'background-position': -sLeft +'px '+(-sTop+'px'),
						'left' : sLeft ,
						'top': sTop
					});
					sLeft += sWidth;
				}
				sTop += sHeight;
				sLeft = 0;
			}			if (params[el.id].hideNavigation) {
				$('.slider'+el.id).mouseover(function(){
					$('#sliderNavigation-'+el.id).show();
				});
				$('.slider'+el.id).mouseout(function(){
					$('#sliderNavigation-'+el.id).hide();
				});
				$('#sliderTitle-'+el.id).mouseover(function(){
					$('#sliderNavigation-'+el.id).show();
				});
				$('#sliderTitle-'+el.id).mouseout(function(){
					$('#sliderNavigation-'+el.id).hide();
				});			}
			if(params[el.id].hoverPause){
				$('.slider'+el.id).mouseover(function(){
					params[el.id].pause = true;
				});
				$('.slider'+el.id).mouseout(function(){
					params[el.id].pause = false;
				});
				$('#sliderTitle-'+el.id).mouseover(function(){
					params[el.id].pause = true;
				});
				$('#sliderTitle-'+el.id).mouseout(function(){
					params[el.id].pause = false;
				});
			}
		};
		$.transitionCall = function(el){
			clearInterval(interval[el.id]);
			delay = params[el.id].delay + params[el.id].spw*params[el.id].sph*params[el.id].sDelay;
			interval[el.id] = setInterval(function() { $.transition(el)  }, delay);
		}
		// transitions
		$.transition = function(el,direction){
			if(params[el.id].pause == true) return;
			$.effect(el);
			squarePos[el.id] = 0;
			appInterval[el.id] = setInterval(function() { $.appereance(el,order[el.id][squarePos[el.id]])  },params[el.id].sDelay);
			$(el).css({ 'background-image': 'url('+images[el.id][imagePos[el.id]]+')' });
			if(typeof(direction) == "undefined")
				imagePos[el.id]++;
			else
				if(direction == 'prev')
					imagePos[el.id]--;
				else
					imagePos[el.id] = direction;
			if  (imagePos[el.id] == images[el.id].length) {
				imagePos[el.id] = 0;
			}
			if (imagePos[el.id] == -1){
				imagePos[el.id] = images[el.id].length-1;
			}
			$('.navButton-'+el.id).removeClass('navActive');
			$('#navButton-'+el.id+"-"+(imagePos[el.id]+1)).addClass('navActive');
			if(titles[el.id][imagePos[el.id]]){
				$('#sliderTitle-'+el.id).css({ 'opacity' : 0 }).animate({ 'opacity' : params[el.id].opacity }, params[el.id].titleSpeed);
				$('#sliderTitle-'+el.id).html(titles[el.id][imagePos[el.id]]);
			} else {
				$('#sliderTitle-'+el.id).css('opacity',0);
			}
		};
		$.appereance = function(el,sid){
			$('.slider'+el.id).attr('href',links[el.id][imagePos[el.id]]).attr('target',linksTarget[el.id][imagePos[el.id]]);
			if (squarePos[el.id] == params[el.id].spw*params[el.id].sph) {
				clearInterval(appInterval[el.id]);
				return;
			}
			$('#slider'+el.id+sid).css({ opacity: 0, 'background-image': 'url('+images[el.id][imagePos[el.id]]+')' });
			$('#slider'+el.id+sid).animate({ opacity: 1 }, 300);
			squarePos[el.id]++;
		};
		// navigation
		$.setNavigation = function(el, nav1, nav2){
			if (nav1) {
				// create prev and next
				$(el).append("<div id='sliderNavigation-"+el.id+"'></div>");
				if (params[el.id].hideNavigation) {					$('#sliderNavigation-'+el.id).hide();				}				$('#sliderNavigation-'+el.id).append("<a href='#' id='navPrev-"+el.id+"' class='navPrev'>></a>");
				$('#sliderNavigation-'+el.id).append("<a href='#' id='navNext-"+el.id+"' class='navNext'><</a>");
				$('#navPrev-'+el.id).css({
					'position' 	: 'absolute',
					'top'		: params[el.id].height/2 - 15,
					'left'		: 0,
					'z-index' 	: 1001,
					'line-height': '30px',
					'opacity'	: params[el.id].opacity
				}).click( function(e){
					e.preventDefault();
					$.transition(el,'prev');
					$.transitionCall(el);
				}).mouseover( function(){ $('#sliderNavigation-'+el.id).show() });
				$('#navNext-'+el.id).css({
					'position' 	: 'absolute',
					'top'		: params[el.id].height/2 - 15,
					'right'		: 0,
					'z-index' 	: 1001,
					'line-height': '30px',
					'opacity'	: params[el.id].opacity
				}).click( function(e){
					e.preventDefault();
					$.transition(el);
					$.transitionCall(el);
				}).mouseover( function(){ $('#sliderNavigation-'+el.id).show() });
			}
			if (nav2) {
				// image buttons
				$("<div id='navContainer-"+el.id+"' class='navContainer clearFix'></div>").appendTo($('#vhqSlider-'+el.id));
				$("<div id='navButtons-"+el.id+"' class='navButtons'></div>").appendTo($('#navContainer-'+el.id));
				for(k=1;k<images[el.id].length+1;k++){
					$('#navButtons-'+el.id).append("<a href='#' class='navButton-"+el.id+" navButton-"+k+"' id='navButton-"+el.id+"-"+k+"'>"+k+"</a>");
				}
				$.each($('.navButton-'+el.id), function(i,item){
					$(item).click( function(e){
						$('.navButton-'+el.id).removeClass('navActive');
						$(this).addClass('navActive');
						e.preventDefault();
						$.transition(el,i);
						$.transitionCall(el);
					})
				});
				$('#sliderNavigation-'+el.id+' a').mouseout(function(){
					$('#sliderNavigation-'+el.id).hide();
					params[el.id].pause = false;
				});
				$pos = ($("#navContainer-"+el.id).width() - $("#navButtons-"+el.id).outerWidth()) / 2;
				$("#navButtons-"+el.id).css({
					'margin-left' 	: $pos,
					'position'		: 'relative'
				});
			}
		}
		// effects
		$.effect = function(el){

			effA = ['random','swirl','rain','straight'];
			if(params[el.id].effect == '')
				eff = effA[Math.floor(Math.random()*(effA.length))];
			else
				eff = params[el.id].effect;

			order[el.id] = new Array();

			if(eff == 'random'){
				counter = 0;
				  for(i=1;i <= params[el.id].sph;i++){
				  	for(j=1; j <= params[el.id].spw; j++){
				  		order[el.id][counter] = i+''+j;
						counter++;
				  	}
				  }
				$.random(order[el.id]);
			}

			if(eff == 'rain')	{
				$.rain(el);
			}

			if(eff == 'swirl')
				$.swirl(el);

			if(eff == 'straight')
				$.straight(el);

			reverse[el.id] *= -1;
			if(reverse[el.id] > 0){
				order[el.id].reverse();
			}

		}


		// shuffle array function
		$.random = function(arr) {

		  var i = arr.length;
		  if ( i == 0 ) return false;
		  while ( --i ) {
		     var j = Math.floor( Math.random() * ( i + 1 ) );
		     var tempi = arr[i];
		     var tempj = arr[j];
		     arr[i] = tempj;
		     arr[j] = tempi;
		   }
		}

		//swirl effect by milos popovic
		$.swirl = function(el){

			var n = params[el.id].sph;
			var m = params[el.id].spw;

			var x = 1;
			var y = 1;
			var going = 0;
			var num = 0;
			var c = 0;

			var dowhile = true;

			while(dowhile) {

				num = (going==0 || going==2) ? m : n;

				for (i=1;i<=num;i++){

					order[el.id][c] = x+''+y;
					c++;

					if(i!=num){
						switch(going){
							case 0 : y++; break;
							case 1 : x++; break;
							case 2 : y--; break;
							case 3 : x--; break;

						}
					}
				}

				going = (going+1)%4;

				switch(going){
					case 0 : m--; y++; break;
					case 1 : n--; x++; break;
					case 2 : m--; y--; break;
					case 3 : n--; x--; break;
				}

				check = $.max(n,m) - $.min(n,m);
				if(m<=check && n<=check)
					dowhile = false;

			}
		}

		// rain effect
		$.rain = function(el){
			var n = params[el.id].sph;
			var m = params[el.id].spw;

			var c = 0;
			var to = to2 = from = 1;
			var dowhile = true;


			while(dowhile){

				for(i=from;i<=to;i++){
					order[el.id][c] = i+''+parseInt(to2-i+1);
					c++;
				}

				to2++;

				if(to < n && to2 < m && n<m){
					to++;
				}

				if(to < n && n>=m){
					to++;
				}

				if(to2 > m){
					from++;
				}

				if(from > to) dowhile= false;

			}

		}

		// straight effect
		$.straight = function(el){
			counter = 0;
			for(i=1;i <= params[el.id].sph;i++){
				for(j=1; j <= params[el.id].spw; j++){
					order[el.id][counter] = i+''+j;
					counter++;
				}

			}
		}

		$.min = function(n,m){
			if (n>m) return m;
			else return n;
		}

		$.max = function(n,m){
			if (n<m) return m;
			else return n;
		}

	this.each (
		function(){ init(this); }
	);


	};


	// default values
	$.fn.vhqSlider.defaults = {
		width: 565, // width of slider panel
		height: 290, // height of slider panel
		spw: 7, // squares per width
		sph: 5, // squares per height
		delay: 3000, // delay between images in ms
		sDelay: 30, // delay beetwen squares in ms
		opacity: 0.7, // opacity of title and navigation
		titleSpeed: 500, // speed of title appereance in ms
		effect: '', // random, swirl, rain, straight
		navigation: true, // prev next and buttons
		links : true, // show images as links
		hoverPause: true // pause on hover
	};

})(jQuery);
var vhqMenu={
	//Specify full URL to down and right arrow images (23 is padding-right added to top level LIs with drop downs):
	arrowimages: {enable:false, down:['downarrowclass', 'down.gif', 23], right:['rightarrowclass', 'right.gif']},
	transition: {overtime:300, outtime:300}, //duration of slide in/ out animation, in milliseconds
	shadow: {enable:false, offsetx:5, offsety:5}, //enable shadow?
	showhidedelay: {showdelay: 100, hidedelay: 200}, //set delay in milliseconds before sub menus appear and disappear, respectively

	///////Stop configuring beyond here///////////////////////////

	detectwebkit: navigator.userAgent.toLowerCase().indexOf("applewebkit")!=-1, //detect WebKit browsers (Safari, Chrome etc)
	detectie6: document.all && !window.XMLHttpRequest,

	getajaxmenu:function($, setting){ //function to fetch external page containing the panel DIVs
		var $menucontainer=$('#'+setting.contentsource[0]) //reference empty div on page that will hold menu
		$menucontainer.html("Loading Menu...")
		$.ajax({
			url: setting.contentsource[1], //path to external menu file
			async: true,
			error:function(ajaxrequest){
				$menucontainer.html('Error fetching content. Server Response: '+ajaxrequest.responseText)
			},
			success:function(content){
				$menucontainer.html(content)
				vhqMenu.buildmenu($, setting)
			}
		})
	},


	buildmenu:function($, setting){
		var vhqSmoothMenu=vhqMenu
		var $mainmenu=$("#"+setting.mainmenuid+">ul"); //reference main menu UL
		if ($mainmenu.length < 1) {
			$mainmenu=$("."+setting.mainmenuid+">ul");
		}
		if (setting.classname) {
			$mainmenu.parent().get(0).className=setting.classname || "vhqMenu"
		}
		var $headers=$mainmenu.find("ul").parent();
		$headers.hover(
			function(e){
				$(this).children('a:eq(0)').addClass('selected')
			},
			function(e){
				$(this).children('a:eq(0)').removeClass('selected')
			}
		)
		$headers.each(function(i){ //loop through each LI header
			var $curobj=$(this).css({zIndex: 100-i}) //reference current LI header
			var $subul=$(this).find('ul:eq(0)').css({display:'block'})
			$subul.data('timers', {})
			this._dimensions={w:this.offsetWidth, h:this.offsetHeight, subulw:$subul.outerWidth(), subulh:$subul.outerHeight()}
			this.istopheader=$curobj.parents("ul.vhqmsul").length==1? true : false //is top level header?;
			$subul.css({top:this.istopheader && setting.orientation!='v'? this._dimensions.h+"px" : 5})
			if (vhqSmoothMenu.arrowimages.enable == true) {
				$curobj.children("a:eq(0)").css(this.istopheader? {paddingRight: vhqSmoothMenu.arrowimages.down[2]} : {}).append( //add arrow images
					'<img src="'+ (this.istopheader && setting.orientation!='v'? vhqSmoothMenu.arrowimages.down[1] : vhqSmoothMenu.arrowimages.right[1])
					+'" class="' + (this.istopheader && setting.orientation!='v'? vhqSmoothMenu.arrowimages.down[0] : vhqSmoothMenu.arrowimages.right[0])
					+ '" style="border:0;" />'
				)
			}
			if (vhqSmoothMenu.shadow.enable){
				this._shadowoffset={x:(this.istopheader?$subul.offset().left+vhqSmoothMenu.shadow.offsetx : this._dimensions.w), y:(this.istopheader? $subul.offset().top+vhqSmoothMenu.shadow.offsety : $curobj.position().top)} //store this shadow's offsets
				if (this.istopheader)
					$parentshadow=$(document.body)
				else{
					var $parentLi=$curobj.parents("li:eq(0)")
					$parentshadow=$parentLi.get(0).$shadow
				}
				this.$shadow=$('<div class="ddshadow'+(this.istopheader? ' toplevelshadow' : '')+'"></div>').prependTo($parentshadow).css({left:this._shadowoffset.x+'px', top:this._shadowoffset.y+'px'})  //insert shadow DIV and set it to parent node for the next shadow div
			}
			$curobj.hover(
				function(e){
					var $targetul=$subul //reference UL to reveal
					var header=$curobj.get(0) //reference header LI as DOM object
					clearTimeout($targetul.data('timers').hidetimer)
					$targetul.data('timers').showtimer=setTimeout(function(){
						header._offsets={left:$curobj.offset().left, top:$curobj.offset().top}
						var vhqDir = $('body').css('direction');
						if (vhqDir.toLowerCase() == 'rtl') {
							if (vhqSmoothMenu.arrowimages.enable == true) {
								var paddingSize = 13;
							} else {
								var paddingSize = 0;
							}
							var menuleft=header.istopheader && setting.orientation!='v'? (($targetul.width() - header._dimensions.w) * -1) + paddingSize : ((header._dimensions.w*70)/100) * -1
							menuleft=(header._offsets.left+menuleft+header._dimensions.subulw > $(window).width())? (header.istopheader && setting.orientation!='v'? -header._dimensions.subulw+header._dimensions.w : -header._dimensions.w) : menuleft //calculate this sub menu's offsets from its parent
							menuleft=((header._offsets.left+header._dimensions.subulw)+(menuleft-header._dimensions.subulw) < 0)? (header.istopheader && setting.orientation!='v'? 0 : header._dimensions.w) : menuleft //calculate this sub menu's offsets from its parent
						} else {
							var menuleft=header.istopheader && setting.orientation!='v'? 0 : ((header._dimensions.w*70)/100);
							menuleft=(header._offsets.left+menuleft+header._dimensions.subulw>$(window).width())? (header.istopheader && setting.orientation!='v'? -header._dimensions.subulw+header._dimensions.w : -header._dimensions.w) : menuleft //calculate this sub menu's offsets from its parent
							//vhq
							menuleft=((header._offsets.left+header._dimensions.subulw)+(menuleft-header._dimensions.subulw) < 0)? (header.istopheader && setting.orientation!='v'? 0 : header._dimensions.w) : menuleft //calculate this sub menu's offsets from its parent
						}
						if ($targetul.queue().length<=1){ //if 1 or less queued animations
							$targetul.css({left:menuleft+"px", width:header._dimensions.subulw+'px'}).animate({height:'show',opacity:'show'}, vhqMenu.transition.overtime)
							if (vhqSmoothMenu.shadow.enable){
								var shadowleft=header.istopheader? $targetul.offset().left+vhqMenu.shadow.offsetx : menuleft
								var shadowtop=header.istopheader?$targetul.offset().top+vhqSmoothMenu.shadow.offsety : header._shadowoffset.y
								if (!header.istopheader && vhqMenu.detectwebkit){ //in WebKit browsers, restore shadow's opacity to full
									header.$shadow.css({opacity:1})
								}
								header.$shadow.css({overflow:'', width:header._dimensions.subulw+'px', left:shadowleft+'px', top:shadowtop+'px'}).animate({height:header._dimensions.subulh+'px'}, vhqMenu.transition.overtime)
							}
						}
					}, vhqMenu.showhidedelay.showdelay)
				},
				function(e){
					var $targetul=$subul
					var header=$curobj.get(0)
					clearTimeout($targetul.data('timers').showtimer)
					$targetul.data('timers').hidetimer=setTimeout(function(){
						$targetul.animate({height:'hide', opacity:'hide'}, vhqMenu.transition.outtime)
						if (vhqSmoothMenu.shadow.enable){
							if (vhqMenu.detectwebkit){ //in WebKit browsers, set first child shadow's opacity to 0, as "overflow:hidden" doesn't work in them
								header.$shadow.children('div:eq(0)').css({opacity:0})
							}
							header.$shadow.css({overflow:'hidden'}).animate({height:0}, vhqMenu.transition.outtime)
						}
					}, vhqMenu.showhidedelay.hidedelay)
				}
			) //end hover
		}) //end $headers.each()
		$mainmenu.find("ul").css({display:'none', visibility:'visible'})
	},

	init:function(setting){
		if (typeof setting.customtheme=="object" && setting.customtheme.length==2){ //override default menu colors (default/hover) with custom set?
			var mainmenuid='#'+setting.mainmenuid
			var mainselector=(setting.orientation=="v")? mainmenuid : mainmenuid+', '+mainmenuid
			document.write('<style type="text/css">\n'
				+mainselector+' ul li a {background:'+setting.customtheme[0]+';}\n'
				+mainmenuid+' ul li a:hover {background:'+setting.customtheme[1]+';}\n'
			+'</style>')
		}
		this.shadow.enable=(document.all && !window.XMLHttpRequest)? false : this.shadow.enable //in IE6, always disable shadow
		jQuery(document).ready(function($){ //ajax menu?
			if (typeof setting.contentsource=="object"){ //if external ajax menu
				vhqMenu.getajaxmenu($, setting)
			}
			else{ //else if markup menu
				vhqMenu.buildmenu($, setting)
			}
		})
	}
} //end vhqMenu variablefunction doSubmit(e) {	$e = $('#' + e);	$action = '/forms/s';	$dataString = $e.serialize();	$fields	= '';	$e.find('.vff').each(function() {		if($e.attr('id').length) {			$fields = $fields + $(this).attr('id').substr(2) + ',';		}	});	$dataString = $dataString + '&df=' + $fields;	$.ajax({		type: "POST",		url: $action,		data: $dataString,		success: function(returned) {			vhqProccessAjax(returned);		}	});	return false;}
$bbq = 'off';
$(document).ready(function() {	$('.vhqFormModule').submit(function() {		$(this).find('.vhqFrmSubmitButton').html('<img src="/globals/base/images/star10.gif" border="0">').attr('disabled', true);		$(this).find('.messageBox').fadeOut().html('');		$fileFields = $(this).find('input:file');		if ($fileFields.length > 0) {			$(this).attr('target', 'vhqUpload').attr('action', '/forms/u').attr('enctype', 'multipart/form-data');		} else {			doSubmit($(this).attr('id'));			return false;		}	});	$('.ddParent').live('change', function() {		$fe = $(this);		$ft = $fe.attr('rel');		$fv = $fe.val();		$fe.attr('disabled', 'disabled');		$('#' + $ft).html('');		$.ajax({			type: 'POST',			url: '/forms/lsf',			data: {d: $ft, v: $fv, c: 1},			success: function(returned) {				vhqProccessAjax(returned);				$fe.attr('disabled', false);			}		});	});	$('.vhqAccMenu').vhqAccMenu();
	$('.pagingLinks > a').live('click', function() {		if ($(this).parent().parent().attr('class') == 'commentsPaging') {			$cc = $('.commentsList');			$cs = true;		} else {			$cc = $('.pagingList');			$cs = false;		}
		if ($cc.length > 0) {
			$url = $(this).attr('href');
			if ($bbq == 'on' && $cs == false) {
				location.href = '#' + $url;
			} else {
				$cc.html('<br><br><br><br><div align="center"><img src="/globals/base/images/star4.gif" border="0"></div><br><br>');
				$.post($url, {}, function(data) {
					$cc.html(data);
				})
			}
			return false;
		}
	});	$('.rotatorPhoto').live('click', function(event) {		$url	= $(this).attr('href');		$.vhqModal({			className: 'modal galleryModal',			movable: false,			width: '900px',			data: {},			url: $url,			idAppend: 'prot',			allowEscape: true,			keepOverlay: true		});		return false;	});
	$('.messageBox').live('click', function() {
		$(this).fadeOut();
	});	$('.tablesBlocksSearchForm').live('submit', function(e) {		$frmdata = $(this).serialize();		$frmaction = $(this).attr('action');		$frmmethod = $(this).attr('method');		$(this).next().html('<br><br><div align="center"><img src="/globals/base/images/star4.gif" border="0"></div><br><br>');		$.ajax({			type: $frmmethod,			url: $frmaction,			data: $frmdata,			success: function($response) {				vhqProccessAjax($response);			}		});		e.preventDefault();	});
	$('#postComments').live('click', function(e) {
		$('#parentComment').val(0);
		if ($('#commentsForm').is(':visible')) {
			$('#commentsForm').slideUp();
		} else {
			$('#commentsForm').slideDown();
		}
		e.preventDefault();
	});
	$('.commentReply').live('click', function(e) {
		$('#parentComment').val($(this).parent().attr('id').substr(3));
		if ($('#commentsForm').is(':visible')) {
			$('#commentsForm').slideUp().slideDown();
		} else {
			$('#commentsForm').slideDown();
		}
		e.preventDefault();
	});
	$('#vhqCommentsForm').live('submit', function(event) {
		$btm = $(this).find('button:submit');
		$val = $btm.html();
		$btm.html('<img src="/globals/base/images/star10.gif" border="0">').attr('disabled', true);
		$('.messageBox').fadeOut().html('');
		$action		= $(this).attr('action');
		$dataString	= $(this).serialize(this);
		$.ajax({
			type: "POST",
			url: $action,
			data: $dataString,
			success: function(returned) {
				$btm.html($val).attr('disabled', false);
				vhqProccessAjax(returned);
			}
		});
		event.preventDefault();
	});
	$('.commentsMessages').live('click', function() {
		$(this).fadeOut();
	});
	/*if ($('.commentsList').length > 0) {
		$('.commentsList > .pagingLinks > a').live('click', function() {
			$('.commentsList').html('<br><br><br><br><div align="center"><img src="/globals/base/images/star4.gif" border="0"></div><br><br>');
			$.post($(this).attr('href'), {}, function(data) {
				$('.commentsList').html(data);
			});
			return false;
		});
	}*/

	$('.ratingStars').live('mouseenter', function() {
			$(this).bind('mouseleave', function(){
				$(this).removeClass('selectStars').unbind('mouseleave');
			});
			$(this).addClass('selectStars');
	}).live('click', function() {
		$('#rateInput').val($(this).attr('rel'));
		$('#vhqRatingsForm').submit();
	});

	$('#vhqRatingsForm').live('submit', function(event) {
		$('.ratingLoader').show();
		$action		= $(this).attr('action');
		$dataString	= $(this).serialize(this);
		$.ajax({
			type: "POST",
			url: $action,
			data: $dataString,
			success: function(returned) {
				$('.ratingLoader').hide();
				vhqProccessAjax(returned);
			}
		});
		event.preventDefault();
	});

	$('.w2LikeBt').live('click', function() {
		$(this).hide().parent().addClass('w2LikeWait');
		$url = $(this).attr('href');
		$.ajax({
			type: "POST",
			url: $url,
			data: {},
			success: function(returned) {
				$('.w2LikeWait').each(function() {
					$c = ($(this).children('a').html() * 1) + 1;
					$(this).removeClass('w2LikeWait').children('a').html($c).show();
				})
				vhqProccessAjax(returned);
			}
		});
		return false;
	});

	$('#baseDialog').vhqDialog();
	$('#w2Email').live('click', function(e) {
		$url	= $(this).attr('href');
		$title	= $(this).attr('title');
		$.vhqModal({
			movable: true,
			width: '700px',
			data: {u: $url, t: $title},
			url: '/web2/sae',
			allowEscape: true,			keepOverlay: true
		});
		return false;
	});
	$('#vhqShareByEmailForm').live('submit', function(event) {		$vhqSBEBT = $("#vhqShareByEmailSubmitButton").html();
		$("#vhqShareByEmailSubmitButton").html('<img src="/globals/base/images/star10.gif" border="0">').attr("disabled", true);
		$url = $(this).attr('action');
		$method = $(this).attr('method');
		$dataString = $(this).serialize();
		$.ajax({
			type: $method,
			url: $url,
			data: $dataString,
			success: function(returned) {
				vhqProccessAjax(returned);
				$("#vhqShareByEmailSubmitButton").html($vhqSBEBT).attr("disabled", false);
			}
		});
		event.preventDefault();
	});

	$('.bbqtrgr').live('click', function(event) {
		if ($bbq == 'on') {
			$url = $(this).attr('href');
			location.href = '#!' + $url;
			$('#categoriesBlock').vhqCloseAccordion();
			return false;
		};
	});
	$(window).bind('hashchange', function(e) {
		if ($bbq == 'on') {
			$backUrl = $.param.fragment().substr(1);
			if (!$backUrl) {
				$backUrl = '#';
			}
			$backUrl = $.URLEncode($backUrl);
			$('.pagingList').html('<br><br><div align="center"><img src="/globals/base/images/star4.gif" border="0"></div><br><br>');
			$.post($backUrl, {}, function(data) {
				$('.pagingList').html(data);
			});
		}
		return false;
	});
	$(window).trigger('hashchange');

	$('.baseContainer').show();
});
function loadComments() {
	$('.commentsList').html('<br><br><br><br><div align="center"><img src="/globals/base/images/star4.gif" border="0"></div><br><br>');
	$.post('/comments/c/?d=' + $('.commentsList').attr('id'), {}, function(data) {
		$('.commentsList').html(data);
	});
}
