(function(b){b.fn.superfish=function(k){var g=b.fn.superfish,j=g.c,f=b(['<span class="',j.arrowClass,'"> &#187;</span>'].join("")),i=function(){var c=b(this),l=d(c);clearTimeout(l.sfTimer);c.showSuperfishUl().siblings().hideSuperfishUl()},e=function(){var c=b(this),m=d(c),l=g.op;clearTimeout(m.sfTimer);m.sfTimer=setTimeout(function(){l.retainPath=(b.inArray(c[0],l.$path)>-1);c.hideSuperfishUl();if(l.$path.length&&c.parents(["li.",l.hoverClass].join("")).length<1){i.call(l.$path)}},l.delay)},d=function(c){var l=c.parents(["ul.",j.menuClass,":first"].join(""))[0];g.op=g.o[l.serial];return l},h=function(c){c.addClass(j.anchorClass).append(f.clone())};return this.each(function(){var c=this.serial=g.o.length;var m=b.extend({},g.defaults,k);m.$path=b("li."+m.pathClass,this).slice(0,m.pathLevels).each(function(){b(this).addClass([m.hoverClass,j.bcClass].join(" ")).filter("li:has(ul)").removeClass(m.pathClass)});g.o[c]=g.op=m;b("li:has(ul)",this)[(b.fn.hoverIntent&&!m.disableHI)?"hoverIntent":"hover"](i,e).each(function(){if(m.autoArrows){h(b(">a:first-child",this))}}).not("."+j.bcClass).hideSuperfishUl();var l=b("a",this);l.each(function(n){var o=l.eq(n).parents("li");l.eq(n).focus(function(){i.call(o)}).blur(function(){e.call(o)})});m.onInit.call(this)}).each(function(){var c=[j.menuClass];if(g.op.dropShadows&&!(b.browser.msie&&b.browser.version<7)){c.push(j.shadowClass)}b(this).addClass(c.join(" "))})};var a=b.fn.superfish;a.o=[];a.op={};a.IE7fix=function(){var c=a.op;if(b.browser.msie&&b.browser.version>6&&c.dropShadows&&c.animation.opacity!=undefined){this.toggleClass(a.c.shadowClass+"-off")}};a.c={bcClass:"sf-breadcrumb",menuClass:"sf-js-enabled",anchorClass:"sf-with-ul",arrowClass:"sf-sub-indicator",shadowClass:"sf-shadow"};a.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(){}};b.fn.extend({hideSuperfishUl:function(){var e=a.op,d=(e.retainPath===true)?e.$path:"";e.retainPath=false;var c=b(["li.",e.hoverClass].join(""),this).add(this).not(d).removeClass(e.hoverClass).find(">ul").hide().css("visibility","hidden");e.onHide.call(c);return this},showSuperfishUl:function(){var e=a.op,d=a.c.shadowClass+"-off",c=this.addClass(e.hoverClass).find(">ul:hidden").css("visibility","visible");a.IE7fix.call(c);e.onBeforeShow.call(c);c.animate(e.animation,e.speed,function(){a.IE7fix.call(c);e.onShow.call(c)});return this}})})(jQuery);(function(a){a.fn.supersubs=function(b){var c=a.extend({},a.fn.supersubs.defaults,b);return this.each(function(){var d=a(this);var e=a.meta?a.extend({},c,d.data()):c;var f=a('<li id="menu-fontsize">&#8212;</li>').css({padding:0,position:"absolute",top:"-999em",width:"auto"}).appendTo(d).width();a("#menu-fontsize").remove();$ULs=d.find("ul");$ULs.each(function(l){var k=$ULs.eq(l);var j=k.children();var g=j.children("a");var m=j.css("white-space","nowrap").css("float");var h=k.add(j).add(g).css({"float":"none",width:"auto"}).end().end()[0].clientWidth/f;h+=e.extraWidth;if(h>e.maxWidth){h=e.maxWidth}else{if(h<e.minWidth){h=e.minWidth}}h+="em";k.css("width",h);j.css({"float":m,width:"100%","white-space":"normal"}).each(function(){var n=a(">ul",this);var i=n.css("left")!==undefined?"left":"right";n.css(i,h)})})})};a.fn.supersubs.defaults={minWidth:9,maxWidth:25,extraWidth:0}})(jQuery);(function(f){f.cluetip={version:"1.0.6"};var j,i,h,e,g,b,k,d;f.fn.cluetip=function(m,l){if(typeof m=="object"){l=m;m=null}if(m=="destroy"){return this.removeData("thisInfo").unbind(".cluetip")}return this.each(function(K){var t=this,w=f(this);var H=f.extend(true,{},f.fn.cluetip.defaults,l||{},f.metadata?w.metadata():f.meta?w.data():{});var p=false;var A=+H.cluezIndex;w.data("thisInfo",{title:t.title,zIndex:A});var S=false,R=0;if(!f("#cluetip").length){f(['<div id="cluetip">','<div id="cluetip-outer">','<h3 id="cluetip-title"></h3>','<div id="cluetip-inner"></div>',"</div>",'<div id="cluetip-extra"></div>','<div id="cluetip-arrows" class="cluetip-arrows"></div>',"</div>"].join(""))[c](a).hide();j=f("#cluetip").css({position:"absolute"});h=f("#cluetip-outer").css({position:"relative",zIndex:A});i=f("#cluetip-inner");e=f("#cluetip-title");g=f("#cluetip-arrows");b=f('<div id="cluetip-waitimage"></div>').css({position:"absolute"}).insertBefore(j).hide()}var J=(H.dropShadow)?+H.dropShadowSteps:0;if(!k){k=f([]);for(var V=0;V<J;V++){k=k.add(f("<div></div>").css({zIndex:A-1,opacity:0.1,top:1+V,left:1+V}))}k.css({position:"absolute",backgroundColor:"#000"}).prependTo(j)}var F=w.attr(H.attribute),s=H.cluetipClass;if(!F&&!H.splitTitle&&!m){return true}if(H.local&&H.localPrefix){F=H.localPrefix+F}if(H.local&&H.hideLocal){f(F+":first").hide()}var G=parseInt(H.topOffset,10),C=parseInt(H.leftOffset,10);var B,T,y=isNaN(parseInt(H.height,10))?"auto":(/\D/g).test(H.height)?H.height:H.height+"px";var n,u,L,Z,N,U;var z=parseInt(H.width,10)||275,W=z+(parseInt(j.css("paddingLeft"),10)||0)+(parseInt(j.css("paddingRight"),10)||0)+J,D=this.offsetWidth,v,M,aa,O,o;var Q;var I=(H.attribute!="title")?w.attr(H.titleAttribute):"";if(H.splitTitle){if(I==undefined){I=""}Q=I.split(H.splitTitle);I=Q.shift()}if(H.escapeTitle){I=I.replace(/&/g,"&amp;").replace(/>/g,"&gt;").replace(/</g,"&lt;")}var r;function Y(){return false}var x=function(ab){if(!H.onActivate(w)){return false}S=true;j.removeClass().css({width:z});if(F==w.attr("href")){w.css("cursor",H.cursor)}if(H.hoverClass){w.addClass(H.hoverClass)}u=L=w.offset().top;v=w.offset().left;O=ab.pageX;N=ab.pageY;if(t.tagName.toLowerCase()!="area"){n=f(document).scrollTop();o=f(window).width()}if(H.positionBy=="fixed"){M=D+v+C;j.css({left:M})}else{M=(D>v&&v>W)||v+D+W+C>o?v-W-C:D+v+C;if(t.tagName.toLowerCase()=="area"||H.positionBy=="mouse"||D+W>o){if(O+20+W>o){j.addClass(" cluetip-"+s);M=(O-W-C)>=0?O-W-C-parseInt(j.css("marginLeft"),10)+parseInt(i.css("marginRight"),10):O-(W/2)}else{M=O+C}}var ac=M<0?ab.pageY+G:ab.pageY;j.css({left:(M>0&&H.positionBy!="bottomTop")?M:(O+(W/2)>o)?o/2-W/2:Math.max(O-(W/2),0),zIndex:w.data("thisInfo").zIndex});g.css({zIndex:w.data("thisInfo").zIndex+1})}T=f(window).height();if(m){if(typeof m=="function"){m=m.call(t)}i.html(m);P(ac)}else{if(Q){var ae=Q.length;i.html(ae?Q[0]:"");if(ae>1){for(var ad=1;ad<ae;ad++){i.append('<div class="split-body">'+Q[ad]+"</div>")}}P(ac)}else{if(!H.local&&F.indexOf("#")!==0){if(/\.(jpe?g|tiff?|gif|png)$/i.test(F)){i.html('<img src="'+F+'" alt="'+I+'" />');P(ac)}else{if(p&&H.ajaxCache){i.html(p);P(ac)}else{var ai=H.ajaxSettings.beforeSend,af=H.ajaxSettings.error,ag=H.ajaxSettings.success,al=H.ajaxSettings.complete;var ak={cache:false,url:F,beforeSend:function(am){if(ai){ai.call(t,am,j,i)}h.children().empty();if(H.waitImage){b.css({top:N+20,left:O+20,zIndex:w.data("thisInfo").zIndex-1}).show()}},error:function(am,an){if(S){if(af){af.call(t,am,an,j,i)}else{i.html("<i>sorry, the contents could not be loaded</i>")}}},success:function(am,an){p=H.ajaxProcess.call(t,am);if(S){if(ag){ag.call(t,am,an,j,i)}i.html(p)}},complete:function(am,an){if(al){al.call(t,am,an,j,i)}d=f("#cluetip-inner img").length;if(d&&!f.browser.opera){f("#cluetip-inner img").bind("load error",function(){d--;if(d<1){b.hide();if(S){P(ac)}}})}else{b.hide();if(S){P(ac)}}}};var ah=f.extend(true,{},H.ajaxSettings,ak);f.ajax(ah)}}}else{if(H.local){var aj=f(F+(/#\S+$/.test(F)?"":":eq("+K+")")).clone(true).show();i.html(aj);P(ac)}}}}};var P=function(ad){j.addClass("cluetip-"+s);if(H.truncate){var ae=i.text().slice(0,H.truncate)+"...";i.html(ae)}function ab(){}I?e.show().html(I):(H.showTitle)?e.show().html("&nbsp;"):e.hide();if(H.sticky){var ac=f('<div id="cluetip-close"><a href="#">'+H.closeText+"</a></div>");(H.closePosition=="bottom")?ac.appendTo(i):(H.closePosition=="title")?ac.prependTo(e):ac.prependTo(i);ac.bind("click.cluetip",function(){E();return false});if(H.mouseOutClose){j.bind("mouseleave.cluetip",function(){E()})}else{j.unbind("mouseleave.cluetip")}}var af="";h.css({zIndex:w.data("thisInfo").zIndex,overflow:y=="auto"?"visible":"auto",height:y});B=y=="auto"?Math.max(j.outerHeight(),j.height()):parseInt(y,10);Z=L;U=n+T;if(H.positionBy=="fixed"){Z=L-H.dropShadowSteps+G}else{if((M<O&&Math.max(M,0)+W>O)||H.positionBy=="bottomTop"){if(L+B+G>U&&N-n>B+G){Z=N-B-G;af="top"}else{Z=N+G;af="bottom"}}else{if(L+B+G>U){Z=(B>=T)?n:U-B-G}else{if(w.css("display")=="block"||t.tagName.toLowerCase()=="area"||H.positionBy=="mouse"){Z=ad-G}else{Z=L-H.dropShadowSteps}}}}if(af==""){M<v?af="left":af="right"}j.css({top:Z+"px"}).removeClass().addClass("clue-"+af+"-"+s).addClass(" cluetip-"+s);if(H.arrows){var ag=(L-Z-H.dropShadowSteps);g.css({top:(/(left|right)/.test(af)&&M>=0&&ag>0)?ag+"px":/(left|right)/.test(af)?0:""}).show()}else{g.hide()}k.hide();j.hide()[H.fx.open](H.fx.openSpeed||0);if(H.dropShadow){k.css({height:B,width:z,zIndex:w.data("thisInfo").zIndex-1}).show()}if(f.fn.bgiframe){j.bgiframe()}if(H.delayedClose>0){R=setTimeout(E,H.delayedClose)}H.onShow.call(t,j,i)};var X=function(ab){S=false;b.hide();if(!H.sticky||(/click|toggle/).test(H.activation)){E();clearTimeout(R)}if(H.hoverClass){w.removeClass(H.hoverClass)}};var E=function(){h.parent().hide().removeClass();H.onHide.call(t,j,i);w.removeClass("cluetip-clicked");if(I){w.attr(H.titleAttribute,I)}w.css("cursor","");if(H.arrows){g.css({top:""})}};f(document).bind("hideCluetip",function(ab){E()});if((/click|toggle/).test(H.activation)){w.bind("click.cluetip",function(ab){if(j.is(":hidden")||!w.is(".cluetip-clicked")){x(ab);f(".cluetip-clicked").removeClass("cluetip-clicked");w.addClass("cluetip-clicked")}else{X(ab)}this.blur();return false})}else{if(H.activation=="focus"){w.bind("focus.cluetip",function(ab){x(ab)});w.bind("blur.cluetip",function(ab){X(ab)})}else{w[H.clickThrough?"unbind":"bind"]("click",Y);var q=function(ab){if(H.tracking==true){var ad=M-ab.pageX;var ac=Z?Z-ab.pageY:L-ab.pageY;w.bind("mousemove.cluetip",function(ae){j.css({left:ae.pageX+ad,top:ae.pageY+ac})})}};if(f.fn.hoverIntent&&H.hoverIntent){w.hoverIntent({sensitivity:H.hoverIntent.sensitivity,interval:H.hoverIntent.interval,over:function(ab){x(ab);q(ab)},timeout:H.hoverIntent.timeout,out:function(ab){X(ab);w.unbind("mousemove.cluetip")}})}else{w.bind("mouseenter.cluetip",function(ab){x(ab);q(ab)}).bind("mouseleave.cluetip",function(ab){X(ab);w.unbind("mousemove.cluetip")})}w.bind("mouseover.cluetip",function(ab){w.attr("title","")}).bind("mouseleave.cluetip",function(ab){w.attr("title",w.data("thisInfo").title)})}}})};f.fn.cluetip.defaults={width:275,height:"auto",cluezIndex:97,positionBy:"auto",topOffset:15,leftOffset:15,local:false,localPrefix:null,hideLocal:true,attribute:"rel",titleAttribute:"title",splitTitle:"",escapeTitle:false,showTitle:true,cluetipClass:"default",hoverClass:"",waitImage:true,cursor:"help",arrows:false,dropShadow:true,dropShadowSteps:6,sticky:false,mouseOutClose:false,activation:"hover",clickThrough:false,tracking:false,delayedClose:0,closePosition:"top",closeText:"Close",truncate:0,fx:{open:"show",openSpeed:""},hoverIntent:{sensitivity:3,interval:50,timeout:0},onActivate:function(l){return true},onShow:function(m,l){},onHide:function(m,l){},ajaxCache:true,ajaxProcess:function(l){l=l.replace(/<(script|style|title)[^<]+<\/(script|style|title)>/gm,"").replace(/<(link|meta)[^>]+>/g,"");return l},ajaxSettings:{dataType:"html"},debug:false};var c="appendTo",a="body";f.cluetip.setup=function(l){if(l&&l.insertionType&&(l.insertionType).match(/appendTo|prependTo|insertBefore|insertAfter/)){c=l.insertionType}if(l&&l.insertionElement){a=l.insertionElement}}})(jQuery);(function(a){a.fn.overlabel=function(b){var d=a.extend({},a.fn.overlabel.defaults,b),c=this.filter("label[for]").map(function(){var e=a(this),i=e.attr("for");field=a("#"+i);if(!field){return}var h=a.meta?a.extend({},d,e.data()):d,f=function(){e.css(h.hide_css)},g=function(){this.value||e.css(h.show_css)};e.css(h.label_css);field.parent().css(h.wrapper_css).end().focus(f).blur(g).each(f).each(g);return this});return d.filter?c:c.end()};a.fn.overlabel.defaults={label_css:{position:"absolute",display:"inline",top:"3px",left:"5px","z-index":"1"},wrapper_css:{position:"relative"},hide_css:{"text-indent":"-10000px"},show_css:{"text-indent":"0px",cursor:"text"},filter:false}})(jQuery);(function(a){a.prettyPhoto={version:"2.5.6"};a.fn.prettyPhoto=function(u){u=jQuery.extend({animationSpeed:"normal",opacity:0.8,showTitle:true,allowresize:true,default_width:500,default_height:344,counter_separator_label:"/",theme:"light_rounded",hideflash:false,wmode:"opaque",autoplay:true,modal:false,changepicturecallback:function(){},callback:function(){},markup:'<div class="pp_pic_holder"> 						<div class="pp_top"> 							<div class="pp_left"></div> 							<div class="pp_middle"></div> 							<div class="pp_right"></div> 						</div> 						<div class="pp_content_container"> 							<div class="pp_left"> 							<div class="pp_right"> 								<div class="pp_content"> 									<div class="pp_loaderIcon"></div> 									<div class="pp_fade"> 										<a href="#" class="pp_expand" title="Expand the image">Expand</a> 										<div class="pp_hoverContainer"> 											<a class="pp_next" href="#">next</a> 											<a class="pp_previous" href="#">previous</a> 										</div> 										<div id="pp_full_res"></div> 										<div class="pp_details clearfix"> 											<a class="pp_close" href="#">Close</a> 											<p class="pp_description"></p> 											<div class="pp_nav"> 												<a href="#" class="pp_arrow_previous">Previous</a> 												<p class="currentTextHolder">0/0</p> 												<a href="#" class="pp_arrow_next">Next</a> 											</div> 										</div> 									</div> 								</div> 							</div> 							</div> 						</div> 						<div class="pp_bottom"> 							<div class="pp_left"></div> 							<div class="pp_middle"></div> 							<div class="pp_right"></div> 						</div> 					</div> 					<div class="pp_overlay"></div> 					<div class="ppt"></div>',image_markup:'<img id="fullResImage" src="" />',flash_markup:'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="{width}" height="{height}"><param name="wmode" value="{wmode}" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="{path}" /><embed src="{path}" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="{width}" height="{height}" wmode="{wmode}"></embed></object>',quicktime_markup:'<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" height="{height}" width="{width}"><param name="src" value="{path}"><param name="autoplay" value="{autoplay}"><param name="type" value="video/quicktime"><embed src="{path}" height="{height}" width="{width}" autoplay="{autoplay}" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/"></embed></object>',iframe_markup:'<iframe src ="{path}" width="{width}" height="{height}" frameborder="no"></iframe>',inline_markup:'<div class="pp_inline clearfix">{content}</div>'},u);if(a.browser.msie&&parseInt(a.browser.version)==6){u.theme="light_square"}if(a(".pp_overlay").size()==0){v()}var e=true,i=false,t,o,z,c,m,n,s,w,g=a(window).height(),y=a(window).width(),d=0,r=f();a(window).scroll(function(){r=f();j();q()});a(window).resize(function(){j();q()});a(document).keydown(function(A){if(o.is(":visible")){switch(A.keyCode){case 37:a.prettyPhoto.changePage("previous");break;case 39:a.prettyPhoto.changePage("next");break;case 27:if(!u.modal){a.prettyPhoto.close()}break}}});a(this).each(function(){a(this).bind("click",function(){_self=this;theRel=a(this).attr("rel");galleryRegExp=/\[(?:.*)\]/;theGallery=galleryRegExp.exec(theRel);var A=new Array(),C=new Array(),B=new Array();if(theGallery){a("a[rel*="+theGallery+"]").each(function(D){if(a(this)[0]===a(_self)[0]){d=D}A.push(a(this).attr("href"));C.push(a(this).find("img").attr("alt"));B.push(a(this).attr("title"))})}else{A=a(this).attr("href");C=(a(this).find("img").attr("alt"))?a(this).find("img").attr("alt"):"";B=(a(this).attr("title"))?a(this).attr("title"):""}a.prettyPhoto.open(A,C,B);return false})});a.prettyPhoto.open=function(C,B,A){if(a.browser.msie&&a.browser.version==6){a("select").css("visibility","hidden")}if(u.hideflash){a("object,embed").css("visibility","hidden")}images=a.makeArray(C);titles=a.makeArray(B);descriptions=a.makeArray(A);image_set=(a(images).size()>0)?true:false;h(a(images).size());a(".pp_loaderIcon").show();c.show().fadeTo(u.animationSpeed,u.opacity);o.find(".currentTextHolder").text((d+1)+u.counter_separator_label+a(images).size());if(descriptions[d]){o.find(".pp_description").show().html(unescape(descriptions[d]))}else{o.find(".pp_description").hide().text("")}if(titles[d]&&u.showTitle){hasTitle=true;z.html(unescape(titles[d]))}else{hasTitle=false}movie_width=(parseFloat(b("width",images[d])))?b("width",images[d]):u.default_width.toString();movie_height=(parseFloat(b("height",images[d])))?b("height",images[d]):u.default_height.toString();if(movie_width.indexOf("%")!=-1||movie_height.indexOf("%")!=-1){movie_height=parseFloat((a(window).height()*parseFloat(movie_height)/100)-100);movie_width=parseFloat((a(window).width()*parseFloat(movie_width)/100)-100);i=true}o.fadeIn(function(){imgPreloader="";switch(x(images[d])){case"image":imgPreloader=new Image();nextImage=new Image();if(image_set&&d>a(images).size()){nextImage.src=images[d+1]}prevImage=new Image();if(image_set&&images[d-1]){prevImage.src=images[d-1]}o.find("#pp_full_res")[0].innerHTML=u.image_markup;o.find("#fullResImage").attr("src",images[d]);imgPreloader.onload=function(){t=k(imgPreloader.width,imgPreloader.height);_showContent()};imgPreloader.onerror=function(){alert("Image cannot be loaded. Make sure the path is correct and image exist.");a.prettyPhoto.close()};imgPreloader.src=images[d];break;case"youtube":t=k(movie_width,movie_height);movie="http://www.youtube.com/v/"+b("v",images[d]);if(u.autoplay){movie+="&autoplay=1"}toInject=u.flash_markup.replace(/{width}/g,t.width).replace(/{height}/g,t.height).replace(/{wmode}/g,u.wmode).replace(/{path}/g,movie);break;case"vimeo":t=k(movie_width,movie_height);movie_id=images[d];movie="http://vimeo.com/moogaloop.swf?clip_id="+movie_id.replace("http://vimeo.com/","");if(u.autoplay){movie+="&autoplay=1"}toInject=u.flash_markup.replace(/{width}/g,t.width).replace(/{height}/g,t.height).replace(/{wmode}/g,u.wmode).replace(/{path}/g,movie);break;case"quicktime":t=k(movie_width,movie_height);t.height+=15;t.contentHeight+=15;t.containerHeight+=15;toInject=u.quicktime_markup.replace(/{width}/g,t.width).replace(/{height}/g,t.height).replace(/{wmode}/g,u.wmode).replace(/{path}/g,images[d]).replace(/{autoplay}/g,u.autoplay);break;case"flash":t=k(movie_width,movie_height);flash_vars=images[d];flash_vars=flash_vars.substring(images[d].indexOf("flashvars")+10,images[d].length);filename=images[d];filename=filename.substring(0,filename.indexOf("?"));toInject=u.flash_markup.replace(/{width}/g,t.width).replace(/{height}/g,t.height).replace(/{wmode}/g,u.wmode).replace(/{path}/g,filename+"?"+flash_vars);break;case"iframe":t=k(movie_width,movie_height);frame_url=images[d];frame_url=frame_url.substr(0,frame_url.indexOf("iframe")-1);toInject=u.iframe_markup.replace(/{width}/g,t.width).replace(/{height}/g,t.height).replace(/{path}/g,frame_url);break;case"inline":myClone=a(images[d]).clone().css({width:u.default_width}).wrapInner('<div id="pp_full_res"><div class="pp_inline clearfix"></div></div>').appendTo(a("body"));t=k(a(myClone).width(),a(myClone).height());a(myClone).remove();toInject=u.inline_markup.replace(/{content}/g,a(images[d]).html());break}if(!imgPreloader){o.find("#pp_full_res")[0].innerHTML=toInject;_showContent()}})};a.prettyPhoto.changePage=function(A){if(A=="previous"){d--;if(d<0){d=0;return}}else{if(a(".pp_arrow_next").is(".disabled")){return}d++}if(!e){e=true}l(function(){a.prettyPhoto.open(images,titles,descriptions)});a("a.pp_expand,a.pp_contract").fadeOut(u.animationSpeed)};a.prettyPhoto.close=function(){o.find("object,embed").css("visibility","hidden");a("div.pp_pic_holder,div.ppt,.pp_fade").fadeOut(u.animationSpeed);c.fadeOut(u.animationSpeed,function(){a("#pp_full_res").html("");o.attr("style","").find("div:not(.pp_hoverContainer)").attr("style","");j();if(a.browser.msie&&a.browser.version==6){a("select").css("visibility","visible")}if(u.hideflash){a("object,embed").css("visibility","visible")}d=0;u.callback()});e=true};_showContent=function(){a(".pp_loaderIcon").hide();projectedTop=r.scrollTop+((g/2)-(t.containerHeight/2));if(projectedTop<0){projectedTop=0+z.height()}o.find(".pp_content").animate({height:t.contentHeight},u.animationSpeed);o.animate({top:projectedTop,left:(y/2)-(t.containerWidth/2),width:t.containerWidth},u.animationSpeed,function(){o.find(".pp_hoverContainer,#fullResImage").height(t.height).width(t.width);o.find(".pp_fade").fadeIn(u.animationSpeed);if(image_set&&x(images[d])=="image"){o.find(".pp_hoverContainer").show()}else{o.find(".pp_hoverContainer").hide()}if(u.showTitle&&hasTitle){z.css({top:o.offset().top-25,left:o.offset().left+20,display:"none"});z.fadeIn(u.animationSpeed)}if(t.resized){a("a.pp_expand,a.pp_contract").fadeIn(u.animationSpeed)}u.changepicturecallback()})};function l(A){o.find("#pp_full_res object,#pp_full_res embed").css("visibility","hidden");o.find(".pp_fade").fadeOut(u.animationSpeed,function(){a(".pp_loaderIcon").show();if(A){A()}});z.fadeOut(u.animationSpeed)}function h(A){if(d==A-1){o.find("a.pp_next").css("visibility","hidden");o.find("a.pp_arrow_next").addClass("disabled").unbind("click")}else{o.find("a.pp_next").css("visibility","visible");o.find("a.pp_arrow_next.disabled").removeClass("disabled").bind("click",function(){a.prettyPhoto.changePage("next");return false})}if(d==0){o.find("a.pp_previous").css("visibility","hidden");o.find("a.pp_arrow_previous").addClass("disabled").unbind("click")}else{o.find("a.pp_previous").css("visibility","visible");o.find("a.pp_arrow_previous.disabled").removeClass("disabled").bind("click",function(){a.prettyPhoto.changePage("previous");return false})}if(A>1){a(".pp_nav").show()}else{a(".pp_nav").hide()}}function k(B,A){hasBeenResized=false;p(B,A);imageWidth=B;imageHeight=A;if(((w>y)||(s>g))&&e&&u.allowresize&&!i){hasBeenResized=true;notFitting=true;while(notFitting){if((w>y)){imageWidth=(y-200);imageHeight=(A/B)*imageWidth}else{if((s>g)){imageHeight=(g-200);imageWidth=(B/A)*imageHeight}else{notFitting=false}}s=imageHeight;w=imageWidth}p(imageWidth,imageHeight)}return{width:Math.floor(imageWidth),height:Math.floor(imageHeight),containerHeight:Math.floor(s),containerWidth:Math.floor(w)+40,contentHeight:Math.floor(m),contentWidth:Math.floor(n),resized:hasBeenResized}}function p(B,A){B=parseFloat(B);A=parseFloat(A);$pp_details=o.find(".pp_details");$pp_details.width(B);detailsHeight=parseFloat($pp_details.css("marginTop"))+parseFloat($pp_details.css("marginBottom"));$pp_details=$pp_details.clone().appendTo(a("body")).css({position:"absolute",top:-10000});detailsHeight+=$pp_details.height();detailsHeight=(detailsHeight<=34)?36:detailsHeight;if(a.browser.msie&&a.browser.version==7){detailsHeight+=8}$pp_details.remove();m=A+detailsHeight;n=B;s=m+z.height()+o.find(".pp_top").height()+o.find(".pp_bottom").height();w=B}function x(A){if(A.match(/youtube\.com\/watch/i)){return"youtube"}else{if(A.match(/vimeo\.com/i)){return"vimeo"}else{if(A.indexOf(".mov")!=-1){return"quicktime"}else{if(A.indexOf(".swf")!=-1){return"flash"}else{if(A.indexOf("iframe")!=-1){return"iframe"}else{if(A.substr(0,1)=="#"){return"inline"}else{return"image"}}}}}}}function j(){if(e){titleHeight=z.height();contentHeight=o.height();contentwidth=o.width();projectedTop=(g/2)+r.scrollTop-((contentHeight+titleHeight)/2);o.css({top:projectedTop,left:(y/2)+r.scrollLeft-(contentwidth/2)});z.css({top:projectedTop-titleHeight,left:(y/2)+r.scrollLeft-(contentwidth/2)+20})}}function f(){if(self.pageYOffset){return{scrollTop:self.pageYOffset,scrollLeft:self.pageXOffset}}else{if(document.documentElement&&document.documentElement.scrollTop){return{scrollTop:document.documentElement.scrollTop,scrollLeft:document.documentElement.scrollLeft}}else{if(document.body){return{scrollTop:document.body.scrollTop,scrollLeft:document.body.scrollLeft}}}}}function q(){g=a(window).height();y=a(window).width();c.css({height:a(document).height()})}function v(){a("body").append(u.markup);o=a(".pp_pic_holder");z=a(".ppt");c=a("div.pp_overlay");o.attr("class","pp_pic_holder "+u.theme);c.css({opacity:0,height:a(document).height()}).bind("click",function(){if(!u.modal){a.prettyPhoto.close()}});a("a.pp_close").bind("click",function(){a.prettyPhoto.close();return false});a("a.pp_expand").bind("click",function(){$this=a(this);if($this.hasClass("pp_expand")){$this.removeClass("pp_expand").addClass("pp_contract");e=false}else{$this.removeClass("pp_contract").addClass("pp_expand");e=true}l(function(){a.prettyPhoto.open(images,titles,descriptions)});o.find(".pp_fade").fadeOut(u.animationSpeed);return false});o.find(".pp_previous, .pp_arrow_previous").bind("click",function(){a.prettyPhoto.changePage("previous");return false});o.find(".pp_next, .pp_arrow_next").bind("click",function(){a.prettyPhoto.changePage("next");return false})}j()};function b(e,d){e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var c="[\\?&]"+e+"=([^&#]*)";var g=new RegExp(c);var f=g.exec(d);if(f==null){return""}else{return f[1]}}})(jQuery);(function(a){a.fn.custSelectBox=function(m){var d="selectbox";var k="."+d;var l=".selectboxoptions_wrap";var f="hideitem";var h="selected";var j="selectboxopen";var c="selectboxfoot";var e="."+c;var i=".elmValue";var g={isscrolling:true,scrollminitems:40,scrollheight:300,preopenselect:true,hoverstyle:"hover",openspeed:"normal",alldisabled:false,selectwidth:"auto",wrappername:".select_wrap"};var b=a.extend(g,m);return this.each(function(){a.fn.disable=function(A){for(var B=0;B<a(A).find("ul").find("li").length;B++){if(a(a(A).find("ul").find("li").get(B)).hasClass(h)){a(a(A).find("ul").find("li").get(B)).addClass("selected_disable")}a(a(A).find("ul").find("li").get(B)).unbind();a(a(A).find("ul").get(B)).find("input").attr("disabled","disabled")}};a.fn.addformelms=function(A){var G=a(A);var C=a(A).find(l+" ul").attr("class");if(C.indexOf("selectboxoptions_radio")>-1){var E=a(G).find("."+h+" span").text();a(G).find(l).append('<input type="hidden" id="'+a(r).attr("id")+'" name="'+a(r).attr("name")+'" value="'+E+'">')}else{for(var D=0;D<a(G).find(l+" li").length;D++){var B=a(G).find(l+" li").get(D);a(B).append('<input type="hidden" id="'+a(r).attr("id")+"_"+D+'" name="'+a(r).attr("name")+"_"+D+'" value="">');if(a(B).hasClass(h)){var F=a(B).find("span").text();a(a(G).find(l+" li").get(D)).find("input").val(F)}}}};a.fn.openSelectBoxsThatArePrePopulated=function(B){var A=a(B).find(l+" ul").attr("class");if(a(k).parent().find("."+A).find("li").hasClass(h)){a(k).addClass(j);a(k).parent().find(l).slideDown("normal");a(k).parent().find("."+A).find("li").addClass(f)}};a.fn.scrolling=function(B,A){if(A){if(a(B).parent().find(l+" ul li").length>=b.scrollminitems){a(B).parent().find(l+" ul").css("height",b.scrollheight).addClass("setScroll")}}else{a(B).parent().find(l+" ul").css("height","auto").removeClass("setScroll")}};var r=a(this);var n=a(r).parent();var o="";var v=a(r).find("option");var q="";var z=a(r).attr("disabled");var w=a(r).attr("multiple");var x="selectboxoptions_radio";var t="";if(w){x="selectboxoptions_check"}if(z){t="disabled"}for(var u=0;u<v.length;u++){var y="";var s=a(v).get(u);if(u===0){o=a(s).text()}else{if(a(s).attr("selected")){y="selected"}q=q+'<li class="'+y+" "+t+'"><span class="elmValue">'+a(s).val()+"</span>"+a(s).text()+"</li>"}}a(n).empty().html('<div class="selectbox"><ul><li>'+o+'</li></ul></div><div class="selectboxoptions_wrap"><ul class="'+x+'">'+q+"</ul></div>");a(n).find(l+" ul").after('<div class="'+c+'"><div></div></div>');if("auto"!=b.selectwidth){a(n).find(k+" ul").css({width:b.selectwidth});a(n).find(l+" ul").attr("class",x).css({width:(b.selectwidth+57)+"px"});a(n).find(e+" div").css({width:b.selectwidth+"px"})}else{a(n).find(l+" ul").attr("class",x).css({width:(a(n).find(k+" ul").width()+57)+"px"});a(n).find(e+" div").css({width:a(n).find(k+" ul").width()+"px"})}if(z){a.fn.disable(a(n).find(l))}var p=a(b.wrappername);a(l+" ul li").unbind().click(function(){if(a(this).attr("class").indexOf("disabled")<0){var B;var A=a(this).parent().attr("class");if(A.indexOf("selectboxoptions_radio")>-1){if(!a(this).hasClass(h)){B=a(this).find(i).text();a(this).parent().find("."+h).removeClass(h);a(this).addClass(h);a(this).parent().parent().find("input").val(a(this).find(i).text())}else{a(this).parent().find("."+h).removeClass(h);a(this).parent().parent().find("input").val("")}}else{if(a(this).hasClass(h)){a(this).removeClass(h);a(this).find("input").val("")}else{B=a(this).find(i).text();a(this).addClass(h);a(this).find("input").val(B)}}}}).hover(function(){a(this).addClass(b.hoverstyle)},function(){a(this).removeClass(b.hoverstyle)});a(p).find(k).unbind().toggle(function(){if(b.isscrolling){a.fn.scrolling(a(this),true)}a(this).parent().find(l+" ul li").removeClass(f);a(this).removeClass(d).addClass(j);a(this).parent().find(l).slideDown(b.openspeed)},function(){var A=a(this).parent().find(l+" ul").attr("class");if(a(this).parent().find(l+" ul li").hasClass(h)){a(this).parent().find(l+" ul li").addClass(f)}else{a(this).removeClass(j).addClass(d);a(this).parent().find(l).slideUp("normal")}if(b.isscrolling){a.fn.scrolling(a(this),false)}});a.fn.addformelms(a(n));if(b.preopenselect){a.fn.openSelectBoxsThatArePrePopulated(a(n))}if(b.alldisabled){a.fn.disable(a(p))}})}})(jQuery);$(document).ready(function(){function a(){if($("#contactForm").is(":hidden")){$("#contactForm").slideDown("slow");$("#backgroundPopup").css({opacity:"0.7"});$("#backgroundPopup").fadeIn("slow")}else{$("#contactForm").slideUp("slow");$("#backgroundPopup").fadeOut("slow")}}$(".contact").click(function(){a()});$("a[href*=#]").each(function(){if(location.pathname.replace(/^\//,"")==this.pathname.replace(/^\//,"")&&location.hostname==this.hostname&&this.hash.replace(/#/,"")){var c=$(this.hash),d=$("[name="+this.hash.slice(1)+"]");var b=c.length?c:d.length?d:false;if($(this.hash).length){$(this).click(function(e){var g=$(this.hash).offset().top;var f=this.hash;e.preventDefault();$("html, body").animate({scrollTop:g},500);return false})}}});$(".contactForm").submit(function(){var c=/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;var b=document.getElementById("e-mail");if(!c.test(b.value)){$(".email-missing").show()}else{$(".email-missing").hide()}if(document.cform.name.value==""){$(".name-missing").show()}else{$(".name-missing").hide()}if(document.cform.message.value==""){$(".message-missing").show()}else{$(".message-missing").hide()}if((document.cform.name.value=="")||(!c.test(b.value))||(document.cform.message.value=="")){return false}if((document.cform.name.value!="")&&(c.test(b.value))&&(document.cform.message.value!="")){$(".contactForm").hide();$(".loader").append($(".bar"));$(".bar").css({display:"block"});$.post("mail.php",{name:$("#name").val(),email:$("#e-mail").val(),refno:$("#refno").val(),message:$("#message").val()},function(d){$(".bar").css({display:"none"});$(".loader").append(d)});setTimeout('$("#backgroundPopup").fadeOut("slow"); $("#contactForm").slideUp("slow")',2000);return false}});$("#backgroundPopup").css({height:document.documentElement.clientHeight})});$(document).ready(function(){$("#send_message").click(function(g){g.preventDefault();var c=false;var b=$("#name").val();var a=$("#email").val();var d=$("#subject").val();var f=$("#message").val();if(b.length==0){var c=true;$("#name_error").fadeIn(500)}else{$("#name_error").fadeOut(500)}if(a.length==0||a.indexOf("@")=="-1"){var c=true;$("#email_error").fadeIn(500)}else{$("#email_error").fadeOut(500)}if(d.length==0){var c=true;$("#subject_error").fadeIn(500)}else{$("#subject_error").fadeOut(500)}if(f.length==0){var c=true;$("#message_error").fadeIn(500)}else{$("#message_error").fadeOut(500)}if(c==false){$("#send_message").attr({disabled:"true",value:"Sending..."});$.post("send_email.php",$("#contact_form").serialize(),function(e){if(e=="sent"){$("#cf_submit_p").remove();$("#mail_success").fadeIn(500)}else{$("#mail_fail").fadeIn(500);$("#send_message").removeAttr("disabled").attr("value","Send The Message")}})}})});
