/*(function(d){d.tools=d.tools||{};d.tools.tabs={version:"1.0.4",conf:{tabs:"a",current:"current",onBeforeClick:null,onClick:null,effect:"default",initialIndex:0,event:"click",api:false,rotate:false},addEffect:function(e,f){c[e]=f}};var c={"default":function(f,e){this.getPanes().hide().eq(f).show();e.call()},fade:function(g,e){var f=this.getConf(),j=f.fadeOutSpeed,h=this.getPanes();if(j){h.fadeOut(j)}else{h.hide()}h.eq(g).fadeIn(f.fadeInSpeed,e)},slide:function(f,e){this.getPanes().slideUp(200);this.getPanes().eq(f).slideDown(400,e)},ajax:function(f,e){this.getPanes().eq(0).load(this.getTabs().eq(f).attr("href"),e)}};var b;d.tools.tabs.addEffect("horizontal",function(f,e){if(!b){b=this.getPanes().eq(0).width()}this.getCurrentPane().animate({width:0},function(){d(this).hide()});this.getPanes().eq(f).animate({width:b},function(){d(this).show();e.call()})});function a(g,h,f){var e=this,j=d(this),i;d.each(f,function(k,l){if(d.isFunction(l)){j.bind(k,l)}});d.extend(this,{click:function(k,n){var o=e.getCurrentPane();var l=g.eq(k);if(typeof k=="string"&&k.replace("#","")){l=g.filter("[href*="+k.replace("#","")+"]");k=Math.max(g.index(l),0)}if(f.rotate){var m=g.length-1;if(k<0){return e.click(m,n)}if(k>m){return e.click(0,n)}}if(!l.length){if(i>=0){return e}k=f.initialIndex;l=g.eq(k)}if(k===i){return e}n=n||d.Event();n.type="onBeforeClick";j.trigger(n,[k]);if(n.isDefaultPrevented()){return}c[f.effect].call(e,k,function(){n.type="onClick";j.trigger(n,[k])});n.type="onStart";j.trigger(n,[k]);if(n.isDefaultPrevented()){return}i=k;g.removeClass(f.current);l.addClass(f.current);return e},getConf:function(){return f},getTabs:function(){return g},getPanes:function(){return h},getCurrentPane:function(){return h.eq(i)},getCurrentTab:function(){return g.eq(i)},getIndex:function(){return i},next:function(){return e.click(i+1)},prev:function(){return e.click(i-1)},bind:function(k,l){j.bind(k,l);return e},onBeforeClick:function(k){return this.bind("onBeforeClick",k)},onClick:function(k){return this.bind("onClick",k)},unbind:function(k){j.unbind(k);return e}});g.each(function(k){d(this).bind(f.event,function(l){e.click(k,l);return false})});if(location.hash){e.click(location.hash)}else{if(f.initialIndex===0||f.initialIndex>0){e.click(f.initialIndex)}}h.find("a[href^=#]").click(function(k){e.click(d(this).attr("href"),k)})}d.fn.tabs=function(i,f){var g=this.eq(typeof f=="number"?f:0).data("tabs");if(g){return g}if(d.isFunction(f)){f={onBeforeClick:f}}var h=d.extend({},d.tools.tabs.conf),e=this.length;f=d.extend(h,f);this.each(function(l){var j=d(this);var k=j.find(f.tabs);if(!k.length){k=j.children()}var m=i.jquery?i:j.children(i);if(!m.length){m=e==1?d(i):j.parent().find(i)}g=new a(k,m,f);j.data("tabs",g)});return f.api?g:this}})(jQuery); */

jQuery.easing['jswing'] = jQuery.easing['swing'];jQuery.extend( jQuery.easing,{	def: 'easeOutQuad',	swing: function (x, t, b, c, d) {		return jQuery.easing[jQuery.easing.def](x, t, b, c, d);	},	easeInQuad: function (x, t, b, c, d) {		return c*(t/=d)*t + b;	},	easeOutQuad: function (x, t, b, c, d) {		return -c *(t/=d)*(t-2) + b;	},	easeInOutQuad: function (x, t, b, c, d) {		if ((t/=d/2) < 1) return c/2*t*t + b;		return -c/2 * ((--t)*(t-2) - 1) + b;	},	easeInCubic: function (x, t, b, c, d) {		return c*(t/=d)*t*t + b;	},	easeOutCubic: function (x, t, b, c, d) {		return c*((t=t/d-1)*t*t + 1) + b;	},	easeInOutCubic: function (x, t, b, c, d) {		if ((t/=d/2) < 1) return c/2*t*t*t + b;		return c/2*((t-=2)*t*t + 2) + b;	},	easeInQuart: function (x, t, b, c, d) {		return c*(t/=d)*t*t*t + b;	},	easeOutQuart: function (x, t, b, c, d) {		return -c * ((t=t/d-1)*t*t*t - 1) + b;	},	easeInOutQuart: function (x, t, b, c, d) {		if ((t/=d/2) < 1) return c/2*t*t*t*t + b;		return -c/2 * ((t-=2)*t*t*t - 2) + b;	},	easeInQuint: function (x, t, b, c, d) {		return c*(t/=d)*t*t*t*t + b;	},	easeOutQuint: function (x, t, b, c, d) {		return c*((t=t/d-1)*t*t*t*t + 1) + b;	},	easeInOutQuint: function (x, t, b, c, d) {		if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;		return c/2*((t-=2)*t*t*t*t + 2) + b;	},	easeInSine: function (x, t, b, c, d) {		return -c * Math.cos(t/d * (Math.PI/2)) + c + b;	},	easeOutSine: function (x, t, b, c, d) {		return c * Math.sin(t/d * (Math.PI/2)) + b;	},	easeInOutSine: function (x, t, b, c, d) {		return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;	},	easeInExpo: function (x, t, b, c, d) {		return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;	},	easeOutExpo: function (x, t, b, c, d) {		return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;	},	easeInOutExpo: function (x, t, b, c, d) {		if (t==0) return b;		if (t==d) return b+c;		if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;		return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;	},	easeInCirc: function (x, t, b, c, d) {		return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;	},	easeOutCirc: function (x, t, b, c, d) {		return c * Math.sqrt(1 - (t=t/d-1)*t) + b;	},	easeInOutCirc: function (x, t, b, c, d) {		if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;		return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;	},	easeInElastic: function (x, t, b, c, d) {		var s=1.70158;var p=0;var a=c;		if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;		if (a < Math.abs(c)) { a=c; var s=p/4; }		else var s = p/(2*Math.PI) * Math.asin (c/a);		return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;	},	easeOutElastic: function (x, t, b, c, d) {		var s=1.70158;var p=0;var a=c;		if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;		if (a < Math.abs(c)) { a=c; var s=p/4; }		else var s = p/(2*Math.PI) * Math.asin (c/a);		return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;	},	easeInOutElastic: function (x, t, b, c, d) {		var s=1.70158;var p=0;var a=c;		if (t==0) return b;  if ((t/=d/2)==2) return b+c;  if (!p) p=d*(.3*1.5);		if (a < Math.abs(c)) { a=c; var s=p/4; }		else var s = p/(2*Math.PI) * Math.asin (c/a);		if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;		return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;	},	easeInBack: function (x, t, b, c, d, s) {		if (s == undefined) s = 1.70158;		return c*(t/=d)*t*((s+1)*t - s) + b;	},	easeOutBack: function (x, t, b, c, d, s) {		if (s == undefined) s = 1.70158;		return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;	},	easeInOutBack: function (x, t, b, c, d, s) {		if (s == undefined) s = 1.70158; 		if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;		return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;	},	easeInBounce: function (x, t, b, c, d) {		return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b;	},	easeOutBounce: function (x, t, b, c, d) {		if ((t/=d) < (1/2.75)) {			return c*(7.5625*t*t) + b;		} else if (t < (2/2.75)) {			return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;		} else if (t < (2.5/2.75)) {			return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;		} else {			return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;		}	},	easeInOutBounce: function (x, t, b, c, d) {		if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;		return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;	}});;(function(b){function H(){v.hide();r.onerror=r.onload=null;F&&F.abort();l.empty()}function Q(){b.fancybox('<p id="fancybox_error">The requested content cannot be loaded.<br />Please try again later.</p>',{scrolling:"no",padding:20,transitionIn:"none",transitionOut:"none"})}function B(){H();var a=q[s];e=b.extend({},b.fn.fancybox.defaults,typeof b(a).data("fancybox")=="undefined"?e:b(a).data("fancybox"));var d,f,o=a.title||b(a).title||e.title||"";if(a.nodeName&&!e.orig)e.orig=b(a).children("img:first").length?b(a).children("img:first"):b(a);if(o==""&&e.orig)o=e.orig.attr("alt");d=a.nodeName&&/^(?:javascript|#)/i.test(a.href)?e.href||null:e.href||a.href||null;if(e.type){f=e.type;if(!d)d=e.content}else if(e.content)f="html";else if(d)if(d.match(I))f="image";else if(d.match(T))f="swf";else if(b(a).hasClass("iframe"))f="iframe";else if(d.match(/#/)){a=d.substr(d.indexOf("#"));f=b(a).length>0?"inline":"ajax"}else f="ajax";else f="inline";e.type=f;e.href=d;e.title=o;if(e.autoDimensions&&e.type!=="iframe"&&e.type!=="swf"){e.width="auto";e.height="auto"}if(e.modal){e.overlayShow=true;e.hideOnOverlayClick=false;e.hideOnContentClick=false;e.enableEscapeButton=false;e.showCloseButton=false}if(b.isFunction(e.onStart))if(e.onStart(q,s,e)===false){h=false;return}l.css("padding",t+e.padding+e.margin);b(".fancybox-inline-tmp").unbind("fancybox-cancel").bind("fancybox-change",function(){b(this).replaceWith(i.children())});switch(f){case "html":l.html(e.content);G();break;case "inline":b('<div class="fancybox-inline-tmp" />').hide().insertBefore(b(a)).bind("fancybox-cleanup",function(){b(this).replaceWith(i.children())}).bind("fancybox-cancel",function(){b(this).replaceWith(l.children())});b(a).appendTo(l);G();break;case "image":h=false;b.fancybox.showActivity();r=new Image;r.onerror=function(){Q()};r.onload=function(){r.onerror=null;r.onload=null;U()};r.src=d;break;case "swf":var u="",w="";u+='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+e.width+'" height="'+e.height+'"><param name="movie" value="'+d+'"></param>';b.each(e.swf,function(p,R){u+='<param name="'+p+'" value="'+R+'"></param>';w+=" "+p+'="'+R+'"'});u+='<embed src="'+d+'" type="application/x-shockwave-flash" width="'+e.width+'" height="'+e.height+'"'+w+"></embed></object>";l.html(u);G();break;case "ajax":a=d.split("#",2);f=e.ajax.data||{};if(a.length>1){d=a[0];typeof f=="string"?(f+="&selector="+a[1]):(f.selector=a[1])}h=false;b.fancybox.showActivity();F=b.ajax(b.extend(e.ajax,{url:d,data:f,error:Q,success:function(p){if(F.status==200){l.html(p);G()}}}));break;case "iframe":b('<iframe id="fancybox-frame" name="fancybox-frame'+(new Date).getTime()+'" frameborder="0" hspace="0" scrolling="'+e.scrolling+'" src="'+e.href+'"></iframe>').appendTo(l);J();break}}function U(){h=true;e.width=r.width;e.height=r.height;b("<img />").attr({id:"fancybox-img",src:r.src,alt:e.title}).appendTo(l);J()}function G(){l.width(e.width);l.height(e.height);if(e.width=="auto")e.width=l.width();if(e.height=="auto")e.height=l.height();J()}function J(){v.hide();if(g.is(":visible")&&b.isFunction(c.onCleanup))if(c.onCleanup(j,n,c)===false){b.event.trigger("fancybox-cancel");h=false;return}j=q;n=s;c=e;i.get(0).scrollTop=0;i.get(0).scrollLeft=0;if(c.overlayShow){K&&b("select:not(#fancybox-tmp select)").filter(function(){return this.style.visibility!=="hidden"}).css({visibility:"hidden"}).one("fancybox-cleanup",function(){this.style.visibility="inherit"});y.css({"background-color":c.overlayColor,opacity:c.overlayOpacity}).unbind().show()}m=V();W();if(g.is(":visible")){b(z.add(C).add(D)).hide();var a=g.position();k={top:a.top,left:a.left,width:g.width(),height:g.height()};var d=k.width==m.width&&k.height==m.height;i.fadeOut(c.changeFade,function(){function f(){i.html(l.contents()).fadeIn(c.changeFade,L)}b.event.trigger("fancybox-change");i.css({top:c.padding,left:c.padding,width:Math.max(k.width-c.padding*2,1),height:Math.max(k.height-c.padding*2,1)}).empty().css("overflow","hidden");A.prop=0;b(A).animate({prop:1},{duration:d?0:c.changeSpeed,easing:c.easingChange,step:M,complete:f})})}else{g.css("opacity",1);if(c.transitionIn=="elastic"){k=S();i.css({top:c.padding,left:c.padding,width:Math.max(k.width-c.padding*2,1),height:Math.max(k.height-c.padding*2,1)}).html(l.contents());g.css(k).show();if(c.opacity)m.opacity=0;A.prop=0;b(A).animate({prop:1},{duration:c.speedIn,easing:c.easingIn,step:M,complete:L})}else{i.css({top:c.padding,left:c.padding,width:Math.max(m.width-c.padding*2,1),height:Math.max(m.height-c.padding*2-x,1)}).html(l.contents());g.css(m).fadeIn(c.transitionIn=="none"?0:c.speedIn,L)}}}function M(a){var d=Math.round(k.width+(m.width-k.width)*a),f=Math.round(k.height+(m.height-k.height)*a),o=Math.round(k.top+(m.top-k.top)*a),u=Math.round(k.left+(m.left-k.left)*a);g.css({width:d+"px",height:f+"px",top:o+"px",left:u+"px"});d=Math.max(d-c.padding*2,0);f=Math.max(f-(c.padding*2+x*a),0);i.css({width:d+"px",height:f+"px"});if(typeof m.opacity!=="undefined")g.css("opacity",a<0.5?0.5:a)}function L(){i.css("overflow",overflow=c.scrolling=="auto"?c.type=="image"||c.type=="iframe"||c.type=="swf"?"hidden":"auto":c.scrolling=="yes"?"auto":"visible");if(!b.support.opacity){i.get(0).style.removeAttribute("filter");g.get(0).style.removeAttribute("filter")}b("#fancybox-title").show();c.hideOnContentClick&&i.one("click",b.fancybox.close);c.hideOnOverlayClick&&y.one("click",b.fancybox.close);c.showCloseButton&&z.show();X();b(window).bind("resize.fb",b.fancybox.center);c.centerOnScroll?b(window).bind("scroll.fb",b.fancybox.center):b(window).unbind("scroll.fb");b.isFunction(c.onComplete)&&c.onComplete(j,n,c);h=false;Y()}function V(){var a=N(),d={},f=c.margin,o=c.autoScale,u=(t+f)*2,w=(t+f)*2,p=c.padding*2;if(c.width.toString().indexOf("%")>-1){d.width=a[0]*parseFloat(c.width)/100-t*2;o=false}else d.width=c.width+p;if(c.height.toString().indexOf("%")>-1){d.height=a[1]*parseFloat(c.height)/100-t*2;o=false}else d.height=c.height+p;if(o&&(d.width>a[0]-u||d.height>a[1]-w))if(e.type=="image"||e.type=="swf"){u+=p;w+=p;o=Math.min(Math.min(a[0]-u,c.width)/c.width,Math.min(a[1]-w,c.height)/c.height);d.width=Math.round(o*(d.width-p))+p;d.height=Math.round(o*(d.height-p))+p}else{d.width=Math.min(d.width,a[0]-u);d.height=Math.min(d.height,a[1]-w)}d.top=a[3]+(a[1]-(d.height+t*2))*0.5;d.left=a[2]+(a[0]-(d.width+t*2))*0.5;if(c.autoScale==false){d.top=Math.max(a[3]+f,d.top);d.left=Math.max(a[2]+f,d.left)}return d}function S(){var a=e.orig?b(e.orig):false,d={};if(a&&a.length){a=Z(a);d={width:a.width+c.padding*2,height:a.height+c.padding*2,top:a.top-c.padding-t,left:a.left-c.padding-t}}else{a=N();d={width:1,height:1,top:a[3]+a[1]*0.5,left:a[2]+a[0]*0.5}}return d}function X(){b(document).unbind("keydown.fb").bind("keydown.fb",function(a){if(a.keyCode==27&&c.enableEscapeButton){a.preventDefault();b.fancybox.close()}else if(a.keyCode==37){a.preventDefault();b.fancybox.prev()}else if(a.keyCode==39){a.preventDefault();b.fancybox.next()}});if(b.fn.mousewheel){g.unbind("mousewheel.fb");j.length>1&&g.bind("mousewheel.fb",function(a,d){a.preventDefault();h||d==0||(d>0?b.fancybox.prev():b.fancybox.next())})}if(c.showNavArrows){if(c.cyclic&&j.length>1||n!=0)C.show();if(c.cyclic&&j.length>1||n!=j.length-1)D.show()}}function Y(){if(j.length-1>n){var a=j[n+1].href;if(typeof a!=="undefined"&&a.match(I)){var d=new Image;d.src=a}}if(n>0){a=j[n-1].href;if(typeof a!=="undefined"&&a.match(I)){d=new Image;d.src=a}}}function $(){if(v.is(":visible")){b("div",v).css("top",O*-40+"px");O=(O+1)%12}else clearInterval(P)}function N(){return[b(window).width(),b(window).height(),b(document).scrollLeft(),b(document).scrollTop()]}function Z(a){var d=a.offset();d.top+=parseFloat(a.css("paddingTop"))||0;d.left+=parseFloat(a.css("paddingLeft"))||0;d.top+=parseFloat(a.css("border-top-width"))||0;d.left+=parseFloat(a.css("border-left-width"))||0;d.width=a.width();d.height=a.height();return d}function W(){b("#fancybox-title").remove();x=0;if(c.titleShow!=false){var a=c.title;a=b.isFunction(c.titleFormat)?c.titleFormat(a,j,n,c):aa(a);if(!(!a||a=="")){var d=m.width-c.padding*2;b('<div id="fancybox-title" class="'+("fancybox-title-"+c.titlePosition)+'" />').css({width:d,paddingLeft:c.padding,paddingRight:c.padding}).html(a).appendTo("body");switch(c.titlePosition){case "inside":x=b("#fancybox-title").outerHeight(true)-c.padding;m.height+=x;break;case "over":b("#fancybox-title").css("bottom",c.padding);break;default:b("#fancybox-title").css("bottom",b("#fancybox-title").outerHeight(true)*-1);break}b("#fancybox-title").appendTo(E).hide();K&&b("#fancybox-title span").fixPNG()}}}function aa(a){if(a&&a.length)switch(c.titlePosition){case "inside":return a;case "over":return'<span id="fancybox-title-over">'+a+"</span>";default:return'<span id="fancybox-title-wrap"><span id="fancybox-title-left"></span><span id="fancybox-title-main">'+a+'</span><span id="fancybox-title-right"></span></span>'}return false}function ba(){if(!b("#fancybox-wrap").length){b("body").append(l=b('<div id="fancybox-tmp"></div>'),v=b('<div id="fancybox-loading"><div></div></div>'),y=b('<div id="fancybox-overlay"></div>'),g=b('<div id="fancybox-wrap"></div>'));E=b('<div id="fancybox-outer"></div>').append('<div class="fancy-bg" id="fancy-bg-n"></div><div class="fancy-bg" id="fancy-bg-ne"></div><div class="fancy-bg" id="fancy-bg-e"></div><div class="fancy-bg" id="fancy-bg-se"></div><div class="fancy-bg" id="fancy-bg-s"></div><div class="fancy-bg" id="fancy-bg-sw"></div><div class="fancy-bg" id="fancy-bg-w"></div><div class="fancy-bg" id="fancy-bg-nw"></div>').appendTo(g);E.append(i=b('<div id="fancybox-inner"></div>'),z=b('<a id="fancybox-close"></a>'),C=b('<a href="javascript:;" id="fancybox-left"><span class="fancy-ico" id="fancybox-left-ico"></span></a>'),D=b('<a href="javascript:;" id="fancybox-right"><span class="fancy-ico" id="fancybox-right-ico"></span></a>'));z.click(b.fancybox.close);v.click(b.fancybox.cancel);C.click(function(a){a.preventDefault();b.fancybox.prev()});D.click(function(a){a.preventDefault();b.fancybox.next()});b.support.opacity||E.find(".fancy-bg").fixPNG();if(K){b(z.add(".fancy-ico").add("div",v)).fixPNG();y.get(0).style.setExpression("height","document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight + 'px'");v.get(0).style.setExpression("top","(-20 + (document.documentElement.clientHeight ? document.documentElement.clientHeight/2 : document.body.clientHeight/2 ) + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop )) + 'px'");E.prepend('<iframe id="fancybox-hide-sel-frame" src="javascript:\'\';" scrolling="no" frameborder="0" ></iframe>')}}}var l,v,y,g,E,i,z,C,D,s=0,e={},q=[],n=0,c={},j=[],F=null,r=new Image,I=/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i,T=/[^\.]\.(swf)\s*$/i,P,O=1,k,m,h=false,t=20,A=b.extend(b("<div/>")[0],{prop:0}),x=0,K=!b.support.opacity&&!window.XMLHttpRequest;b.fn.fixPNG=function(){return this.each(function(){var a=b(this).css("backgroundImage");if(a.match(/^url\(["']?(.*\.png)["']?\)$/i)){a=RegExp.$1;b(this).css({backgroundImage:"none",filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod="+(b(this).css("backgroundRepeat")=="no-repeat"?"crop":"scale")+", src='"+a+"')"}).each(function(){var d=b(this).css("position");d!="absolute"&&d!="relative"&&b(this).css("position","relative")}).css("zoom",1)}})};b.fn.fancybox=function(a){b(this).data("fancybox",b.extend({},a));b(this).unbind("click.fb").bind("click.fb",function(d){d.preventDefault();if(!h){h=true;b(this).blur();q=[];s=0;d=b(this).attr("rel")||"";if(!d||d==""||d==="nofollow")q.push(this);else{q=b("a[rel="+d+"], area[rel="+d+"]");s=q.index(this)}B();return false}});return this};b.fancybox=function(a,d){if(!h){h=true;q=[];s=0;if(b.isArray(a)){for(var f=0,o=a.length;f<o;f++)if(typeof a[f]=="object")b(a[f]).data("fancybox",b.extend({},d,a[f]));else a[f]=b({}).data("fancybox",b.extend({content:a[f]},d));q=jQuery.merge(q,a)}else{if(typeof a=="object")b(a).data("fancybox",b.extend({},d,a));else a=b({}).data("fancybox",b.extend({content:a},d));q.push(a)}B()}};b.fancybox.showActivity=function(){clearInterval(P);v.show();P=setInterval($,66)};b.fancybox.hideActivity=function(){v.hide()};b.fancybox.next=function(){return b.fancybox.pos(n+1)};b.fancybox.prev=function(){return b.fancybox.pos(n-1)};b.fancybox.pos=function(a){if(!h){a=parseInt(a);if(a>-1&&j.length>a){s=a;B()}if(c.cyclic&&j.length>1&&a<0){s=j.length-1;B()}if(c.cyclic&&j.length>1&&a>=j.length){s=0;B()}}};b.fancybox.cancel=function(){if(!h){h=true;b.event.trigger("fancybox-cancel");H();e&&b.isFunction(e.onCancel)&&e.onCancel(q,s,e);h=false}};b.fancybox.close=function(){function a(){y.fadeOut("fast");g.hide();b.event.trigger("fancybox-cleanup");i.empty();b.isFunction(c.onClosed)&&c.onClosed(j,n,c);j=e=[];n=s=0;c=e={};h=false}if(!(h||g.is(":hidden"))){h=true;if(c&&b.isFunction(c.onCleanup))if(c.onCleanup(j,n,c)===false){h=false;return}H();b(z.add(C).add(D)).hide();b("#fancybox-title").remove();g.add(i).add(y).unbind();b(window).unbind("resize.fb scroll.fb");b(document).unbind("keydown.fb");i.css("overflow","hidden");if(c.transitionOut=="elastic"){k=S();var d=g.position();m={top:d.top,left:d.left,width:g.width(),height:g.height()};if(c.opacity)m.opacity=1;A.prop=1;b(A).animate({prop:0},{duration:c.speedOut,easing:c.easingOut,step:M,complete:a})}else g.fadeOut(c.transitionOut=="none"?0:c.speedOut,a)}};b.fancybox.resize=function(){if(!(h||g.is(":hidden"))){h=true;var a=i.wrapInner("<div style='overflow:auto'></div>").children(),d=a.height();g.css({height:d+c.padding*2+x});i.css({height:d});a.replaceWith(a.children());b.fancybox.center()}};b.fancybox.center=function(){h=true;var a=N(),d=c.margin,f={};f.top=a[3]+(a[1]-(g.height()-x+t*2))*0.5;f.left=a[2]+(a[0]-(g.width()+t*2))*0.5;f.top=Math.max(a[3]+d,f.top);f.left=Math.max(a[2]+d,f.left);g.css(f);h=false};b.fn.fancybox.defaults={padding:10,margin:20,opacity:false,modal:false,cyclic:false,scrolling:"auto",width:560,height:340,autoScale:true,autoDimensions:true,centerOnScroll:false,ajax:{},swf:{wmode:"transparent"},hideOnOverlayClick:true,hideOnContentClick:false,overlayShow:true,overlayOpacity:0.3,overlayColor:"#666",titleShow:true,titlePosition:"outside",titleFormat:null,transitionIn:"fade",transitionOut:"fade",speedIn:300,speedOut:300,changeSpeed:300,changeFade:"fast",easingIn:"swing",easingOut:"swing",showCloseButton:true,showNavArrows:true,enableEscapeButton:true,onStart:null,onCancel:null,onComplete:null,onCleanup:null,onClosed:null};b(document).ready(function(){ba()})})(jQuery);jQuery.ui||(function(c){var i=c.fn.remove,d=c.browser.mozilla&&(parseFloat(c.browser.version)<1.9);c.ui={version:"1.7.2",plugin:{add:function(k,l,n){var m=c.ui[k].prototype;for(var j in n){m.plugins[j]=m.plugins[j]||[];m.plugins[j].push([l,n[j]])}},call:function(j,l,k){var n=j.plugins[l];if(!n||!j.element[0].parentNode){return}for(var m=0;m<n.length;m++){if(j.options[n[m][0]]){n[m][1].apply(j.element,k)}}}},contains:function(k,j){return document.compareDocumentPosition?k.compareDocumentPosition(j)&16:k!==j&&k.contains(j)},hasScroll:function(m,k){if(c(m).css("overflow")=="hidden"){return false}var j=(k&&k=="left")?"scrollLeft":"scrollTop",l=false;if(m[j]>0){return true}m[j]=1;l=(m[j]>0);m[j]=0;return l},isOverAxis:function(k,j,l){return(k>j)&&(k<(j+l))},isOver:function(o,k,n,m,j,l){return c.ui.isOverAxis(o,n,j)&&c.ui.isOverAxis(k,m,l)},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38}};if(d){var f=c.attr,e=c.fn.removeAttr,h="http://www.w3.org/2005/07/aaa",a=/^aria-/,b=/^wairole:/;c.attr=function(k,j,l){var m=l!==undefined;return(j=="role"?(m?f.call(this,k,j,"wairole:"+l):(f.apply(this,arguments)||"").replace(b,"")):(a.test(j)?(m?k.setAttributeNS(h,j.replace(a,"aaa:"),l):f.call(this,k,j.replace(a,"aaa:"))):f.apply(this,arguments)))};c.fn.removeAttr=function(j){return(a.test(j)?this.each(function(){this.removeAttributeNS(h,j.replace(a,""))}):e.call(this,j))}}c.fn.extend({remove:function(){c("*",this).add(this).each(function(){c(this).triggerHandler("remove")});return i.apply(this,arguments)},enableSelection:function(){return this.attr("unselectable","off").css("MozUserSelect","").unbind("selectstart.ui")},disableSelection:function(){return this.attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){return false})},scrollParent:function(){var j;if((c.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){j=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(c.curCSS(this,"position",1))&&(/(auto|scroll)/).test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0)}else{j=this.parents().filter(function(){return(/(auto|scroll)/).test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!j.length?c(document):j}});c.extend(c.expr[":"],{data:function(l,k,j){return !!c.data(l,j[3])},focusable:function(k){var l=k.nodeName.toLowerCase(),j=c.attr(k,"tabindex");return(/input|select|textarea|button|object/.test(l)?!k.disabled:"a"==l||"area"==l?k.href||!isNaN(j):!isNaN(j))&&!c(k)["area"==l?"parents":"closest"](":hidden").length},tabbable:function(k){var j=c.attr(k,"tabindex");return(isNaN(j)||j>=0)&&c(k).is(":focusable")}});function g(m,n,o,l){function k(q){var p=c[m][n][q]||[];return(typeof p=="string"?p.split(/,?\s+/):p)}var j=k("getter");if(l.length==1&&typeof l[0]=="string"){j=j.concat(k("getterSetter"))}return(c.inArray(o,j)!=-1)}c.widget=function(k,j){var l=k.split(".")[0];k=k.split(".")[1];c.fn[k]=function(p){var n=(typeof p=="string"),o=Array.prototype.slice.call(arguments,1);if(n&&p.substring(0,1)=="_"){return this}if(n&&g(l,k,p,o)){var m=c.data(this[0],k);return(m?m[p].apply(m,o):undefined)}return this.each(function(){var q=c.data(this,k);(!q&&!n&&c.data(this,k,new c[l][k](this,p))._init());(q&&n&&c.isFunction(q[p])&&q[p].apply(q,o))})};c[l]=c[l]||{};c[l][k]=function(o,n){var m=this;this.namespace=l;this.widgetName=k;this.widgetEventPrefix=c[l][k].eventPrefix||k;this.widgetBaseClass=l+"-"+k;this.options=c.extend({},c.widget.defaults,c[l][k].defaults,c.metadata&&c.metadata.get(o)[k],n);this.element=c(o).bind("setData."+k,function(q,p,r){if(q.target==o){return m._setData(p,r)}}).bind("getData."+k,function(q,p){if(q.target==o){return m._getData(p)}}).bind("remove",function(){return m.destroy()})};c[l][k].prototype=c.extend({},c.widget.prototype,j);c[l][k].getterSetter="option"};c.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").removeAttr("aria-disabled")},option:function(l,m){var k=l,j=this;if(typeof l=="string"){if(m===undefined){return this._getData(l)}k={};k[l]=m}c.each(k,function(n,o){j._setData(n,o)})},_getData:function(j){return this.options[j]},_setData:function(j,k){this.options[j]=k;if(j=="disabled"){this.element[k?"addClass":"removeClass"](this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").attr("aria-disabled",k)}},enable:function(){this._setData("disabled",false)},disable:function(){this._setData("disabled",true)},_trigger:function(l,m,n){var p=this.options[l],j=(l==this.widgetEventPrefix?l:this.widgetEventPrefix+l);m=c.Event(m);m.type=j;if(m.originalEvent){for(var k=c.event.props.length,o;k;){o=c.event.props[--k];m[o]=m.originalEvent[o]}}this.element.trigger(m,n);return !(c.isFunction(p)&&p.call(this.element[0],m,n)===false||m.isDefaultPrevented())}};c.widget.defaults={disabled:false};c.ui.mouse={_mouseInit:function(){var j=this;this.element.bind("mousedown."+this.widgetName,function(k){return j._mouseDown(k)}).bind("click."+this.widgetName,function(k){if(j._preventClickEvent){j._preventClickEvent=false;k.stopImmediatePropagation();return false}});if(c.browser.msie){this._mouseUnselectable=this.element.attr("unselectable");this.element.attr("unselectable","on")}this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);(c.browser.msie&&this.element.attr("unselectable",this._mouseUnselectable))},_mouseDown:function(l){l.originalEvent=l.originalEvent||{};if(l.originalEvent.mouseHandled){return}(this._mouseStarted&&this._mouseUp(l));this._mouseDownEvent=l;var k=this,m=(l.which==1),j=(typeof this.options.cancel=="string"?c(l.target).parents().add(l.target).filter(this.options.cancel).length:false);if(!m||j||!this._mouseCapture(l)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){k.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(l)&&this._mouseDelayMet(l)){this._mouseStarted=(this._mouseStart(l)!==false);if(!this._mouseStarted){l.preventDefault();return true}}this._mouseMoveDelegate=function(n){return k._mouseMove(n)};this._mouseUpDelegate=function(n){return k._mouseUp(n)};c(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);(c.browser.safari||l.preventDefault());l.originalEvent.mouseHandled=true;return true},_mouseMove:function(j){if(c.browser.msie&&!j.button){return this._mouseUp(j)}if(this._mouseStarted){this._mouseDrag(j);return j.preventDefault()}if(this._mouseDistanceMet(j)&&this._mouseDelayMet(j)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,j)!==false);(this._mouseStarted?this._mouseDrag(j):this._mouseUp(j))}return !this._mouseStarted},_mouseUp:function(j){c(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=(j.target==this._mouseDownEvent.target);this._mouseStop(j)}return false},_mouseDistanceMet:function(j){return(Math.max(Math.abs(this._mouseDownEvent.pageX-j.pageX),Math.abs(this._mouseDownEvent.pageY-j.pageY))>=this.options.distance)},_mouseDelayMet:function(j){return this.mouseDelayMet},_mouseStart:function(j){},_mouseDrag:function(j){},_mouseStop:function(j){},_mouseCapture:function(j){return true}};c.ui.mouse.defaults={cancel:null,distance:1,delay:0}})(jQuery);;jQuery.effects||(function(d){d.effects={version:"1.7.2",save:function(g,h){for(var f=0;f<h.length;f++){if(h[f]!==null){g.data("ec.storage."+h[f],g[0].style[h[f]])}}},restore:function(g,h){for(var f=0;f<h.length;f++){if(h[f]!==null){g.css(h[f],g.data("ec.storage."+h[f]))}}},setMode:function(f,g){if(g=="toggle"){g=f.is(":hidden")?"show":"hide"}return g},getBaseline:function(g,h){var i,f;switch(g[0]){case"top":i=0;break;case"middle":i=0.5;break;case"bottom":i=1;break;default:i=g[0]/h.height}switch(g[1]){case"left":f=0;break;case"center":f=0.5;break;case"right":f=1;break;default:f=g[1]/h.width}return{x:f,y:i}},createWrapper:function(f){if(f.parent().is(".ui-effects-wrapper")){return f.parent()}var g={width:f.outerWidth(true),height:f.outerHeight(true),"float":f.css("float")};f.wrap('<div class="ui-effects-wrapper" style="font-size:100%;background:transparent;border:none;margin:0;padding:0"></div>');var j=f.parent();if(f.css("position")=="static"){j.css({position:"relative"});f.css({position:"relative"})}else{var i=f.css("top");if(isNaN(parseInt(i,10))){i="auto"}var h=f.css("left");if(isNaN(parseInt(h,10))){h="auto"}j.css({position:f.css("position"),top:i,left:h,zIndex:f.css("z-index")}).show();f.css({position:"relative",top:0,left:0})}j.css(g);return j},removeWrapper:function(f){if(f.parent().is(".ui-effects-wrapper")){return f.parent().replaceWith(f)}return f},setTransition:function(g,i,f,h){h=h||{};d.each(i,function(k,j){unit=g.cssUnit(j);if(unit[0]>0){h[j]=unit[0]*f+unit[1]}});return h},animateClass:function(h,i,k,j){var f=(typeof k=="function"?k:(j?j:null));var g=(typeof k=="string"?k:null);return this.each(function(){var q={};var o=d(this);var p=o.attr("style")||"";if(typeof p=="object"){p=p.cssText}if(h.toggle){o.hasClass(h.toggle)?h.remove=h.toggle:h.add=h.toggle}var l=d.extend({},(document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle));if(h.add){o.addClass(h.add)}if(h.remove){o.removeClass(h.remove)}var m=d.extend({},(document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle));if(h.add){o.removeClass(h.add)}if(h.remove){o.addClass(h.remove)}for(var r in m){if(typeof m[r]!="function"&&m[r]&&r.indexOf("Moz")==-1&&r.indexOf("length")==-1&&m[r]!=l[r]&&(r.match(/color/i)||(!r.match(/color/i)&&!isNaN(parseInt(m[r],10))))&&(l.position!="static"||(l.position=="static"&&!r.match(/left|top|bottom|right/)))){q[r]=m[r]}}o.animate(q,i,g,function(){if(typeof d(this).attr("style")=="object"){d(this).attr("style")["cssText"]="";d(this).attr("style")["cssText"]=p}else{d(this).attr("style",p)}if(h.add){d(this).addClass(h.add)}if(h.remove){d(this).removeClass(h.remove)}if(f){f.apply(this,arguments)}})})}};function c(g,f){var i=g[1]&&g[1].constructor==Object?g[1]:{};if(f){i.mode=f}var h=g[1]&&g[1].constructor!=Object?g[1]:(i.duration?i.duration:g[2]);h=d.fx.off?0:typeof h==="number"?h:d.fx.speeds[h]||d.fx.speeds._default;var j=i.callback||(d.isFunction(g[1])&&g[1])||(d.isFunction(g[2])&&g[2])||(d.isFunction(g[3])&&g[3]);return[g[0],i,h,j]}d.fn.extend({_show:d.fn.show,_hide:d.fn.hide,__toggle:d.fn.toggle,_addClass:d.fn.addClass,_removeClass:d.fn.removeClass,_toggleClass:d.fn.toggleClass,effect:function(g,f,h,i){return d.effects[g]?d.effects[g].call(this,{method:g,options:f||{},duration:h,callback:i}):null},show:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))){return this._show.apply(this,arguments)}else{return this.effect.apply(this,c(arguments,"show"))}},hide:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))){return this._hide.apply(this,arguments)}else{return this.effect.apply(this,c(arguments,"hide"))}},toggle:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))||(d.isFunction(arguments[0])||typeof arguments[0]=="boolean")){return this.__toggle.apply(this,arguments)}else{return this.effect.apply(this,c(arguments,"toggle"))}},addClass:function(g,f,i,h){return f?d.effects.animateClass.apply(this,[{add:g},f,i,h]):this._addClass(g)},removeClass:function(g,f,i,h){return f?d.effects.animateClass.apply(this,[{remove:g},f,i,h]):this._removeClass(g)},toggleClass:function(g,f,i,h){return((typeof f!=="boolean")&&f)?d.effects.animateClass.apply(this,[{toggle:g},f,i,h]):this._toggleClass(g,f)},morph:function(f,h,g,j,i){return d.effects.animateClass.apply(this,[{add:h,remove:f},g,j,i])},switchClass:function(){return this.morph.apply(this,arguments)},cssUnit:function(f){var g=this.css(f),h=[];d.each(["em","px","%","pt"],function(j,k){if(g.indexOf(k)>0){h=[parseFloat(g),k]}});return h}});d.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","color","outlineColor"],function(g,f){d.fx.step[f]=function(h){if(h.state==0){h.start=e(h.elem,f);h.end=b(h.end)}h.elem.style[f]="rgb("+[Math.max(Math.min(parseInt((h.pos*(h.end[0]-h.start[0]))+h.start[0],10),255),0),Math.max(Math.min(parseInt((h.pos*(h.end[1]-h.start[1]))+h.start[1],10),255),0),Math.max(Math.min(parseInt((h.pos*(h.end[2]-h.start[2]))+h.start[2],10),255),0)].join(",")+")"}});function b(g){var f;if(g&&g.constructor==Array&&g.length==3){return g}if(f=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(g)){return[parseInt(f[1],10),parseInt(f[2],10),parseInt(f[3],10)]}if(f=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(g)){return[parseFloat(f[1])*2.55,parseFloat(f[2])*2.55,parseFloat(f[3])*2.55]}if(f=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(g)){return[parseInt(f[1],16),parseInt(f[2],16),parseInt(f[3],16)]}if(f=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(g)){return[parseInt(f[1]+f[1],16),parseInt(f[2]+f[2],16),parseInt(f[3]+f[3],16)]}if(f=/rgba\(0, 0, 0, 0\)/.exec(g)){return a.transparent}return a[d.trim(g).toLowerCase()]}function e(h,f){var g;do{g=d.curCSS(h,f);if(g!=""&&g!="transparent"||d.nodeName(h,"body")){break}f="backgroundColor"}while(h=h.parentNode);return b(g)}var a={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]};d.easing.jswing=d.easing.swing;d.extend(d.easing,{def:"easeOutQuad",swing:function(g,h,f,j,i){return d.easing[d.easing.def](g,h,f,j,i)},easeInQuad:function(g,h,f,j,i){return j*(h/=i)*h+f},easeOutQuad:function(g,h,f,j,i){return -j*(h/=i)*(h-2)+f},easeInOutQuad:function(g,h,f,j,i){if((h/=i/2)<1){return j/2*h*h+f}return -j/2*((--h)*(h-2)-1)+f},easeInCubic:function(g,h,f,j,i){return j*(h/=i)*h*h+f},easeOutCubic:function(g,h,f,j,i){return j*((h=h/i-1)*h*h+1)+f},easeInOutCubic:function(g,h,f,j,i){if((h/=i/2)<1){return j/2*h*h*h+f}return j/2*((h-=2)*h*h+2)+f},easeInQuart:function(g,h,f,j,i){return j*(h/=i)*h*h*h+f},easeOutQuart:function(g,h,f,j,i){return -j*((h=h/i-1)*h*h*h-1)+f},easeInOutQuart:function(g,h,f,j,i){if((h/=i/2)<1){return j/2*h*h*h*h+f}return -j/2*((h-=2)*h*h*h-2)+f},easeInQuint:function(g,h,f,j,i){return j*(h/=i)*h*h*h*h+f},easeOutQuint:function(g,h,f,j,i){return j*((h=h/i-1)*h*h*h*h+1)+f},easeInOutQuint:function(g,h,f,j,i){if((h/=i/2)<1){return j/2*h*h*h*h*h+f}return j/2*((h-=2)*h*h*h*h+2)+f},easeInSine:function(g,h,f,j,i){return -j*Math.cos(h/i*(Math.PI/2))+j+f},easeOutSine:function(g,h,f,j,i){return j*Math.sin(h/i*(Math.PI/2))+f},easeInOutSine:function(g,h,f,j,i){return -j/2*(Math.cos(Math.PI*h/i)-1)+f},easeInExpo:function(g,h,f,j,i){return(h==0)?f:j*Math.pow(2,10*(h/i-1))+f},easeOutExpo:function(g,h,f,j,i){return(h==i)?f+j:j*(-Math.pow(2,-10*h/i)+1)+f},easeInOutExpo:function(g,h,f,j,i){if(h==0){return f}if(h==i){return f+j}if((h/=i/2)<1){return j/2*Math.pow(2,10*(h-1))+f}return j/2*(-Math.pow(2,-10*--h)+2)+f},easeInCirc:function(g,h,f,j,i){return -j*(Math.sqrt(1-(h/=i)*h)-1)+f},easeOutCirc:function(g,h,f,j,i){return j*Math.sqrt(1-(h=h/i-1)*h)+f},easeInOutCirc:function(g,h,f,j,i){if((h/=i/2)<1){return -j/2*(Math.sqrt(1-h*h)-1)+f}return j/2*(Math.sqrt(1-(h-=2)*h)+1)+f},easeInElastic:function(g,i,f,m,l){var j=1.70158;var k=0;var h=m;if(i==0){return f}if((i/=l)==1){return f+m}if(!k){k=l*0.3}if(h<Math.abs(m)){h=m;var j=k/4}else{var j=k/(2*Math.PI)*Math.asin(m/h)}return -(h*Math.pow(2,10*(i-=1))*Math.sin((i*l-j)*(2*Math.PI)/k))+f},easeOutElastic:function(g,i,f,m,l){var j=1.70158;var k=0;var h=m;if(i==0){return f}if((i/=l)==1){return f+m}if(!k){k=l*0.3}if(h<Math.abs(m)){h=m;var j=k/4}else{var j=k/(2*Math.PI)*Math.asin(m/h)}return h*Math.pow(2,-10*i)*Math.sin((i*l-j)*(2*Math.PI)/k)+m+f},easeInOutElastic:function(g,i,f,m,l){var j=1.70158;var k=0;var h=m;if(i==0){return f}if((i/=l/2)==2){return f+m}if(!k){k=l*(0.3*1.5)}if(h<Math.abs(m)){h=m;var j=k/4}else{var j=k/(2*Math.PI)*Math.asin(m/h)}if(i<1){return -0.5*(h*Math.pow(2,10*(i-=1))*Math.sin((i*l-j)*(2*Math.PI)/k))+f}return h*Math.pow(2,-10*(i-=1))*Math.sin((i*l-j)*(2*Math.PI)/k)*0.5+m+f},easeInBack:function(g,h,f,k,j,i){if(i==undefined){i=1.70158}return k*(h/=j)*h*((i+1)*h-i)+f},easeOutBack:function(g,h,f,k,j,i){if(i==undefined){i=1.70158}return k*((h=h/j-1)*h*((i+1)*h+i)+1)+f},easeInOutBack:function(g,h,f,k,j,i){if(i==undefined){i=1.70158}if((h/=j/2)<1){return k/2*(h*h*(((i*=(1.525))+1)*h-i))+f}return k/2*((h-=2)*h*(((i*=(1.525))+1)*h+i)+2)+f},easeInBounce:function(g,h,f,j,i){return j-d.easing.easeOutBounce(g,i-h,0,j,i)+f},easeOutBounce:function(g,h,f,j,i){if((h/=i)<(1/2.75)){return j*(7.5625*h*h)+f}else{if(h<(2/2.75)){return j*(7.5625*(h-=(1.5/2.75))*h+0.75)+f}else{if(h<(2.5/2.75)){return j*(7.5625*(h-=(2.25/2.75))*h+0.9375)+f}else{return j*(7.5625*(h-=(2.625/2.75))*h+0.984375)+f}}}},easeInOutBounce:function(g,h,f,j,i){if(h<i/2){return d.easing.easeInBounce(g,h*2,0,j,i)*0.5+f}return d.easing.easeOutBounce(g,h*2-i,0,j,i)*0.5+j*0.5+f}})})(jQuery);;;(function($) { var ua = navigator.userAgent;var moz = $.browser.mozilla && /gecko/i.test(ua);var webkit = $.browser.safari && /Safari\/[5-9]/.test(ua);var mode = document.documentMode || 0;var noBottomFold = $.browser.msie && (($.browser.version < 8 && !mode) || mode < 8);var expr = $.browser.msie && (function() {    var div = document.createElement('div');    try { div.style.setExpression('width','0+0'); div.style.removeExpression('width'); }    catch(e) { return false; }    return true;})();
    
function sz(el, p) { 
    return parseInt($.css(el,p))||0; 
};
function hex2(s) {
    var s = parseInt(s).toString(16);
    return ( s.length < 2 ) ? '0'+s : s;
};
function gpc(node) {
    for ( ; node && node.nodeName.toLowerCase() != 'html'; node = node.parentNode ) {
        var v = $.css(node,'backgroundColor');
        if (v == 'rgba(0, 0, 0, 0)')
            continue;
        if (v.indexOf('rgb') >= 0) { 
            var rgb = v.match(/\d+/g); 
            return '#'+ hex2(rgb[0]) + hex2(rgb[1]) + hex2(rgb[2]);
        }
        if ( v && v != 'transparent' )
            return v;
    }
    return '#ffffff';
};

function getWidth(fx, i, width) {
    switch(fx) {
    case 'round':  return Math.round(width*(1-Math.cos(Math.asin(i/width))));
    case 'cool':   return Math.round(width*(1+Math.cos(Math.asin(i/width))));
    case 'sharp':  return Math.round(width*(1-Math.cos(Math.acos(i/width))));
    case 'bite':   return Math.round(width*(Math.cos(Math.asin((width-i-1)/width))));
    case 'slide':  return Math.round(width*(Math.atan2(i,width/i)));
    case 'jut':    return Math.round(width*(Math.atan2(width,(width-i-1))));
    case 'curl':   return Math.round(width*(Math.atan(i)));
    case 'tear':   return Math.round(width*(Math.cos(i)));
    case 'wicked': return Math.round(width*(Math.tan(i)));
    case 'long':   return Math.round(width*(Math.sqrt(i)));
    case 'sculpt': return Math.round(width*(Math.log((width-i-1),width)));
	case 'dogfold':
    case 'dog':    return (i&1) ? (i+1) : width;
    case 'dog2':   return (i&2) ? (i+1) : width;
    case 'dog3':   return (i&3) ? (i+1) : width;
    case 'fray':   return (i%2)*width;
    case 'notch':  return width; 
	case 'bevelfold':
    case 'bevel':  return i+1;
    }
};

$.fn.corner = function(options) {
	if (this.length == 0) {
        if (!$.isReady && this.selector) {
            var s = this.selector, c = this.context;
            $(function() {
                $(s,c).corner(options);
            });
        }
        return this;
	}

    return this.each(function(index){
		var $this = $(this);
		var o = [ options || '', $this.attr($.fn.corner.defaults.metaAttr) || ''].join(' ').toLowerCase();
		var keep = /keep/.test(o);                       
		var cc = ((o.match(/cc:(#[0-9a-f]+)/)||[])[1]);  
		var sc = ((o.match(/sc:(#[0-9a-f]+)/)||[])[1]);
		var width = parseInt((o.match(/(\d+)px/)||[])[1]) || 10;
		var re = /round|bevelfold|bevel|notch|bite|cool|sharp|slide|jut|curl|tear|fray|wicked|sculpt|long|dog3|dog2|dogfold|dog/;
		var fx = ((o.match(re)||['round'])[0]);
		var fold = /dogfold|bevelfold/.test(o);
		var edges = { T:0, B:1 };
		var opts = {
			TL:  /top|tl|left/.test(o),       TR:  /top|tr|right/.test(o),
			BL:  /bottom|bl|left/.test(o),    BR:  /bottom|br|right/.test(o)
		};
		if ( !opts.TL && !opts.TR && !opts.BL && !opts.BR )
			opts = { TL:1, TR:1, BL:1, BR:1 };

		if ($.fn.corner.defaults.useNative && fx == 'round' && (moz || webkit) && !cc && !sc) {
			if (opts.TL)
				$this.css(moz ? '-moz-border-radius-topleft' : '-webkit-border-top-left-radius', width + 'px');
			if (opts.TR)
				$this.css(moz ? '-moz-border-radius-topright' : '-webkit-border-top-right-radius', width + 'px');
			if (opts.BL)
				$this.css(moz ? '-moz-border-radius-bottomleft' : '-webkit-border-bottom-left-radius', width + 'px');
			if (opts.BR)
				$this.css(moz ? '-moz-border-radius-bottomright' : '-webkit-border-bottom-right-radius', width + 'px');
			return;
		}
			
		var strip = document.createElement('div');
		strip.style.overflow = 'hidden';
		strip.style.height = '1px';
		strip.style.backgroundColor = sc || 'transparent';
		strip.style.borderStyle = 'solid';
	
        var pad = {
            T: parseInt($.css(this,'paddingTop'))||0,     R: parseInt($.css(this,'paddingRight'))||0,
            B: parseInt($.css(this,'paddingBottom'))||0,  L: parseInt($.css(this,'paddingLeft'))||0
        };

        if (typeof this.style.zoom != undefined) this.style.zoom = 1;
        if (!keep) this.style.border = 'none';
        strip.style.borderColor = cc || gpc(this.parentNode);
        var cssHeight = $.curCSS(this, 'height');

        for (var j in edges) {
            var bot = edges[j];
            if ((bot && (opts.BL || opts.BR)) || (!bot && (opts.TL || opts.TR))) {
                strip.style.borderStyle = 'none '+(opts[j+'R']?'solid':'none')+' none '+(opts[j+'L']?'solid':'none');
                var d = document.createElement('div');
                $(d).addClass('jquery-corner');
                var ds = d.style;

                bot ? this.appendChild(d) : this.insertBefore(d, this.firstChild);

                if (bot && cssHeight != 'auto') {
                    if ($.css(this,'position') == 'static')
                        this.style.position = 'relative';
                    ds.position = 'absolute';
                    ds.bottom = ds.left = ds.padding = ds.margin = '0';
                    if (expr)
                        ds.setExpression('width', 'this.parentNode.offsetWidth');
                    else
                        ds.width = '100%';
                }
                else if (!bot && $.browser.msie) {
                    if ($.css(this,'position') == 'static')
                        this.style.position = 'relative';
                    ds.position = 'absolute';
                    ds.top = ds.left = ds.right = ds.padding = ds.margin = '0';
                    
                    if (expr) {
                        var bw = sz(this,'borderLeftWidth') + sz(this,'borderRightWidth');
                        ds.setExpression('width', 'this.parentNode.offsetWidth - '+bw+'+ "px"');
                    }
                    else
                        ds.width = '100%';
                }
                else {
                	ds.position = 'relative';
                    ds.margin = !bot ? '-'+pad.T+'px -'+pad.R+'px '+(pad.T-width)+'px -'+pad.L+'px' : 
                                        (pad.B-width)+'px -'+pad.R+'px -'+pad.B+'px -'+pad.L+'px';                
                }

                for (var i=0; i < width; i++) {
                    var w = Math.max(0,getWidth(fx,i, width));
                    var e = strip.cloneNode(false);
                    e.style.borderWidth = '0 '+(opts[j+'R']?w:0)+'px 0 '+(opts[j+'L']?w:0)+'px';
                    bot ? d.appendChild(e) : d.insertBefore(e, d.firstChild);
                }
				
				if (fold && $.support.boxModel) {
					if (bot && noBottomFold) continue;
					for (var c in opts) {
						if (!opts[c]) continue;
						if (bot && (c == 'TL' || c == 'TR')) continue;
						if (!bot && (c == 'BL' || c == 'BR')) continue;
						
						var common = { position: 'absolute', border: 'none', margin: 0, padding: 0, overflow: 'hidden', backgroundColor: strip.style.borderColor };
						var $horz = $('<div/>').css(common).css({ width: width + 'px', height: '1px' });
						switch(c) {
						case 'TL': $horz.css({ bottom: 0, left: 0 }); break;
						case 'TR': $horz.css({ bottom: 0, right: 0 }); break;
						case 'BL': $horz.css({ top: 0, left: 0 }); break;
						case 'BR': $horz.css({ top: 0, right: 0 }); break;
						}
						d.appendChild($horz[0]);
						
						var $vert = $('<div/>').css(common).css({ top: 0, bottom: 0, width: '1px', height: width + 'px' });
						switch(c) {
						case 'TL': $vert.css({ left: width }); break;
						case 'TR': $vert.css({ right: width }); break;
						case 'BL': $vert.css({ left: width }); break;
						case 'BR': $vert.css({ right: width }); break;
						}
						d.appendChild($vert[0]);
					}
				}
            }
        }
    });
};

$.fn.uncorner = function() { 
	if (moz || webkit)
		this.css(moz ? '-moz-border-radius' : '-webkit-border-radius', 0);
	$('div.jquery-corner', this).remove();
	return this;
};
$.fn.corner.defaults = {
	useNative: true,
	metaAttr:  'data-corner'
};
    
})(jQuery);
(function($){
	$.fn.hoverIntent = function(f,g) {
		var cfg = {
			sensitivity: 7,
			interval: 100,
			timeout: 0
		};
		cfg = $.extend(cfg, g ? { over: f, out: g } : f );
		var cX, cY, pX, pY;
		var track = function(ev) {
			cX = ev.pageX;
			cY = ev.pageY;
		};

		var compare = function(ev,ob) {
			ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t);
			if ( ( Math.abs(pX-cX) + Math.abs(pY-cY) ) < cfg.sensitivity ) {
				$(ob).unbind("mousemove",track);
				ob.hoverIntent_s = 1;
				return cfg.over.apply(ob,[ev]);
			} else {
				pX = cX; pY = cY;
				ob.hoverIntent_t = setTimeout( function(){compare(ev, ob);} , cfg.interval );
			}
		};

		var delay = function(ev,ob) {
			ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t);
			ob.hoverIntent_s = 0;
			return cfg.out.apply(ob,[ev]);
		};

		var handleHover = function(e) {
			var p = (e.type == "mouseover" ? e.fromElement : e.toElement) || e.relatedTarget;
			while ( p && p != this ) { try { p = p.parentNode; } catch(e) { p = this; } }
			if ( p == this ) { return false; }

			var ev = jQuery.extend({},e);
			var ob = this;

			if (ob.hoverIntent_t) { ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t); }

			if (e.type == "mouseover") {
				pX = ev.pageX; pY = ev.pageY;
				$(ob).bind("mousemove",track);
				if (ob.hoverIntent_s != 1) { ob.hoverIntent_t = setTimeout( function(){compare(ev,ob);} , cfg.interval );}

			} else {
				$(ob).unbind("mousemove",track);
				if (ob.hoverIntent_s == 1) { ob.hoverIntent_t = setTimeout( function(){delay(ev,ob);} , cfg.timeout );}
			}
		};
		return this.mouseover(handleHover).mouseout(handleHover);
	};
	
})(jQuery);

;(function($){
	$.fn.superfish = function(op){

		var sf = $.fn.superfish,
			c = sf.c,
			$arrow = $(['<span class="',c.arrowClass,'"> &#187;</span>'].join('')),
			over = function(){
				var $$ = $(this), menu = getMenu($$);
				clearTimeout(menu.sfTimer);
				$$.showSuperfishUl().siblings().hideSuperfishUl();
			},
			out = function(){
				var $$ = $(this), menu = getMenu($$), o = sf.op;
				clearTimeout(menu.sfTimer);
				menu.sfTimer=setTimeout(function(){
					o.retainPath=($.inArray($$[0],o.$path)>-1);
					$$.hideSuperfishUl();
					if (o.$path.length && $$.parents(['li.',o.hoverClass].join('')).length<1){over.call(o.$path);}
				},o.delay);	
			},
			getMenu = function($menu){
				var menu = $menu.parents(['ul.',c.menuClass,':first'].join(''))[0];
				sf.op = sf.o[menu.serial];
				return menu;
			},
			addArrow = function($a){ $a.addClass(c.anchorClass).append($arrow.clone()); };
			
		return this.each(function() {
			var s = this.serial = sf.o.length;
			var o = $.extend({},sf.defaults,op);
			o.$path = $('li.'+o.pathClass,this).slice(0,o.pathLevels).each(function(){
				$(this).addClass([o.hoverClass,c.bcClass].join(' '))
					.filter('li:has(ul)').removeClass(o.pathClass);
			});
			sf.o[s] = sf.op = o;
			
			$('li:has(ul)',this)[($.fn.hoverIntent && !o.disableHI) ? 'hoverIntent' : 'hover'](over,out).each(function() {
				if (o.autoArrows) addArrow( $('>a:first-child',this) );
			})
			.not('.'+c.bcClass)
				.hideSuperfishUl();
			
			var $a = $('a',this);
			$a.each(function(i){
				var $li = $a.eq(i).parents('li');
				$a.eq(i).focus(function(){over.call($li);}).blur(function(){out.call($li);});
			});
			o.onInit.call(this);
			
		}).each(function() {
			var menuClasses = [c.menuClass];
			if (sf.op.dropShadows  && !($.browser.msie && $.browser.version < 7)) menuClasses.push(c.shadowClass);
			$(this).addClass(menuClasses.join(' '));
		});
	};

	var sf = $.fn.superfish;
	sf.o = [];
	sf.op = {};
	sf.IE7fix = function(){
		var o = sf.op;
		if ($.browser.msie && $.browser.version > 6 && o.dropShadows && o.animation.opacity!=undefined)
			this.toggleClass(sf.c.shadowClass+'-off');
		};
	sf.c = {
		bcClass     : 'sf-breadcrumb',
		menuClass   : 'sf-js-enabled',
		anchorClass : 'sf-with-ul',
		arrowClass  : 'sf-sub-indicator',
		shadowClass : 'sf-shadow'
	};
	sf.defaults = {
		hoverClass	: 'sfHover',
		pathClass	: 'overideThisToUse',
		pathLevels	: 1,
		delay		: 800,
		animation	: {opacity:'show'},
		speed		: 'normal',
		autoArrows	: true,
		dropShadows : true,
		disableHI	: false,		
		onInit		: function(){},
		onBeforeShow: function(){},
		onShow		: function(){},
		onHide		: function(){}
	};
	$.fn.extend({
		hideSuperfishUl : function(){
			var o = sf.op,
				not = (o.retainPath===true) ? o.$path : '';
			o.retainPath = false;
			var $ul = $(['li.',o.hoverClass].join(''),this).add(this).not(not).removeClass(o.hoverClass)
					.find('>ul').hide().css('visibility','hidden');
			o.onHide.call($ul);
			return this;
		},
		showSuperfishUl : function(){
			var o = sf.op,
				sh = sf.c.shadowClass+'-off',
				$ul = this.addClass(o.hoverClass)
					.find('>ul:hidden').css('visibility','visible');
			sf.IE7fix.call($ul);
			o.onBeforeShow.call($ul);
			$ul.animate(o.animation,o.speed,function(){ sf.IE7fix.call($ul); o.onShow.call($ul); });
			return this;
		}
	});

})(jQuery);

(function($) {
	if(!document.defaultView || !document.defaultView.getComputedStyle){ 
		var oldCurCSS = jQuery.curCSS;
		jQuery.curCSS = function(elem, name, force){
			if(name === 'background-position'){
				name = 'backgroundPosition';
			}
			if(name !== 'backgroundPosition' || !elem.currentStyle || elem.currentStyle[ name ]){
				return oldCurCSS.apply(this, arguments);
			}
			var style = elem.style;
			if ( !force && style && style[ name ] ){
				return style[ name ];
			}
			return oldCurCSS(elem, 'backgroundPositionX', force) +' '+ oldCurCSS(elem, 'backgroundPositionY', force);
		};
	}
	
	var oldAnim = $.fn.animate;
	$.fn.animate = function(prop){
		if('background-position' in prop){
			prop.backgroundPosition = prop['background-position'];
			delete prop['background-position'];
		}
		if('backgroundPosition' in prop){
			prop.backgroundPosition = '('+ prop.backgroundPosition;
		}
		return oldAnim.apply(this, arguments);
	};
	
	function toArray(strg){
		strg = strg.replace(/left|top/g,'0px');
		strg = strg.replace(/right|bottom/g,'100%');
		strg = strg.replace(/([0-9\.]+)(\s|\)|$)/g,"$1px$2");
		var res = strg.match(/(-?[0-9\.]+)(px|\%|em|pt)\s(-?[0-9\.]+)(px|\%|em|pt)/);
		return [parseFloat(res[1],10),res[2],parseFloat(res[3],10),res[4]];
	}
	
	$.fx.step. backgroundPosition = function(fx) {
		if (!fx.bgPosReady) {
			var start = $.curCSS(fx.elem,'backgroundPosition');
			
			if(!start){
				start = '0px 0px';
			}
			
			start = toArray(start);
			
			fx.start = [start[0],start[2]];
			
			var end = toArray(fx.options.curAnim.backgroundPosition);
			fx.end = [end[0],end[2]];
			
			fx.unit = [end[1],end[3]];
			fx.bgPosReady = true;
		}
		var nowPosX = [];
		nowPosX[0] = ((fx.end[0] - fx.start[0]) * fx.pos) + fx.start[0] + fx.unit[0];
		nowPosX[1] = ((fx.end[1] - fx.start[1]) * fx.pos) + fx.start[1] + fx.unit[1];           
		fx.elem.style.backgroundPosition = nowPosX[0]+' '+nowPosX[1];

	};
})(jQuery);
	function validate()
		{
			
			frm=document.frmContact;
			errMsg="";
			if(frm.name.value=="")
				{
					errMsg +="    - Please enter your name.\n";
				}
			
			if(frm.organization.value=="")
				{
					errMsg +="    - Please enter your organization's name.\n";
				}
			errMsg +=chkMail(frm.email.value);
			
			if(frm.phone.value=="")
				{
					errMsg +="    - Please enter your phone number.\n";
				}
				
			if(frm.comment.value=="")
				{
					errMsg +="    - Please enter your comments.\n";
				}
			if(errMsg=="")
				return true;
			else
				{
					alert(errMsg);
					return false;
				}
		}
function chkMail(email)
{
    var errMsg = '';
	if (email=='')
    { 
       errMsg ="    - Please enter your email address.\n";

		return errMsg;
	}
	
	if (!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(email)){
	errMsg ="    - The email address entered is not valid. Please check and try again.\n";
	return errMsg;
	}
return errMsg;
}


function validates()
	{
		
		frm=document.job;
		errMsg="";
		if(frm.name.value=="")
			{
				errMsg +="    - Please enter applicant's name.\n";
			}
			
		errMsg +=chkMails(frm.email.value);
		
		if(frm.position.value=="")
			{
				errMsg +="    - Please enter position applying for.\n";
			}
		
		if(frm.resume.value=="" && frm.cpResume.value=="")
			{
				errMsg +="    - Please either select a file to upload or enter the resume text in the space provided.\n";
			}
			if(frm.security.value=="")
				{
					errMsg +="    - Please enter security code.\n";
				}
		if(errMsg=="")
			return true;
		else
			{
				alert(errMsg);
				return false;
			}
	}
function chkMails(email)
{
var errMsg = '';
if (email=='')
{ 
   errMsg ="    - Please enter applicant's email address.\n";

	return errMsg;
}

if (!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(email)){
errMsg ="    - The email address entered is not valid. Please check and try again.\n";
return errMsg;
}
return errMsg;
}

function Trim(s) 
{
  
  while ((s.substring(0,1) == ' ') || (s.substring(0,1) == '\n') || (s.substring(0,1) == '\r'))
  {
    s = s.substring(1,s.length);
  }


  while ((s.substring(s.length-1,s.length) == ' ') || (s.substring(s.length-1,s.length) == '\n') || (s.substring(s.length-1,s.length) == '\r'))
  {
    s = s.substring(0,s.length-1);
  }
  return s;
}

function expandMenu(menu,sign)
{
	var menu1 = document.getElementById(menu);
	var sign = document.getElementById(sign);
	
	if(menu1.style.visibility == 'visible')
	{
	sign.innerHTML = "+";
	menu1.style.position = 'absolute';
	menu1.style.visibility = 'hidden';
	}
	else
	{
	sign.innerHTML = "-";
	menu1.style.position = 'relative';
	menu1.style.visibility = 'visible';
	}
}

function isInteger(s)
{   var i;
    for (i = 0; i < s.length; i++)
    {   
        var c = s.charAt(i);
        if (((c < "0") || (c > "9"))) return false;
    }
    return true;
}

	function LoginVal() {
			
		if (document.frm.uname.value=='') { 
		   	alert("Please enter user name!");
			document.frm.uname.focus()
		 	return false;
		}
		if (document.frm.upass.value=='') { 
		   	alert("Please enter password!");
			document.frm.upass.focus()
		 	return false;
		}
		if ((document.frm.uname.value!='blueprint') || (document.frm.upass.value!='Welcome2Blue')) { 
		   	alert("Please enter correct user name and password!");
			document.frm.uname.focus()
		 	return false;
		}
		else {
		 	return true;
		}
	}
		
	function SelectDate() {
		if (document.frm.SelDate.value=='') { 
		   	alert("Please select event date!");
			document.frm.SelDate.focus()
		 	return false;
		}
		else {
		 	return true;
		}
	}
	
	function timedRefresh(timeoutPeriod) {
		setTimeout("location.reload(true);",timeoutPeriod);
	}
	
function EvalVal() {
	
	  var qusArr=["ValCon","OverPres","ValLegal","ValSecur","ValScenario","ValHandout","SecBreach","LikeSecBreach","IntAttend"];
	  var msg="Please select at least one ranking before submitting the form!"
	  var mCtr=0;
	  
	  for(var i=0;i<qusArr.length;i++){
			var o=document.getElementById(qusArr[i]).getElementsByTagName('input');
			var ctr=0;
			for(var j=0;j<o.length;j++){
				  if(o[j].checked){
						ctr++;
						break;
				  }
			}
        if(ctr==0){mCtr++; msg+"\n";}
	  }
	  if(document.getElementById('event_date').value == ''){
	  	alert('Please select the event date');
		return false;
	  }
	

	if(mCtr>8){
		alert(msg);
		return false;
	}
	
 else {
	return true;
}

}
var FLIR = {
	version: '2.0b3'
	
	,options: {
		path: ''

		,defaultStyle:			null
		,ignoredEls: 			'BR,HR,IMG,INPUT,SELECT'
		,bkgCheckForBlock:	false

		,onreplacing: 			null
		,onreplaced: 			null
		,onreplacingchild: 	null
		,onreplacedchild: 	null
	}

	,findEmbededFonts: 	false
	,dpi: 96
	
	,flirElements: {}
	,flirPlugins: 	[]
	
	,isIE6: 			true
	,isIE: 			true
	
	,hoverEnabled: false
	,debug: 			false
	
	,init: function(options) {
		if(typeof options != 'undefined')
			for(var i in options)
				this.options[i] = options[i];

		if(this.options.defaultStyle == null)
			this.options.defaultStyle = new FLIRStyle();

		this.detectBrowser();
		this.calcDPI();

		if((this.findEmbededFonts = (typeof FLIR.discoverEmbededFonts == 'function')))
			this.discoverEmbededFonts();
			
		this.hoverEnabled = (typeof this.addHover == 'function');
		
		FLIR.pcall('init', arguments);
	}
    
	,install: function(plugin) {
		this.flirPlugins.push(plugin);
	}
	
	,pcall: function(func, call) {
		var ret = call;
		for(var i=0; i<this.flirPlugins.length; i++) {
			if(typeof this.flirPlugins[i][func] == 'function') {
				var pluginret = this.flirPlugins[i][func](ret);

				if(typeof pluginret == 'undefined') {
					continue;
				}
				if(typeof pluginret == 'boolean' && pluginret == false) {
					return false;
				}
				if(typeof pluginret != 'boolean') 
					ret = call;

			}
		}
		
		var ret = typeof ret != 'object' ? [ret] : ret;
		if(ret.length && ret[0] && ret[0].callee)
			return ret[0];
		else
			return ret;
	}
	
	,prepare: function(n, bTrim) {
		if(!(args = FLIR.pcall('prepare', arguments))) return;
		n = args[0];

		if(n && n.hasChildNodes() && n.childNodes.length > 1) {
			for(var i =0; i < n.childNodes.length; i++) {
				var node = n.childNodes[i];
				if(node && node.nodeType == 3) {
					if(bTrim) {
						trimreg = i==0 ? /^\s+/g : /\s+$/g;
						node.innerHTML = node.innerHTML.replace(trimreg, '');
					}
					
					var span = document.createElement('SPAN');
					span.style.margin = span.style.padding = span.style.border = '0';
					span.className = 'flir-span';
					span.flirSpan = true;
					if(node.nodeValue.match(/^[\n\r]+$/)) continue;
					var txt = node.nodeValue.replace(/[\t\n\r]/g, ' ').replace(/\s\s+/g, ' ');
					span.innerHTML = !FLIR.isIE ? txt : node.nodeValue.replace(/^\s+|\s+$/g,'&nbsp;');
					n.replaceChild(span, node);
				}
			}
		}
	}
   
	,replace: function(o, FStyle) { 
		if(!(args = FLIR.pcall('replace', arguments))) return;
		o 		= args[0];
		FStyle 	= args[1];

		if(!o || o.flirReplaced) return; 
		if(!this.isFStyle(FStyle) && typeof FStyle == 'object') 
			FStyle = new FLIRStyle(FStyle);
		else if(!this.isFStyle(FStyle)) 
			FStyle = this.options.defaultStyle; 

		if(typeof o == 'string') o = this.getElements(o);

		if(typeof o.length != 'undefined') {
			if(o.length == 0) return; 
			
			for(var i=0; i< o.length; i++)
				this.replace(o[i], FStyle);
			
			return;
		}
		
		o.flirStyle = FStyle;
				
		if(typeof FLIR.options.onreplacing == 'function') o = FLIR.options.onreplacing(o, FStyle);
		
		o.flirMainObj = true;
		this.saveObject(o);
		
		if(this.findEmbededFonts && typeof this.embededFonts[FStyle.getFont(o, FLIR.getStyle(o, 'font-family'))] != 'undefined') return;
		
		FLIR.prepare(o);        
		this._replace_tree(o, FStyle);
		
		if(typeof FLIR.options.onreplaced == 'function') FLIR.options.onreplaced(o, FStyle);
	}
    
	,_replace_tree: function(o, FStyle) {
		var objs = !o.hasChildNodes() || (o.hasChildNodes() && o.childNodes.length==1 && o.childNodes[0].nodeType==3) ? [o] : o.childNodes;
	
		var rep_obj;
		for(var i=0; i < objs.length; i++) {
			rep_obj = objs[i];        
			if(typeof FLIR.options.onreplacingchild == 'function') rep_obj = FLIR.options.onreplacingchild(rep_obj, FStyle);
			
			if(!rep_obj.innerHTML || rep_obj.nodeType != 1) continue;
			if(FLIR.isIgnoredEl(rep_obj)) continue;
			if(rep_obj.flirReplaced) continue;
			
			if(FLIR.hoverEnabled && rep_obj.nodeName == 'A' && !rep_obj.flirHasHover)
				FLIR.addHover(rep_obj);
			
			if(rep_obj.hasChildNodes() && (rep_obj.childNodes.length > 1 || rep_obj.childNodes[0].nodeType != 3)) {
				FLIR.prepare(rep_obj);
				FLIR._replace_tree(rep_obj, FStyle);
				continue;
			}
			
			if(rep_obj.innerHTML == '') continue;
			var op = FStyle.options.output;
			if(FLIR.isIE6 && (rep_obj.flirIE6PNG = (op == 'png' || (op =='auto' && FLIR.getStyle(rep_obj, 'background-color')=='transparent')))){ 
				FLIR._Rimg(rep_obj, FStyle, true);
			}else{
				if(FStyle.replaceBackground)
					FLIR._Rbkg(rep_obj, FStyle);
				else
					FLIR._Rimg(rep_obj, FStyle);
			}
			
			rep_obj.className += ' flir-replaced';
			rep_obj.flirReplaced = true;
			
			if(typeof FLIR.options.onreplacedchild == 'function') FLIR.options.onreplacedchild(o, FStyle);
		}
	}
    
	,_Rbkg: function(o, FStyle) {
		if(!(args = FLIR.pcall('replaceBackground', arguments))) return;
		o 		= args[0];
		FStyle 	= args[1];

		var oid = this.saveObject(o);
		var url = FStyle.URL(o);
		
		if(FLIR.options.bkgCheckForBlock)
			if(FLIR.getStyle(o, 'display') != 'block')
				o.style.display='block';
		
		var tmp = new Image();
		tmp.onload = function() {
			FLIR.flirElements[oid].style.width=this.width+'px';
			FLIR.flirElements[oid].style.height=this.height+'px';
		
			if(FLIR.hoverEnabled && FStyle != FStyle.hoverStyle) {
				var h_img = new Image();
				o.flirHoverURL = h_img.src = FStyle.hoverStyle.URL(o);
			}
		};
		tmp.src = url;
		
		o.style.background = 'url("'+url.replace(/ /g, '%20')+'") no-repeat';
		o.flirOrig = url;
		
		o.oldTextIndent = o.style.textIndent;
		o.style.textIndent='-9999px';
	}

	,_Rimg: function(o, FStyle, bIE6Alpha) {
		if(!(args = FLIR.pcall('replaceMethodOverlay', arguments))) return;
		o 		= args[0];
		FStyle 	= args[1];

		var oid = this.saveObject(o);
		var img = document.createElement('IMG');
		var url = FStyle.URL(o);
		img.alt = o.innerHTML;
		
		if(FLIR.hoverEnabled && FStyle != FStyle.hoverStyle) {
			img.onload = function() {
				var h_img = new Image();
				o.flirHoverURL = h_img.src = FStyle.hoverStyle.URL(o, img.alt);
			};
		}
		
		if(img.onerror) {
			img.onerror = function() {
				var span = document.createElement('SPAN');
				span.innerHTML = img.alt;
				try {
					o.replaceChild(span,img)
				}catch(err) { }
			};
		}
		
		img.flirImage = true;
		img.className = 'flir-image';
		img.style.border='none';
		
		if(bIE6Alpha) {
			img.src = this.options.path+'spacer.png';
			if(o.offsetWidth) {
				img.style.width=o.offsetWidth+'px';
				img.style.height=o.offsetHeight+'px';
			}
			img.style.filter = 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'+url+'", sizingMethod="image")';
			
			o.flirOrig = url;	
		}else {
			img.src = url;
			o.flirOrig = img.src;
		}
		
		o.innerHTML='';
		o.appendChild(img);
	}

	,saveObject: function(o) {
        if(typeof o.flirId == 'undefined') {
            o.flirId = this.generateUID();
				this.flirElements[o.flirId] = o;
        }
        
        return o.flirId;
	}
    
	,generateUID: function() {
		var prefix='flir-';
		if(typeof __flir_uid_count == 'undefined') __flir_uid_count = 0;
		else __flir_uid_count++;
		return prefix+__flir_uid_count;
	}
    
	,calcDPI: function() {
		if(screen.logicalXDPI) {
			var dpi = parseInt(screen.logicalXDPI);
		}else {
			var dpicook = document.cookie.match(/<dpi>(\d+)<\/dpi>/);
			if(dpicook) {
				this.dpi = dpicook[1];
				return;
			}
			
			var test = document.createElement('DIV');
			test.style.position='absolute';
			test.style.visibility='hidden';
			test.style.border=test.style.padding=test.style.margin='0';
			test.style.height=test.style.width='1in';
			document.body.appendChild(test);
			
			var dpi = parseInt(test.offsetHeight);
			document.body.removeChild(test);

			var future = new Date();
			future.setDate(new Date().getDate()+365);
			document.cookie = 'dpi=<dpi>'+this.dpi+'</dpi>;expires='+future.toGMTString()+';path=/';
		}
		
		if(dpi > 0)
			this.dpi = dpi;
	}
    
	,isIgnoredEl: function(el) { return ((','+this.options.ignoredEls+',').indexOf(','+el.nodeName+',')>-1); }
	,sanitizeHTML: function(html) { return html.replace(/<[^>]+>/g, ''); }
	
	,isFStyle: function(o) { if(!o) return false; return (typeof o.cssMap != 'undefined'); }
};


__flirstyle_instances=0;
function FLIRStyle(options, hoverStyle) {
	__flirstyle_instances++;
	this.uid						= __flirstyle_instances;
	this.replaceBackground	= false;
	this.hoverStyle			= hoverStyle && FLIR.isFStyle(hoverStyle) ? hoverStyle : this;
	
	this.options = {};
	this.defaults = {
		 mode: 			'static'
		,output:			'auto'
		,fixBaseline: 	false
		,hq:				false
		,css:				{}
	};
	
	this.cssMap = {
		 'background-color'	: 'Background'
		,'color'					: 'Color'
		,'font-family'			: 'Font'
		,'font-size'			: 'FontSize'
		,'letter-spacing'		: 'Measurement'
		,'line-height'       : 'LineHeight'
		,'text-align'			: 'Default'
		,'font-stretch'		: 'Default'
		,'font-style'			: 'FontStyle'
		,'font-variant'		: 'Default'
		,'font-weight'       : 'Weight'
		,'opacity'           : 'Default'
		,'text-decoration'   : 'Default'
	};
	
	for(var i in this.defaults) 
		this.options[i] = this.defaults[i];

	if(options && typeof options.css == 'string')
		options.css = this.parse_css_string(options.css);

	this.loadopts(options);
}

FLIRStyle.prototype.loadopts = function(options) {
	for(var i in this.cssMap)
		this.options['css'][i] = null;


	if(typeof this.loadopts_compat == 'function')
		options = this.loadopts_compat(options);

	if(typeof options != 'undefined') {
		for(var i in options) {
			if(options[i] == null) continue;
			if(typeof this[i] != 'undefined') {
				this[i] = options[i];
			}else {
				if(i=='css') {
					for(var csi in options[i]) {
						prop = csi.replace(/[A-Z]/g, function(w){
							return '-'+w.toLowerCase();
						});
						this.options[i][prop] = options[i][csi];
					}
				}else
					this.options[i] = options[i];
			}
		}
	}
};

FLIRStyle.prototype.parse_css_string = function(css) {
	var props = css.split(';');
	var cssobj = {};
	var vals;
	for(var i=0; i < props.length; i++) {
		if(props[i].indexOf(':') < 0) continue;
		vals = props[i].split(':');
		cssobj[vals[0].replace(/^\s+|\s+$/, '')] = vals[1].replace(/^\s+|\s+$/, '');
	}
	
	return cssobj;
};
FLIRStyle.prototype.URL = function(o) { 
	var enc_text = (arguments[1]?arguments[1]:o.innerHTML);
	var transform = this.options.css['text-transform'];
	if(transform==null)
		transform = FLIR.getStyle(o, 'text-transform');
	
	switch(transform) {
		case 'capitalize':
			enc_text = enc_text.replace(/\w+/g, function(w){
				return w.charAt(0).toUpperCase()+w.substr(1).toLowerCase();
			});
			break;
		case 'lowercase':
			enc_text = enc_text.toLowerCase();
			break;
		case 'uppercase':
			enc_text = enc_text.toUpperCase().replace(/&[a-z0-9]+;/gi, function(m) { return m.toLowerCase(); });
			break;
	}

	enc_text = this.encodeText(enc_text, o.flirIE6PNG);
	
	var url = FLIR.options.path+'generate.php?t='+enc_text+'&h='+o.offsetHeight+'&w='+o.offsetWidth+'&c='+this.flattenCSS(o)+'&d='+FLIR.dpi+'&f='+this.serialize();
	
	if(FLIR.debug)
		url += '&rand='+(Math.random()*Math.random());
	
	return url;
};

FLIRStyle.prototype.encodeText = function(str, bIE6Png) { 
	str = encodeURIComponent(str.replace(/&/g, '{*A}').replace(/\+/g, '{*P}').replace(/\(/g, '{*LP}').replace(/\)/g, '{*RP}')); 
	if(bIE6Png)
		str = escape(str);
	return str;
};

FLIRStyle.prototype.serialize = function() {
	var sdata = '';
	for(var i in this.options) {
		if(i=='css') continue;
		sdata += ',"'+i+'":"'+this.options[i].toString().replace(/"/g, "'")+'"';
	}
	
	return encodeURIComponent('{'+sdata.substr(1)+'}');
};

FLIRStyle.prototype.flattenCSS = function(o) {
	var options = this.copyObject(this.options.css);
	
	for(var i in this.cssMap) {
		this.options.css[i] = this.get(o, i, this.cssMap[i]);
	}
	
	var sdata='';
	for(var i in this.options.css) {
		if(this.options.css[i] == null || typeof this.options.css[i] == 'undefined')
			this.options.css[i] = '';
		sdata += '|'+encodeURIComponent(this.options.css[i].toString().replace(/|/g, ''));
	}
	
	sdata = sdata.substr(1);
	this.options.css = options;
	
	return sdata;
};

FLIRStyle.prototype.get = function(o, css_property, flirstyle_name) {
	var func = 'get'+flirstyle_name;
	
	while(o.flirSpan && o != document.body)
		o = FLIR.getParentNode(o);
	
	var optprop = this.options.css[css_property];
	var val = !optprop || optprop == null ? FLIR.getStyle(o, css_property) : this.options.css[css_property];
	var ret = typeof this[func] == 'function' ? this[func](o, val) : val;
	return ret == 'normal' || ret == 'none' || ret == 'start' ? '' : ret;
};

FLIRStyle.prototype.getFontStyle = function(o, val) { 
	return (o.nodeName=='EM' || FLIR.getParentNode(o).nodeName=='EM' ? 'italic' : val) == 'italic' ? '1' : '';
};

FLIRStyle.prototype.getBackground = function(o, val) { 
	if(this.options.output=='gif' && val.search(/^(transparent|none)$/i) > -1) {
		var p = FLIR.getParentNode(o);
		var pstyle = FLIR.getStyle(p, 'background-color');
		
		if(typeof __flirstyle_root_obj == 'undefined')
			__flirstyle_root_obj = FLIR.getParentNode(document.body);

		while(pstyle.search(/^(transparent|none)$/i) > -1 && p != __flirstyle_root_obj) {
			p = FLIR.getParentNode(p);
			pstyle = FLIR.getStyle(p, 'background-color');
		}
		return this.getColor(o, pstyle);
	}else {
		return this.getColor(o, val);
	}
};

FLIRStyle.prototype.getWeight = function(o, val) { 
	var fontweight = o.nodeName=='STRONG' || FLIR.getParentNode(o).nodeName=='STRONG' ? 'bold' : val;
	
	switch(fontweight.toString()) {
		case '100': case '200': case '300': case 'lighter':	return '-1';
		case '400': case 'normal':										return '';
		case '500': case '600': case '700': case 'bold':		return '1';
		case '800': case '900': case 'bolder':						return '2';
	}
};

FLIRStyle.prototype.getLineHeight = function(o, val) { 
	var lh = this.getMeasurement(o, val)/o.flirFontSize;
	return Math.round((lh*100000))/100000;
};

FLIRStyle.prototype.getFont = function(o, val) { 
    if(val.indexOf(','))
        val = val.split(',')[0];

    return val.replace(/['"]/g, '').toLowerCase();
};

FLIRStyle.prototype.getColor = function(o, val) {
	switch(val) {
		case 'transparent': case 'none': return '';
		default:
			if(val.substr(0, 1)=='#')
				val = val.substr(1);
	
			return val.replace(/['"\(\) ]|rgba?/g, '').toLowerCase();
	}
};

FLIRStyle.prototype.getFontSize = function(o, val) {
	var px = this.getMeasurement(o, val, true);
	var prepx = px;
	if('*/+-'.indexOf(val[0])>-1) {
		try {
			px = Math.round(   (parseFloat(eval(px.toString().concat(val))))  *10000)/10000;
		}catch(err) { px = 16; }
	}
	
	o.flirFontSize = px;
	return px;
};

FLIRStyle.prototype.getMeasurement = function(o, val, bFontSize) {
	var px,em,prcnt;
	if(val == 'normal' || val == 'none') return '';

	if(val.indexOf('px') > -1) {
		px = Math.round(parseFloat(val));
	}else if(val.indexOf('pt') > -1) {
		var pts = parseFloat(val);
		px = pts/(72/FLIR.dpi);
	}else if((em = (val.indexOf('em') > -1)) || (prcnt = (val.indexOf('%') > -1))) {
		if(!o.flirFontSize) {
			var test = document.createElement('DIV');
			test.style.padding = test.style.border = '0';
			test.style.position='absolute';
			test.style.visibility='hidden';
			if(bFontSize)
				test.style.lineHeight = '100%';
			test.innerHTML = 'FlirTest';        
			o.appendChild(test);
			
			px = test.offsetHeight;
			o.removeChild(test);
		}else {
			px = o.flirFontSize;
		}
	}
	
	return px;
};

FLIRStyle.prototype.copyObject = function(obj) { 
    var copy = {};
    for(var i in obj) {
        copy[i] = obj[i];    
    }
    
    return copy;
};

FLIRStyle.prototype.toString = function() { return this.uid; };
FLIR.detectBrowser = function() {
	FLIR.isIE  = (navigator.userAgent.toLowerCase().indexOf('msie')>-1 && !window.opera);
	FLIR.isIE6 = (typeof document.body.style.maxHeight=='undefined');
};

FLIR.getElements = function(tag) {
  var found = [];

  if(document.querySelectorAll) {
		var qsa = false;
		try{
			 found = document.querySelectorAll(tag);
			 qsa = true;
		}catch(err){ qsa=false; }

		if(qsa)
			 return found;
  }

  var objs,subels,cn,childs,tag,el,matches,subel,rep_el;

  el = tag;
  
  subel=false;
	if(el.indexOf(' ')>-1) {
		var parts = el.split(' ');
		el = parts[0];
		subel = parts[1];
	}else if(el.substr(0,1) == '#') {
		return document.getElementById(el.substr(1));
	}
  
  var grain_id=false;
  if(el.indexOf('#') > -1) {
		grain_id = el.split('#')[1];
		tag = el.split('#')[0];
  }

  var grain_cn=false;
  if(el.indexOf('.') > -1) {
		grain_cn = el.split('.')[1];
		tag = el.split('.')[0];
  }

  objs = document.getElementsByTagName(tag);
  for(var p=0; p<objs.length; p++) {
		if(objs[p].nodeType != 1) continue;
		matches = false;
		cn = objs[p].className?objs[p].className:'';
		
		if(grain_id && objs[p].id && objs[p].id == grain_id)
			 matches=true;
		if(grain_cn && FLIR.hasClass(objs[p], grain_cn))
			 matches=true;
		if(!grain_id && !grain_cn)
			 matches=true;
		
		if(!matches) continue;
		
		subels = false != subel ? objs[p].getElementsByTagName(subel) : [objs[p]];
		for(var pp=0; pp<subels.length; pp++) {
			 rep_el = subels[pp];
			 found.push(rep_el);
		}
  }
  
  return found;
}

FLIR.getStyle = function(el,prop) {
  if(el.currentStyle) {
		if(prop.indexOf('-') > -1)
			 prop = prop.split('-')[0]+prop.split('-')[1].substr(0, 1).toUpperCase()+prop.split('-')[1].substr(1);
		var y = el.currentStyle[prop];
  }else if(window.getComputedStyle) {
		var y = document.defaultView.getComputedStyle(el,'').getPropertyValue(prop);
  }
  return y;
};
  
FLIR.getChildren = function(n) {
  var children=[];
  if(n && n.hasChildNodes())
		for(var i in n.childNodes)
			 if(n.childNodes[i] && n.childNodes[i].nodeType == 1)
				  children[children.length]=n.childNodes[i];

  return children;
};

FLIR.getParentNode = function(n) {
  var o=n.parentNode;
  while(o != document && o.nodeType != 1)
		o=o.parentNode;

  return o;
};

FLIR.hasClass = function(o, cn) {
  return (o && o.className && o.className.indexOf(cn)>-1);
};

FLIR.evsrc = function(e) {
  var o;
  if (e.target) o = e.target;
  else if (e.srcElement) o = e.srcElement;
  if (o.nodeType == 3)
		o = o.parentNode;    
		
  return o;
};
FLIR.addHover = function(obj) {
	if(!(args = FLIR.pcall('addHover', arguments))) return;
	obj	= args[0];

	obj.flirHasHover = true;
	
	if(obj.addEventListener) {
		obj.addEventListener( 'mouseover', FLIR.hover, false );
		obj.addEventListener( 'mouseout', FLIR.hover, false );
	}else if (obj.attachEvent) {
		obj.attachEvent( 'onmouseover', function() { FLIR.hover( window.event ); } );
		obj.attachEvent( 'onmouseout', function() { FLIR.hover( window.event ); } );
	}
};

FLIR.flirIERepObj 	= [];
FLIR.flirIEHovEls 	= [];
FLIR.flirIEHovStyles = [];	
FLIR.hover = function(e) {
	console.log('hover');
	var o=FLIR.evsrc(e);
	var targ=o;
	var targDescHover = o.flirHasHover;
	var hoverTree = o;
	
	var on = (e.type == 'mouseover');
	
	while(o != document.body && !o.flirMainObj) {
		o = FLIR.getParentNode(o);
		
		if(!targDescHover) {
				targDescHover = o.flirHasHover;
				hoverTree = o;
		}
	}
	
	if(o==document.body) return;
	
	var FStyle = o.flirStyle;
	if(on && FStyle != FStyle.hoverStyle)
		FStyle = FStyle.hoverStyle;
	
	if(!(args = FLIR.pcall('hover', [ on, targ, o, hoverTree ]))) return;
	on				= args[0];
	targ 			= args[1];
	o 				= args[2];
	hoverTree 	= args[3];

	var objs = FLIR.getChildren(hoverTree);
	if(objs.length == 0 || (objs.length == 1 && (objs[0].flirImage || objs[0].flirHasHover))) {
		objs = [hoverTree];
	}else if(objs.length == 1 && !FLIR.isIgnoredEl(objs[0])) {
		var subobjs = FLIR.getChildren(objs[0]);
		if(subobjs.length > 0)
			if((subobjs.length==1 && !subobjs[0].flirImage) || subobjs.length > 1)
				objs = subobjs;
	}

	var rep_obj;
	for(var i=0; i < objs.length; i++) {
		rep_obj = objs[i];
		if(rep_obj.nodeName == 'IMG') continue;
		if(!rep_obj.innerHTML) continue; 

		if(FLIR.isIE) {
			var idx = FLIR.flirIEHovEls.length;
			FLIR.flirIERepObj[idx] = rep_obj;
			FLIR.flirIEHovStyles[idx] = FStyle;
			
			var op = FStyle.options.output;
			if(FLIR.isIE6 && (rep_obj.flirIE6PNG = (op == 'png' || (op =='auto' && FLIR.getStyle(rep_obj, 'background-color')=='transparent')))){ 
				FLIR.flirIEHovEls[idx] = rep_obj.flirImage ? rep_obj : FLIR.getChildren(rep_obj)[0];
				setTimeout('FLIR.flirIEHovEls['+idx+'].style.filter = \'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="\'+FLIR.flirIEHovStyles['+idx+'].URL(FLIR.flirIERepObj['+idx+'], FLIR.flirIEHovEls['+idx+'].alt)+\'", sizingMethod="image")\';  ', 0);
			}else {
				if(FStyle.replaceBackground && FLIR.getStyle(rep_obj, 'display') == 'block') {
					FLIR.flirIEHovEls[idx] = rep_obj;
					setTimeout('FLIR.flirIERepObj['+idx+'].style.background = "url("+('+on+' ? FLIR.flirIEHovStyles['+idx+'].URL(FLIR.flirIERepObj['+idx+']) : FLIR.flirIERepObj['+idx+'].flirOrig)+") no-repeat";', 0);
				}else {
					FLIR.flirIEHovEls[idx] = rep_obj.flirImage ? rep_obj : FLIR.getChildren(rep_obj)[0];
					if(!FLIR.flirIEHovEls[idx].flirOrigWidth) {
						FLIR.flirIEHovEls[idx].flirOrigWidth = FLIR.flirIEHovEls[idx].width;
						FLIR.flirIEHovEls[idx].flirOrigHeight = FLIR.flirIEHovEls[idx].height;
					}
					var ie_js = 'FLIR.flirIEHovEls['+idx+'].src = '+on+' ? FLIR.flirIEHovStyles['+idx+'].URL(FLIR.flirIERepObj['+idx+'], FLIR.flirIEHovEls['+idx+'].alt) : FLIR.flirIERepObj['+idx+'].flirOrig;'
					ie_js += 'FLIR.flirIEHovEls['+idx+'].onload = function() { ';
					if(on && !FLIR.flirIEHovEls[idx].flirHoverWidth) {
						ie_js += '		FLIR.flirIEHovEls['+idx+'].flirHoverWidth = this.width; ';
						ie_js += '		FLIR.flirIEHovEls['+idx+'].flirHoverHeight = this.height; ';
					}
					ie_js += '	this.style.width = FLIR.flirIEHovEls['+idx+'].'+(on?'flirHoverWidth':'flirOrigWidth')+'+"px"; ';
					ie_js += '	this.style.height = FLIR.flirIEHovEls['+idx+'].'+(on?'flirHoverHeight':'flirOrigHeight')+'+"px"; ';
					ie_js += '}; ';
					setTimeout(ie_js, 0);
				}
			}
		}else {
			if(FStyle.replaceBackground) {
				var hovURL = rep_obj.flirHoverURL ? rep_obj.flirHoverURL : FStyle.URL(rep_obj);
				rep_obj.style.background='url('+(on?hovURL:rep_obj.flirOrig)+') no-repeat';
			}else {
				var img = rep_obj.flirImage ? rep_obj : FLIR.getChildren(rep_obj)[0];
				var hovURL = rep_obj.flirHoverURL ? rep_obj.flirHoverURL : FStyle.URL(rep_obj, img.alt);
				img.src = on?hovURL:rep_obj.flirOrig;
			}
		}
	}
};FLIRStyle.prototype.loadopts_compat = function(options) {
	if(!options) return;
	if(!options.css) options.css = {};
	if(typeof options.realFontHeight != 'undefined')
		options.fixBaseline = options.realFontHeight ? true : false;
	
	var css_compat = {
		 cBackground	: 'background-color'
		,cColor			: 'color'
		,cFont			: 'font-family'
		,cSize			: 'font-size'
		,cSpacing		: 'letter-spacing'
		,cLine			: 'line-height'
		,cAlign			: 'text-align'
		,cTransform		: 'text-transform'
		,cStretch		: 'font-stretch'
		,cFontStyle		: 'font-style'
		,cVariant		: 'font-variant'
		,cWeight			: 'font-weight'
		,cOpacity		: 'opacity'
		,cDecoration	: 'text-decoration'
	};
	
	var modval;
	for(var i in css_compat) {
		if(typeof options[i] != 'undefined') {
			switch(i) {
				default:
					modval = options[i];
					break;
				case 'cSize':
					modval = options[i]+'px';
					break;
				case 'cColor':
				case 'cBackground':
					modval = '#'+options[i];
					break;
			}
			options.css[css_compat[i]] = modval;
			options[i] = null;
		}
	}
	
	return options;
};

FLIR.auto = function(els) { 
	FLIR.replace((!els ? ['h1','h2','h3','h4','h5']: (els.indexOf && els.indexOf(',')>-1?els.split(','):els) )); 
}
$(function() {
	$("ul.tabs").tabs("div.panes > div", {effect: 'slide', initialIndex: 0, rotate: 'true'});

});

$(function(){	
	$('ul.sf-menu').superfish({});
});
$(document).ready(function () {
	
	$('#toggle-view li').click(function () {

		var text = $(this).children('p');

		if (text.is(':hidden')) {
			text.slideDown('200');
			$(this).children('span').html('<img src="img/arrow_up-000.gif" />');		
		} else {
			text.slideUp('200');
			$(this).children('span').html('<img src="img/arrow_down-000.gif" />');		
		}
		
	});
	$('#toggle-view-benefits li').click(function () {

		var text = $(this).children('p');

		if (text.is(':hidden')) {
			text.slideDown('200');
			$(this).children('span').html('-');
			$(this).children('h4').css({'font-weight':'bold'});
		} else {
			text.slideUp('200');
			$(this).children('span').html('+');
			$(this).children('h4').css({'font-weight':'normal'});
		}
		
	});
	$('#toggle-view-archive li').click(function () {

		var text = $(this).children('p');

		if (text.is(':hidden')) {
			text.slideDown('200');
			$(this).children('span').html('<img src="img/arrow_up-000.gif" />');		
		} else {
			text.slideUp('200');
			$(this).children('span').html('<img src="img/arrow_down-000.gif" />');		
		}
		
	});
	$("a#showSWF").fancybox({
		'speedIn'		:	600, 
		'speedOut'		:	200, 
		'overlayShow'	:	true
	});
});


$('#searchbox').corner("bl");
$('#mainTable').corner("bottom");
$('#stage1').corner();
$('#stage2').corner();
$('#stage3').corner();
$('#stage4').corner();
$('#stage5').corner();
//$('#HIEStagesExpand').corner();
//$('#HIEStagesCollapse').corner();
$('#contactRounded').corner();
$('#blogHeader').corner();

$(function(){

	$('.sf-menu a')
		.css( {backgroundPosition: "0 0"} )
		.mouseover(function(){			
			$(this).stop().animate({backgroundPosition:"(0 -250px)"}, {duration:500})
			$(this).css({color:"#FFF"})
		})
		.mouseout(function(){
			$(this).stop().animate({backgroundPosition:"(0 0)"}, {duration:500})
			$(this).css({color:"#000"})
		})
	
	
	$('.sf-menu li')
		.css( {backgroundPosition: "0 0"} )
		.mouseover(function(){
			var topMenu = $('a.top',this);				
			topMenu.stop().animate({backgroundPosition:"(0 -250px)"}, {duration:500})
			topMenu.css({color:"#FFF"})
		})
		.mouseout(function(){
			var topMenu = $('a.top',this);
			topMenu.stop().animate({backgroundPosition:"(0 0)"}, {duration:500})
			topMenu.css({color:"#000"})
		})
		
	$('.sf-menu li ul li')
		.css( {backgroundPosition: "0 0"} )
		.mouseover(function(){
			var topMenu = $('a.subTop',this);				
			topMenu.stop().animate({backgroundPosition:"(0 -250px)"}, {duration:500})
			topMenu.css({color:"#FFF"})
		})
		.mouseout(function(){
			var topMenu = $('a.subTop',this);
			topMenu.stop().animate({backgroundPosition:"(0 0)"}, {duration:500})
			topMenu.css({color:"#000"})
		})
});
jQuery(document).ready(function() {
	$("#aristacare").click(function() {
		$.fancybox({
			'padding'		: 0,
			'href'			: 'img/clients/aristacare.gif',
			'title'   		: 'Aristacare <br /> <a href="http://www.aristacare.com/" target="_blank">Link</a>',
			'titlePosition'  : 'inside',
			'transitionIn'	: 'elastic',
			'transitionOut'	: 'elastic'
		});
	});
	$("#bmc").click(function() {
		$.fancybox({
			'padding'		: 0,
			'href'			: 'img/clients/BHC_logo.gif',
			'title'   		: 'Bayonne Medical Center <br /> <a href="http://www.bayonnemedicalcenter.org/" target="_blank">Link</a>',
			'titlePosition'  : 'inside',
			'transitionIn'	: 'elastic',
			'transitionOut'	: 'elastic'
		});
	});
	$("#bluemountain").click(function() {
		$.fancybox({
			'padding'		: 0,
			'href'			: 'img/clients/BlueMountain.png',
			'title'   		: 'BlueMountain Health System <br /> <a href="http://www.ghmh.org" target="_blank">Link</a>',
			'titlePosition'  : 'inside',
			'transitionIn'	: 'elastic',
			'transitionOut'	: 'elastic'
		});
	});
	$("#capital").click(function() {
		$.fancybox({
			'padding'		: 0,
			'href'			: 'img/clients/capital.png',
			'title'   		: 'CapitalHealth <br /> <a href="http://www.capitalhealth.org/" target="_blank">Link</a>',
			'titlePosition'  : 'inside',
			'transitionIn'	: 'elastic',
			'transitionOut'	: 'elastic'
		});
	});
	$("#centra").click(function() {
		$.fancybox({
			'padding'		: 0,
			'href'			: 'img/clients/centrastate.png',
			'title'   		: 'CentraState Healthcare System <br /> <a href="http://www.centrastate.com/" target="_blank">Link</a>',
			'titlePosition'  : 'inside',
			'transitionIn'	: 'elastic',
			'transitionOut'	: 'elastic'
		});
	});
	$("#community").click(function() {
		$.fancybox({
			'padding'		: 0,
			'href'			: 'img/clients/community.png',
			'title'   		: 'Community Medical Centers <br/><a href="http://www.communitymedical.org/" target="_blank">Link</a>',
			'titlePosition'  : 'inside',
			'transitionIn'	: 'elastic',
			'transitionOut'	: 'elastic'
		});
	});
	$("#csh").click(function() {
		$.fancybox({
			'padding'		: 0,
			'href'			: 'img/clients/csh_logo.jpg',
			'title'   		: 'Children\'s Specialized Hospital <br /> <a href="http://www.childrens-specialized.org/default.asp" target="_blank">Link</a>',
			'titlePosition'  : 'inside',
			'transitionIn'	: 'elastic',
			'transitionOut'	: 'elastic'
		});
	});
	$("#hunterdon").click(function() {
		$.fancybox({
			'padding'		: 0,
			'href'			: 'img/clients/hunterdon.jpg',
			'title'   		: 'Hunterdon Medical Center <br /> <a href="http://www.hunterdonhealthcare.org/hmc.asp" target="_blank">Link</a>',
			'titlePosition'  : 'inside',
			'transitionIn'	: 'elastic',
			'transitionOut'	: 'elastic'
		});
	});
	$("#kimball").click(function() {
		$.fancybox({
			'padding'		: 0,
			'href'			: 'img/clients/Kimball.png',
			'title'   		: 'Kimball Medical Center <br /> <a href="http://www.saintbarnabas.com/hospitals/kimbal_medical/index.html" target="_blank">Link</a>',
			'titlePosition'  : 'inside',
			'transitionIn'	: 'elastic',
			'transitionOut'	: 'elastic'
		});
	});
	$("#monmouth").click(function() {
		$.fancybox({
			'padding'		: 0,
			'href'			: 'img/clients/Monmouth.png',
			'title'   		: 'Monmouth Medical Center <br /> <a href="http://www.saintbarnabas.com/hospitals/monmouth_medical/" target="_blank">Link</a>',
			'titlePosition'  : 'inside',
			'transitionIn'	: 'elastic',
			'transitionOut'	: 'elastic'
		});
	});
	$("#monmouthmg").click(function() {
		$.fancybox({
			'padding'		: 0,
			'href'			: 'img/clients/monmouth_header.jpg',
			'title'   		: 'Monmouth Medical Group <br /> <a href="http://www.monmouthmedicalgroup.com/" target="_blank">Link</a>',
			'titlePosition'  : 'inside',
			'transitionIn'	: 'elastic',
			'transitionOut'	: 'elastic'
		});
	});
	$("#raritan").click(function() {
		$.fancybox({
			'padding'		: 0,
			'href'			: 'img/clients/raritanbay.jpg',
			'title'   		: 'Raritan Bay Medical Center <br /> <a href="http://www.rbmc.org/" target="_blank">Link</a>',
			'titlePosition'  : 'inside',
			'transitionIn'	: 'elastic',
			'transitionOut'	: 'elastic'
		});
	});
	$("#rwj").click(function() {
		$.fancybox({
			'padding'		: 0,
			'href'			: 'img/clients/rwjuh-edu.gif',
			'title'   		: 'Robert Wood Johnson University Hospital <br /> <a href="http://www.rwjuh.edu/" target="_blank">Link</a>',
			'titlePosition'  : 'inside',
			'transitionIn'	: 'elastic',
			'transitionOut'	: 'elastic'
		});
	});
	$("#rwjhamilton").click(function() {
		$.fancybox({
			'padding'		: 0,
			'href'			: 'img/clients/rwj-hamilton.jpg',
			'title'   		: 'Robert Wood Johnson University Hospital - Hamilton <br /> <a href="http://www.rwjhamilton.org/" target="_blank">Link</a>',
			'titlePosition'  : 'inside',
			'transitionIn'	: 'elastic',
			'transitionOut'	: 'elastic'
		});
	});
	$("#rwjrahway").click(function() {
		$.fancybox({
			'padding'		: 0,
			'href'			: 'img/clients/rwj-rahway.jpg',
			'title'   		: 'Robert Wood Johnson University Hospital - Rahway <br /> <a href="http://www.rwjuhr.com/" target="_blank">Link</a>',
			'titlePosition'  : 'inside',
			'transitionIn'	: 'elastic',
			'transitionOut'	: 'elastic'
		});
	});
	$("#stbarnabas").click(function() {
		$.fancybox({
			'padding'		: 0,
			'href'			: 'img/clients/saint-b_logo.gif',
			'title'   		: 'Saint Barnabas Health Care System <br /> <a href="http://www.saintbarnabas.com/" target="_blank">Link</a>',
			'titlePosition'  : 'inside',
			'transitionIn'	: 'elastic',
			'transitionOut'	: 'elastic'
		});
	});
	$("#siemens").click(function() {
		$.fancybox({
			'padding'		: 0,
			'href'			: 'img/clients/siemens.jpg',
			'title'   		: 'Siemens Medical Center <br /> <a href="http://www.medical.siemens.com/" target="_blank">Link</a>',
			'titlePosition'  : 'inside',
			'transitionIn'	: 'elastic',
			'transitionOut'	: 'elastic'
		});
	});
	$("#somerset").click(function() {
		$.fancybox({
			'padding'		: 0,
			'href'			: 'img/clients/somerset.png',
			'title'   		: 'Somerset Medical Center <br /> <a href="http://www.somersetmedicalcenter.com/" target="_blank">Link</a>',
			'titlePosition'  : 'inside',
			'transitionIn'	: 'elastic',
			'transitionOut'	: 'elastic'
		});
	});
	$("#tht").click(function() {
		$.fancybox({
			'padding'		: 0,
			'href'			: 'img/clients/tht.png',
			'title'   		: 'Trenton Health Team, Inc',
			'titlePosition'  : 'inside',
			'transitionIn'	: 'elastic',
			'transitionOut'	: 'elastic'
		});
	});
	$(".bedconnectGallery").click(function() {
		$.fancybox([
			{ 'href' : 'http://www.blueprinthit.com/wp-content/uploads/2009/10/bedboard.gif', 'title': '<strong>Bed Board View</strong><br/>&bull; Visual &amp; Color-Coded "bed board" status indicators<br/>&bull; Automatic Census indicators: wholehouse, per unit<br/>&bull; Detailed patient information pop-ups ("InstaGlance")<br/>&bull; Automatic and manual assignments and task requests<br/>&bull; Telemetry indicators<br/>&bull; Out-of-Bed status and location identifiers<br/>&bull; Status Conflict Indicators<br/>&nbsp;' },
			{ 'href' : 'http://www.blueprinthit.com/img/bedconnect/Housekeeping2.png', 'title': '<strong>Housekeeping View</strong><br/>&bull; Watch as BedConnect assigns tasks and monitors for completion<br/>&bull; Optimize your staff\'s workload and schedules<br/>&bull; Zones keep staff within optimal work areas<br/>&nbsp;' },
			{ 'href' : 'http://www.blueprinthit.com/img/bedconnect/Transport2.png', 'title' : '<strong>Transport View</strong><br/>&bull; Intelligent analysis allows managers to prioritize and make the right choices.<br/>&bull; Assess performance of staff members<br/>&nbsp;' },
			{ 'href' : 'http://www.blueprinthit.com/wp-content/uploads/2009/10/reporting.gif', 'title': '<strong>Reporting, Analysis and Performance Metrics</strong><br/>&bull; Average Patient Length of Stay (ALOS)<br/>&bull; Total Tasks<br/>&bull; Average Completion Times<br/>&bull; Overall Task Performance<br/>&bull; Employee Performance<br/>&bull; and many more...<br/>&nbsp;'}
		], {
			'padding'			: 0,
			'transitionIn'		: 'none',
			'transitionOut'		: 'none',
			'type'              : 'image',
			'changeFade'        : 0,
			'titlePosition'  	: 'over',
			'cyclic'			: 'true',
			'showNavArrows'		: true,
			'titleFormat'       : function(title, currentArray, currentIndex, currentOpts) {
		    return '<span id="fancybox-title-over"><span style="float:right">Image ' +  (currentIndex + 1) + ' / ' + currentArray.length + '</span>' + title + '</span>';
			},
			'onComplete' 		: function(){
										$("#fancybox-wrap").hover(function() {
											$("#fancybox-title").show();
										},
										function() {
											$("#fancybox-title").hide();
										});
									}
		});
	});
	$("#bedConnectNext").click(function(){$.fancybox.next()});
});

/*!	SWFObject v2.0 <http://code.google.com/p/swfobject/>	Copyright (c) 2007 Geoff Stearns, Michael Williams, and Bobby van der Sluis	This software is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>*/var swfobject = function() {		var UNDEF = "undefined",		OBJECT = "object",		SHOCKWAVE_FLASH = "Shockwave Flash",		SHOCKWAVE_FLASH_AX = "ShockwaveFlash.ShockwaveFlash",		FLASH_MIME_TYPE = "application/x-shockwave-flash",		EXPRESS_INSTALL_ID = "SWFObjectExprInst",				win = window,		doc = document,		nav = navigator,				domLoadFnArr = [],		regObjArr = [],		timer = null,		storedAltContent = null,		storedAltContentId = null,		isDomLoaded = false,		isExpressInstallActive = false;		/* Centralized function for browser feature detection		- Proprietary feature detection (conditional compiling) is used to detect Internet Explorer's features		- User agent string detection is only used when no alternative is possible		- Is executed directly for optimal performance	*/		var ua = function() {		var w3cdom = typeof doc.getElementById != UNDEF && typeof doc.getElementsByTagName != UNDEF && typeof doc.createElement != UNDEF && typeof doc.appendChild != UNDEF && typeof doc.replaceChild != UNDEF && typeof doc.removeChild != UNDEF && typeof doc.cloneNode != UNDEF,			playerVersion = [0,0,0],			d = null;		if (typeof nav.plugins != UNDEF && typeof nav.plugins[SHOCKWAVE_FLASH] == OBJECT) {			d = nav.plugins[SHOCKWAVE_FLASH].description;			if (d) {				d = d.replace(/^.*\s+(\S+\s+\S+$)/, "$1");				playerVersion[0] = parseInt(d.replace(/^(.*)\..*$/, "$1"), 10);				playerVersion[1] = parseInt(d.replace(/^.*\.(.*)\s.*$/, "$1"), 10);				playerVersion[2] = /r/.test(d) ? parseInt(d.replace(/^.*r(.*)$/, "$1"), 10) : 0;			}		}		else if (typeof win.ActiveXObject != UNDEF) {			var a = null, fp6Crash = false;			try {				a = new ActiveXObject(SHOCKWAVE_FLASH_AX + ".7");			}			catch(e) {				try { 					a = new ActiveXObject(SHOCKWAVE_FLASH_AX + ".6");					playerVersion = [6,0,21];					a.AllowScriptAccess = "always";				}				catch(e) {					if (playerVersion[0] == 6) {						fp6Crash = true;					}				}				if (!fp6Crash) {					try {						a = new ActiveXObject(SHOCKWAVE_FLASH_AX);					}					catch(e) {}				}			}			if (!fp6Crash && a) {				try {					d = a.GetVariable("$version");					if (d) {						d = d.split(" ")[1].split(",");						playerVersion = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];					}				}				catch(e) {}			}		}		var u = nav.userAgent.toLowerCase(),			p = nav.platform.toLowerCase(),			webkit = /webkit/.test(u) ? parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false,			ie = false,			windows = p ? /win/.test(p) : /win/.test(u),			mac = p ? /mac/.test(p) : /mac/.test(u);		/*@cc_on			ie = true;			@if (@_win32)				windows = true;			@elif (@_mac)				mac = true;			@end		@*/		return { w3cdom:w3cdom, pv:playerVersion, webkit:webkit, ie:ie, win:windows, mac:mac };	}();	/* Cross-browser onDomLoad		- Based on Dean Edwards' solution: http://dean.edwards.name/weblog/2006/06/again/		- Will fire an event as soon as the DOM of a page is loaded (supported by Gecko based browsers - like Firefox -, IE, Opera9+, Safari)	*/ 	var onDomLoad = function() {		if (!ua.w3cdom) {			return;		}		addDomLoadEvent(main);		if (ua.ie && ua.win) {			try {				doc.write("<scr" + "ipt id=__ie_ondomload defer=true src=//:></scr" + "ipt>");				var s = getElementById("__ie_ondomload");				if (s) {					s.onreadystatechange = function() {						if (this.readyState == "complete") {							this.parentNode.removeChild(this);							callDomLoadFunctions();						}					};				}			}			catch(e) {}		}		if (ua.webkit && typeof doc.readyState != UNDEF) {			timer = setInterval(function() { if (/loaded|complete/.test(doc.readyState)) { callDomLoadFunctions(); }}, 10);		}		if (typeof doc.addEventListener != UNDEF) {			doc.addEventListener("DOMContentLoaded", callDomLoadFunctions, null);		}		addLoadEvent(callDomLoadFunctions);	}();		function callDomLoadFunctions() {		if (isDomLoaded) {			return;		}		if (ua.ie && ua.win) {			var s = createElement("span");			try {				var t = doc.getElementsByTagName("body")[0].appendChild(s);				t.parentNode.removeChild(t);			}			catch (e) {				return;			}		}		isDomLoaded = true;		if (timer) {			clearInterval(timer);			timer = null;		}		var dl = domLoadFnArr.length;		for (var i = 0; i < dl; i++) {			domLoadFnArr[i]();		}	}		function addDomLoadEvent(fn) {		if (isDomLoaded) {			fn();		}		else { 			domLoadFnArr[domLoadFnArr.length] = fn;		}	}		/* Cross-browser onload		- Based on James Edwards' solution: http://brothercake.com/site/resources/scripts/onload/		- Will fire an event as soon as a web page including all of its assets are loaded 	 */	function addLoadEvent(fn) {		if (typeof win.addEventListener != UNDEF) {			win.addEventListener("load", fn, false);		}		else if (typeof doc.addEventListener != UNDEF) {			doc.addEventListener("load", fn, false);		}		else if (typeof win.attachEvent != UNDEF) {			win.attachEvent("onload", fn);		}		else if (typeof win.onload == "function") {			var fnOld = win.onload;			win.onload = function() {				fnOld();				fn();			};		}		else {			win.onload = fn;		}	}		/* Main function		- Will preferably execute onDomLoad, otherwise onload (as a fallback)	*/	function main() {		var rl = regObjArr.length;		for (var i = 0; i < rl; i++) {			var id = regObjArr[i].id;			if (ua.pv[0] > 0) {				var obj = getElementById(id);				if (obj) {					regObjArr[i].width = obj.getAttribute("width") ? obj.getAttribute("width") : "0";					regObjArr[i].height = obj.getAttribute("height") ? obj.getAttribute("height") : "0";					if (hasPlayerVersion(regObjArr[i].swfVersion)) {						if (ua.webkit && ua.webkit < 312) {							fixParams(obj);						}						setVisibility(id, true);					}					else if (regObjArr[i].expressInstall && !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac)) {						showExpressInstall(regObjArr[i]);					}					else {						displayAltContent(obj);					}				}			}			else {				setVisibility(id, true);			}		}	}		/* Fix nested param elements, which are ignored by older webkit engines		- This includes Safari up to and including version 1.2.2 on Mac OS 10.3		- Fall back to the proprietary embed element	*/	function fixParams(obj) {		var nestedObj = obj.getElementsByTagName(OBJECT)[0];		if (nestedObj) {			var e = createElement("embed"), a = nestedObj.attributes;			if (a) {				var al = a.length;				for (var i = 0; i < al; i++) {					if (a[i].nodeName.toLowerCase() == "data") {						e.setAttribute("src", a[i].nodeValue);					}					else {						e.setAttribute(a[i].nodeName, a[i].nodeValue);					}				}			}			var c = nestedObj.childNodes;			if (c) {				var cl = c.length;				for (var j = 0; j < cl; j++) {					if (c[j].nodeType == 1 && c[j].nodeName.toLowerCase() == "param") {						e.setAttribute(c[j].getAttribute("name"), c[j].getAttribute("value"));					}				}			}			obj.parentNode.replaceChild(e, obj);		}	}		/* Fix hanging audio/video threads and force open sockets and NetConnections to disconnect		- Occurs when unloading a web page in IE using fp8+ and innerHTML/outerHTML		- Dynamic publishing only	*/	function fixObjectLeaks(id) {		if (ua.ie && ua.win && hasPlayerVersion("8.0.0")) {			win.attachEvent("onunload", function () {				var obj = getElementById(id);				if (obj) {					for (var i in obj) {						if (typeof obj[i] == "function") {							obj[i] = function() {};						}					}					obj.parentNode.removeChild(obj);				}			});		}	}		/* Show the Adobe Express Install dialog		- Reference: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=6a253b75	*/	function showExpressInstall(regObj) {		isExpressInstallActive = true;		var obj = getElementById(regObj.id);		if (obj) {			if (regObj.altContentId) {				var ac = getElementById(regObj.altContentId);				if (ac) {					storedAltContent = ac;					storedAltContentId = regObj.altContentId;				}			}			else {				storedAltContent = abstractAltContent(obj);			}			if (!(/%$/.test(regObj.width)) && parseInt(regObj.width, 10) < 310) {				regObj.width = "310";			}			if (!(/%$/.test(regObj.height)) && parseInt(regObj.height, 10) < 137) {				regObj.height = "137";			}			doc.title = doc.title.slice(0, 47) + " - Flash Player Installation";			var pt = ua.ie && ua.win ? "ActiveX" : "PlugIn",				dt = doc.title,				fv = "MMredirectURL=" + win.location + "&MMplayerType=" + pt + "&MMdoctitle=" + dt,				replaceId = regObj.id;			if (ua.ie && ua.win && obj.readyState != 4) {				var newObj = createElement("div");				replaceId += "SWFObjectNew";				newObj.setAttribute("id", replaceId);				obj.parentNode.insertBefore(newObj, obj);				obj.style.display = "none";				win.attachEvent("onload", function() { obj.parentNode.removeChild(obj); });			}			createSWF({ data:regObj.expressInstall, id:EXPRESS_INSTALL_ID, width:regObj.width, height:regObj.height }, { flashvars:fv }, replaceId);		}	}		/* Functions to abstract and display alternative content	*/	function displayAltContent(obj) {		if (ua.ie && ua.win && obj.readyState != 4) {			var el = createElement("div");			obj.parentNode.insertBefore(el, obj);			el.parentNode.replaceChild(abstractAltContent(obj), el);			obj.style.display = "none";			win.attachEvent("onload", function() { obj.parentNode.removeChild(obj); });		}		else {			obj.parentNode.replaceChild(abstractAltContent(obj), obj);		}	}		function abstractAltContent(obj) {		var ac = createElement("div");		if (ua.win && ua.ie) {			ac.innerHTML = obj.innerHTML;		}		else {			var nestedObj = obj.getElementsByTagName(OBJECT)[0];			if (nestedObj) {				var c = nestedObj.childNodes;				if (c) {					var cl = c.length;					for (var i = 0; i < cl; i++) {						if (!(c[i].nodeType == 1 && c[i].nodeName.toLowerCase() == "param") && !(c[i].nodeType == 8)) {							ac.appendChild(c[i].cloneNode(true));						}					}				}			}		}		return ac;	}		/* Cross-browser dynamic SWF creation	*/	function createSWF(attObj, parObj, id) {		var r, el = getElementById(id);		if (typeof attObj.id == UNDEF) {			attObj.id = id;		}		if (ua.ie && ua.win) {			var att = "";			for (var i in attObj) {				if (attObj[i] != Object.prototype[i]) {					if (i == "data") {						parObj.movie = attObj[i];					}					else if (i.toLowerCase() == "styleclass") {						att += ' class="' + attObj[i] + '"';					}					else if (i != "classid") {						att += ' ' + i + '="' + attObj[i] + '"';					}				}			}			var par = "";			for (var j in parObj) {				if (parObj[j] != Object.prototype[j]) {					par += '<param name="' + j + '" value="' + parObj[j] + '" />';				}			}			el.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + att + '>' + par + '</object>';			fixObjectLeaks(attObj.id);			r = getElementById(attObj.id);			}		else if (ua.webkit && ua.webkit < 312) {			var e = createElement("embed");			e.setAttribute("type", FLASH_MIME_TYPE);			for (var k in attObj) {				if (attObj[k] != Object.prototype[k]) {					if (k == "data") {						e.setAttribute("src", attObj[k]);					}					else if (k.toLowerCase() == "styleclass") {						e.setAttribute("class", attObj[k]);					}					else if (k != "classid") {						e.setAttribute(k, attObj[k]);					}				}			}			for (var l in parObj) {				if (parObj[l] != Object.prototype[l]) {					if (l != "movie") {						e.setAttribute(l, parObj[l]);					}				}			}			el.parentNode.replaceChild(e, el);			r = e;		}		else {			var o = createElement(OBJECT);			o.setAttribute("type", FLASH_MIME_TYPE);			for (var m in attObj) {				if (attObj[m] != Object.prototype[m]) {					if (m.toLowerCase() == "styleclass") {						o.setAttribute("class", attObj[m]);					}					else if (m != "classid") {						o.setAttribute(m, attObj[m]);					}				}			}			for (var n in parObj) {				if (parObj[n] != Object.prototype[n] && n != "movie") {					createObjParam(o, n, parObj[n]);				}			}			el.parentNode.replaceChild(o, el);			r = o;		}		return r;	}		function createObjParam(el, pName, pValue) {		var p = createElement("param");		p.setAttribute("name", pName);			p.setAttribute("value", pValue);		el.appendChild(p);	}		function getElementById(id) {		return doc.getElementById(id);	}		function createElement(el) {		return doc.createElement(el);	}		function hasPlayerVersion(rv) {		var pv = ua.pv, v = rv.split(".");		v[0] = parseInt(v[0], 10);		v[1] = parseInt(v[1], 10);		v[2] = parseInt(v[2], 10);		return (pv[0] > v[0] || (pv[0] == v[0] && pv[1] > v[1]) || (pv[0] == v[0] && pv[1] == v[1] && pv[2] >= v[2])) ? true : false;	}		/* Cross-browser dynamic CSS creation		- Based on Bobby van der Sluis' solution: http://www.bobbyvandersluis.com/articles/dynamicCSS.php	*/		function createCSS(sel, decl) {		if (ua.ie && ua.mac) {			return;		}		var h = doc.getElementsByTagName("head")[0], s = createElement("style");		s.setAttribute("type", "text/css");		s.setAttribute("media", "screen");		if (!(ua.ie && ua.win) && typeof doc.createTextNode != UNDEF) {			s.appendChild(doc.createTextNode(sel + " {" + decl + "}"));		}		h.appendChild(s);		if (ua.ie && ua.win && typeof doc.styleSheets != UNDEF && doc.styleSheets.length > 0) {			var ls = doc.styleSheets[doc.styleSheets.length - 1];			if (typeof ls.addRule == OBJECT) {				ls.addRule(sel, decl);			}		}	}		function setVisibility(id, isVisible) {		var v = isVisible ? "visible" : "hidden";		if (isDomLoaded) {			getElementById(id).style.visibility = v;		}		else {			createCSS("#" + id, "visibility:" + v);		}	}		function getTargetVersion(obj) {	    if (!obj)	        return 0;		var c = obj.childNodes;		var cl = c.length;		for (var i = 0; i < cl; i++) {			if (c[i].nodeType == 1 && c[i].nodeName.toLowerCase() == "object") {			    c = c[i].childNodes;			    cl = c.length;			    i = 0;			}     			if (c[i].nodeType == 1 && c[i].nodeName.toLowerCase() == "param" && c[i].getAttribute("name") == "swfversion") {			   return c[i].getAttribute("value"); 			}		}		return 0;	}    	function getExpressInstall(obj) {	    if (!obj)	        return "";		var c = obj.childNodes;		var cl = c.length;		for (var i = 0; i < cl; i++) {			if (c[i].nodeType == 1 && c[i].nodeName.toLowerCase() == "object") {			    c = c[i].childNodes;			    cl = c.length;			    i = 0;			}     			if (c[i].nodeType == 1 && c[i].nodeName.toLowerCase() == "param" && c[i].getAttribute("name") == "expressinstall") { 			    return c[i].getAttribute("value"); 			}	       		}		return "";	}    	return {		/* Public API			- Reference: http://code.google.com/p/swfobject/wiki/SWFObject_2_0_documentation		*/ 		registerObject: function(objectIdStr, swfVersionStr, xiSwfUrlStr) {			if (!ua.w3cdom || !objectIdStr) {				return;			}			var obj = document.getElementById(objectIdStr);			var xi = getExpressInstall(obj);			var regObj = {};			regObj.id = objectIdStr;			regObj.swfVersion = swfVersionStr ? swfVersionStr : getTargetVersion(obj);			regObj.expressInstall = xiSwfUrlStr ? xiSwfUrlStr : ((xi != "") ? xi : false);			regObjArr[regObjArr.length] = regObj;			setVisibility(objectIdStr, false);		},				getObjectById: function(objectIdStr) {			var r = null;			if (ua.w3cdom && isDomLoaded) {				var o = getElementById(objectIdStr);				if (o) {					var n = o.getElementsByTagName(OBJECT)[0];					if (!n || (n && typeof o.SetVariable != UNDEF)) {				    	r = o;					}					else if (typeof n.SetVariable != UNDEF) {						r = n;					}				}			}			return r;		},				embedSWF: function(swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, xiSwfUrlStr, flashvarsObj, parObj, attObj) {			if (!ua.w3cdom || !swfUrlStr || !replaceElemIdStr || !widthStr || !heightStr || !swfVersionStr) {				return;			}			widthStr += "";			heightStr += "";			if (hasPlayerVersion(swfVersionStr)) {				setVisibility(replaceElemIdStr, false);				var att = (typeof attObj == OBJECT) ? attObj : {};				att.data = swfUrlStr;				att.width = widthStr;				att.height = heightStr;				var par = (typeof parObj == OBJECT) ? parObj : {};				if (typeof flashvarsObj == OBJECT) {					for (var i in flashvarsObj) {						if (flashvarsObj[i] != Object.prototype[i]) {							if (typeof par.flashvars != UNDEF) {								par.flashvars += "&" + i + "=" + flashvarsObj[i];							}							else {								par.flashvars = i + "=" + flashvarsObj[i];							}						}					}				}				addDomLoadEvent(function() {					createSWF(att, par, replaceElemIdStr);					if (att.id == replaceElemIdStr) {						setVisibility(replaceElemIdStr, true);					}				});			}			else if (xiSwfUrlStr && !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac)) {				setVisibility(replaceElemIdStr, false);				addDomLoadEvent(function() {					var regObj = {};					regObj.id = regObj.altContentId = replaceElemIdStr;					regObj.width = widthStr;					regObj.height = heightStr;					regObj.expressInstall = xiSwfUrlStr;					showExpressInstall(regObj);				});			}		},				getFlashPlayerVersion: function() {			return { major:ua.pv[0], minor:ua.pv[1], release:ua.pv[2] };		},				hasFlashPlayerVersion:hasPlayerVersion,				createSWF: function(attObj, parObj, replaceElemIdStr) {			if (ua.w3cdom && isDomLoaded) {				return createSWF(attObj, parObj, replaceElemIdStr);			}			else {				return undefined;			}		},				createCSS: function(sel, decl) {			if (ua.w3cdom) {				createCSS(sel, decl);			}		},				addDomLoadEvent:addDomLoadEvent,				addLoadEvent:addLoadEvent,				getQueryParamValue: function(param) {			var q = doc.location.search || doc.location.hash;			if (param == null) {				return q;			}		 	if(q) {				var pairs = q.substring(1).split("&");				for (var i = 0; i < pairs.length; i++) {					if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {						return pairs[i].substring((pairs[i].indexOf("=") + 1));					}				}			}			return "";		},				expressInstallCallback: function() {			if (isExpressInstallActive && storedAltContent) {				var obj = getElementById(EXPRESS_INSTALL_ID);				if (obj) {					obj.parentNode.replaceChild(storedAltContent, obj);					if (storedAltContentId) {						setVisibility(storedAltContentId, true);						if (ua.ie && ua.win) {							storedAltContent.style.display = "block";						}					}					storedAltContent = null;					storedAltContentId = null;					isExpressInstallActive = false;				}			} 		}			};}();

/*snow plugin */
;(function($) {
	$.fn.snowing = function(param) {
		return this.each(function() {
			var ojjektum = $.extend({
							direction : 0,	// flakes movement direction 0: random; negative(x) # = left #, positive(x) # = right # on each timeout
							yvelocity: 1,	// on each timeout flakes movement # pixel on y axix down
							xvelocity: 1,  // on each timeout flakes movement # pixel on x axis based on direction
							density: 60,	// timeout*density = new flake, for example density = 10 timeout = 10 -> every 100ms a new flake will appear, exept when one flake reach the bottom of the document, in this case this counter will be decreased by 5
							timeout: 30,	// flake movement and new flake appearing will happen # ms, exept....
							maxflake : 10	// maximum flakes number on the screen
						},param || {});
			var ez = this;	// current element in the wrapped set
			var snowflakes = new Array("img/transparentflake3.png","img/transparentflake4.png","img/transparentflake5.png");	//flakes images, numbers and images can be vary
			var flakes = new Array();	// array containing the flakes on the screen
			var kovi = 0;	//	next flake counter, ld. density and timeout and bottom reached flake
			
			/**
				add new flake to the screen
			*/
			var addNewFlake = function() {
				var div = $("<div></div>")
							.css("top",0)
							.css("left",(5+Math.round(Math.random()*($(ez).width()-40))))
							.addClass("snowflake");;
				var img = $("<img></img>");
				$(img).attr("src",snowflakes[Math.round(Math.random()*2)])

				$(div).append(img);
				
				flakes[flakes.length] = div;
				$(ez).append(div);
			}
			
			/**
				move existing flakes on the screen; ld 
			*/
			var moveFlakes = function() {
				//$("#x").text(flakes.length);
				var docy = $(ez).height();	// document height
				var docx = $(ez).width();	// document widht
				for (var i = 0; i < flakes.length; i++) {	// traverse on the flake array to move them
					var x = window.parseInt( $(flakes[i]).css("left") );
					var y = window.parseInt( $(flakes[i]).css("top") );
					if ((y + ojjektum.yvelocity) < (docy-50)) {
						if (ojjektum.direction == 0) {	//refere ojjektum.direction
							if (Math.round(Math.random()) == 1) {
								direction = ojjektum.xvelocity;
							} else {
								direction = -1*ojjektum.xvelocity;
							}
						} else {
							direction = ojjektum.direction;
						}
						
/**to avoid unvisible vertical */if ((x+direction)-30 < docx && (x+direction) > 15) { $(flakes[i]).css("left",(x+direction)); }
/*scrollbar appearing*/		$(flakes[i]).css("top",(y+ojjektum.yvelocity));
					} else {	//in case of one of the flakes has reached the bottom of the document
						$(flakes[i]).css("top",0);
						kovi = kovi -5;
					}
				}
				
				if (++kovi == ojjektum.density && ojjektum.maxflake > flakes.length) {	//add new flake until the ojjektum.maxflake number is not reached
					addNewFlake();
					kovi = 0;	// if a flake reached the bottom then to avoid thicken flakes, decrease a little bit (maybe useless)
				}
			}
			
			addNewFlake();	// Columbus-egg-hen case
			var i = window.setInterval(function() { moveFlakes() },ojjektum.timeout);
		});
	}
})(jQuery)
/* end of snow plugin */
