/*
 * Main libs
 * Date: Tue November 15 11:04 PM EST 2011
*/


/* html5.js
// Create new HTML5 elements ===================================================
// -----------------------------------------------------------------------------
// This script should load before any others. We want the new elements to be
// parsed before pretty much anything happens.
// Plus, IE does not behave otherwise. The cost of being progressive...
// -----------------------------------------------------------------------------
*/

document.createElement("article");
document.createElement("aside");
document.createElement("audio");
document.createElement("canvas");
document.createElement("command");
document.createElement("datalist");
document.createElement("details");
document.createElement("embed");
document.createElement("figcaption");
document.createElement("figure");
document.createElement("footer");
document.createElement("header");
document.createElement("hgroup");
document.createElement("keygen");
document.createElement("mark");
document.createElement("meter");
document.createElement("nav");
document.createElement("output");
document.createElement("progress");
document.createElement("rp");
document.createElement("rt");
document.createElement("ruby");
document.createElement("section");
document.createElement("source");
document.createElement("summary");
document.createElement("time");
document.createElement("video");

/*
 * Superfish v1.4.8 - jQuery menu widget
 * Copyright (c) 2008 Joel Birch
 *
 * Dual licensed under the MIT and GPL licenses:
 * 	http://www.opensource.org/licenses/mit-license.php
 * 	http://www.gnu.org/licenses/gpl.html
 *
 * CHANGELOG: http://users.tpg.com.au/j_birch/plugins/superfish/changelog.txt
 */
(function(a){a.fn.superfish=function(d){var c=a.fn.superfish,b=c.c,j=a(['<span class="',b.arrowClass,'"> &#187;</span>'].join("")),g=function(){var c=a(this),b=h(c);clearTimeout(b.sfTimer);c.showSuperfishUl().siblings().hideSuperfishUl()},i=function(){var b=a(this),d=h(b),e=c.op;clearTimeout(d.sfTimer);d.sfTimer=setTimeout(function(){e.retainPath=a.inArray(b[0],e.$path)>-1;b.hideSuperfishUl();e.$path.length&&b.parents(["li.",e.hoverClass].join("")).length<1&&g.call(e.$path)},e.delay)},h=function(a){a=a.parents(["ul.",b.menuClass,":first"].join(""))[0];c.op=c.o[a.serial];return a};return this.each(function(){var k=this.serial=c.o.length,f=a.extend({},c.defaults,d);f.$path=a("li."+f.pathClass,this).slice(0,f.pathLevels).each(function(){a(this).addClass([f.hoverClass,b.bcClass].join(" ")).filter("li:has(ul)").removeClass(f.pathClass)});c.o[k]=c.op=f;a("li:has(ul)",this)[a.fn.hoverIntent&&!f.disableHI?"hoverIntent":"hover"](g,i).each(function(){f.autoArrows&&a(">a:first-child",this).addClass(b.anchorClass).append(j.clone())}).not("."+b.bcClass).hideSuperfishUl();var e=a("a",this);e.each(function(a){var b=e.eq(a).parents("li");e.eq(a).focus(function(){g.call(b)}).blur(function(){i.call(b)})});f.onInit.call(this)}).each(function(){var d=[b.menuClass];c.op.dropShadows&&!(a.browser.msie&&a.browser.version<7)&&d.push(b.shadowClass);a(this).addClass(d.join(" "))})};var b=a.fn.superfish;b.o=[];b.op={};b.IE7fix=function(){var d=b.op;a.browser.msie&&a.browser.version>6&&d.dropShadows&&d.animation.opacity!=void 0&&this.toggleClass(b.c.shadowClass+"-off")};b.c={bcClass:"sf-breadcrumb",menuClass:"sf-js-enabled",anchorClass:"sf-with-ul",arrowClass:"sf-sub-indicator",shadowClass:"sf-shadow"};b.defaults={hoverClass:"sfHover",pathClass:"overideThisToUse",pathLevels:2,delay:1E3,animation:{height:"show"},speed:"normal",autoArrows:!1,dropShadows:!1,disableHI:!1,onInit:function(){},onBeforeShow:function(){},onShow:function(){},onHide:function(){}};a.fn.extend({hideSuperfishUl:function(){var d=b.op,c=d.retainPath===!0?d.$path:"";d.retainPath=!1;c=a(["li.",d.hoverClass].join(""),this).add(this).not(c).removeClass(d.hoverClass).find(">ul").hide().css("visibility","hidden");d.onHide.call(c);Cufon.refresh();return this},showSuperfishUl:function(){var a=b.op,c=this.addClass(a.hoverClass).find(">ul:hidden").css("visibility","visible");b.IE7fix.call(c);a.onBeforeShow.call(c);c.animate(a.animation,a.speed,function(){b.IE7fix.call(c);a.onShow.call(c)});return this}})})(jQuery);


/*
 * hoverIntent.js
*/
(function(e){e.fn.hoverIntent=function(l,m){var d={sensitivity:7,interval:50,timeout:0},d=e.extend(d,m?{over:l,out:m}:l),f,h,i,j,k=function(c){f=c.pageX;h=c.pageY},n=function(c,a){a.hoverIntent_t=clearTimeout(a.hoverIntent_t);if(Math.abs(i-f)+Math.abs(j-h)<d.sensitivity)return e(a).unbind("mousemove",k),a.hoverIntent_s=1,d.over.apply(a,[c]);else i=f,j=h,a.hoverIntent_t=setTimeout(function(){n(c,a)},d.interval)},o=function(c){for(var a=(c.type=="mouseover"?c.fromElement:c.toElement)||c.relatedTarget;a&&a!=this;)try{a=a.parentNode}catch(f){a=this}if(a==this)return!1;var g=jQuery.extend({},c),b=this;if(b.hoverIntent_t)b.hoverIntent_t=clearTimeout(b.hoverIntent_t);if(c.type=="mouseover"){if(i=g.pageX,j=g.pageY,e(b).bind("mousemove",k),b.hoverIntent_s!=1)b.hoverIntent_t=setTimeout(function(){n(g,b)},d.interval)}else if(e(b).unbind("mousemove",k),b.hoverIntent_s==1)b.hoverIntent_t=setTimeout(function(){b.hoverIntent_t=clearTimeout(b.hoverIntent_t);b.hoverIntent_s=0;d.out.apply(b,[g])},d.timeout)};return this.mouseover(o).mouseout(o)}})(jQuery);

/*
 * hover-image.js
*/
$(function(){$(".lightbox-image").append("<span></span>");$(".lightbox-image").hover(function(){$(this).find("img").stop().animate({opacity:0.5},"normal")},function(){$(this).find("img").stop().animate({opacity:1},"normal")})});

/* ------------------------------------------------------------------------
	Class: prettyPhoto
	Use: Lightbox clone for jQuery
	Author: Stephane Caron (http://www.no-margin-for-errors.com)
	Version: 3.1.2
------------------------------------------------------------------------- */
(function(a){function t(){url=location.href;return hashtag=url.indexOf("#!")!=-1?decodeURI(url.substring(url.indexOf("#!")+2,url.length)):!1}function g(a,g){var a=a.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]"),k=RegExp("[\\?&]"+a+"=([^&#]*)").exec(g);return k==null?"":k[1]}a.prettyPhoto={version:"3.1.2"};a.fn.prettyPhoto=function(j){function n(){a(".pp_loaderIcon").hide();projectedTop=scroll_pos.scrollTop+(d/2-b.containerHeight/2);projectedTop<0&&(projectedTop=0);$ppt.fadeTo(settings.animation_speed,
1);$pp_pic_holder.find(".pp_content").animate({height:b.contentHeight,width:b.contentWidth},settings.animation_speed);$pp_pic_holder.animate({top:projectedTop,left:e/2-b.containerWidth/2,width:b.containerWidth},settings.animation_speed,function(){$pp_pic_holder.find(".pp_hoverContainer,#fullResImage").height(b.height).width(b.width);$pp_pic_holder.find(".pp_fade").fadeIn(settings.animation_speed);isSet&&o(pp_images[set_position])=="image"?$pp_pic_holder.find(".pp_hoverContainer").show():$pp_pic_holder.find(".pp_hoverContainer").hide();
b.resized?a("a.pp_expand,a.pp_contract").show():a("a.pp_expand").hide();settings.autoplay_slideshow&&!l&&!p&&a.prettyPhoto.startSlideshow();if(settings.deeplinking&&typeof theRel!="undefined")location.hash="!"+theRel+"/"+rel_index+"/";settings.changepicturecallback();p=!0});isSet&&settings.overlay_gallery&&o(pp_images[set_position])=="image"&&settings.ie6_fallback&&!(a.browser.msie&&parseInt(a.browser.version)==6)?(itemWidth=57,navWidth=settings.theme=="facebook"||settings.theme=="pp_default"?50:
30,itemsPerPage=Math.floor((b.containerWidth-100-navWidth)/itemWidth),itemsPerPage=itemsPerPage<pp_images.length?itemsPerPage:pp_images.length,totalPage=Math.ceil(pp_images.length/itemsPerPage)-1,totalPage==0?(navWidth=0,$pp_gallery.find(".pp_arrow_next,.pp_arrow_previous").hide()):$pp_gallery.find(".pp_arrow_next,.pp_arrow_previous").show(),galleryWidth=itemsPerPage*itemWidth,fullGalleryWidth=pp_images.length*itemWidth,$pp_gallery.css("margin-left",-(galleryWidth/2+navWidth/2)).find("div:first").width(galleryWidth+
5).find("ul").width(fullGalleryWidth).find("li.selected").removeClass("selected"),goToPage=Math.floor(set_position/itemsPerPage)<totalPage?Math.floor(set_position/itemsPerPage):totalPage,a.prettyPhoto.changeGalleryPage(goToPage),$pp_gallery_li.filter(":eq("+set_position+")").addClass("selected")):$pp_pic_holder.find(".pp_content").unbind("mouseenter mouseleave")}function k(c){$pp_pic_holder.find("#pp_full_res object,#pp_full_res embed").css("visibility","hidden");$pp_pic_holder.find(".pp_fade").fadeOut(settings.animation_speed,
function(){a(".pp_loaderIcon").show();c()})}function y(c){c>1?a(".pp_nav").show():a(".pp_nav").hide()}function f(a,b){resized=!1;u(a,b);imageWidth=a;imageHeight=b;if((h>e||i>d)&&doresize&&settings.allow_resize&&!m){resized=!0;for(fitting=!1;!fitting;)h>e?(imageWidth=e-200,imageHeight=b/a*imageWidth):i>d?(imageHeight=d-200,imageWidth=a/b*imageHeight):fitting=!0,i=imageHeight,h=imageWidth;u(imageWidth,imageHeight);(h>e||i>d)&&f(h,i)}return{width:Math.floor(imageWidth),height:Math.floor(imageHeight),
containerHeight:Math.floor(i),containerWidth:Math.floor(h)+settings.horizontal_padding*2,contentHeight:Math.floor(q),contentWidth:Math.floor(v),resized:resized}}function u(c,b){c=parseFloat(c);b=parseFloat(b);$pp_details=$pp_pic_holder.find(".pp_details");$pp_details.width(c);detailsHeight=parseFloat($pp_details.css("marginTop"))+parseFloat($pp_details.css("marginBottom"));$pp_details=$pp_details.clone().addClass(settings.theme).width(c).appendTo(a("body")).css({position:"absolute",top:-1E4});detailsHeight+=
$pp_details.height();detailsHeight=detailsHeight<=34?36:detailsHeight;a.browser.msie&&a.browser.version==7&&(detailsHeight+=8);$pp_details.remove();$pp_title=$pp_pic_holder.find(".ppt");$pp_title.width(c);titleHeight=parseFloat($pp_title.css("marginTop"))+parseFloat($pp_title.css("marginBottom"));$pp_title=$pp_title.clone().appendTo(a("body")).css({position:"absolute",top:-1E4});titleHeight+=$pp_title.height();$pp_title.remove();q=b+detailsHeight;v=c;i=q+titleHeight+$pp_pic_holder.find(".pp_top").height()+
$pp_pic_holder.find(".pp_bottom").height();h=c}function o(a){return a.match(/youtube\.com\/watch/i)?"youtube":a.match(/vimeo\.com/i)?"vimeo":a.match(/\b.mov\b/i)?"quicktime":a.match(/\b.swf\b/i)?"flash":a.match(/\biframe=true\b/i)?"iframe":a.match(/\bajax=true\b/i)?"ajax":a.match(/\bcustom=true\b/i)?"custom":a.substr(0,1)=="#"?"inline":"image"}function r(){doresize&&typeof $pp_pic_holder!="undefined"&&(scroll_pos=w(),contentHeight=$pp_pic_holder.height(),contentwidth=$pp_pic_holder.width(),projectedTop=
d/2+scroll_pos.scrollTop-contentHeight/2,projectedTop<0&&(projectedTop=0),contentHeight>d||$pp_pic_holder.css({top:projectedTop,left:e/2+scroll_pos.scrollLeft-contentwidth/2}))}function w(){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 x(){settings.markup=settings.markup.replace("{pp_social}",settings.social_tools?settings.social_tools:"");a("body").append(settings.markup);$pp_pic_holder=a(".pp_pic_holder");$ppt=a(".ppt");$pp_overlay=a("div.pp_overlay");if(isSet&&settings.overlay_gallery){currentGalleryPage=0;toInject="";for(var c=0;c<pp_images.length;c++)pp_images[c].match(/\b(jpg|jpeg|png|gif)\b/gi)?(classname="",img_src=pp_images[c]):(classname="default",img_src=""),toInject+="<li class='"+
classname+"'><a href='#'><img src='"+img_src+"' width='50' alt='' /></a></li>";toInject=settings.gallery_markup.replace(/{gallery}/g,toInject);$pp_pic_holder.find("#pp_full_res").after(toInject);$pp_gallery=a(".pp_pic_holder .pp_gallery");$pp_gallery_li=$pp_gallery.find("li");$pp_gallery.find(".pp_arrow_next").click(function(){a.prettyPhoto.changeGalleryPage("next");a.prettyPhoto.stopSlideshow();return!1});$pp_gallery.find(".pp_arrow_previous").click(function(){a.prettyPhoto.changeGalleryPage("previous");
a.prettyPhoto.stopSlideshow();return!1});$pp_pic_holder.find(".pp_content").hover(function(){$pp_pic_holder.find(".pp_gallery:not(.disabled)").fadeIn()},function(){$pp_pic_holder.find(".pp_gallery:not(.disabled)").fadeOut()});itemWidth=57;$pp_gallery_li.each(function(c){a(this).find("a").click(function(){a.prettyPhoto.changePage(c);a.prettyPhoto.stopSlideshow();return!1})})}settings.slideshow&&($pp_pic_holder.find(".pp_nav").prepend('<a href="#" class="pp_play">Play</a>'),$pp_pic_holder.find(".pp_nav .pp_play").click(function(){a.prettyPhoto.startSlideshow();
return!1}));$pp_pic_holder.attr("class","pp_pic_holder "+settings.theme);$pp_overlay.css({opacity:0,height:a(document).height(),width:a(window).width()}).bind("click",function(){settings.modal||a.prettyPhoto.close()});a("a.pp_close").bind("click",function(){a.prettyPhoto.close();return!1});a("a.pp_expand").bind("click",function(){a(this).hasClass("pp_expand")?(a(this).removeClass("pp_expand").addClass("pp_contract"),doresize=!1):(a(this).removeClass("pp_contract").addClass("pp_expand"),doresize=!0);
k(function(){a.prettyPhoto.open()});return!1});$pp_pic_holder.find(".pp_previous, .pp_nav .pp_arrow_previous").bind("click",function(){a.prettyPhoto.changePage("previous");a.prettyPhoto.stopSlideshow();return!1});$pp_pic_holder.find(".pp_next, .pp_nav .pp_arrow_next").bind("click",function(){a.prettyPhoto.changePage("next");a.prettyPhoto.stopSlideshow();return!1});r()}var j=jQuery.extend({animation_speed:"fast",slideshow:0,autoplay_slideshow:!1,opacity:0.8,show_title:!0,allow_resize:!0,default_width:800,
default_height:644,counter_separator_label:"/",theme:"pp_default",horizontal_padding:20,hideflash:!1,wmode:"opaque",autoplay:!1,modal:!1,deeplinking:!1,overlay_gallery:!1,keyboard_shortcuts:!1,changepicturecallback:function(){},callback:function(){},ie6_fallback:!0,markup:'<div class="pp_pic_holder"> <div class="ppt">&nbsp;</div> <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"> <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> <p class="pp_description"></p> <a class="pp_close" href="#">Close</a> </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>',
gallery_markup:'<div class="pp_gallery"> <a href="#" class="pp_arrow_previous">Previous</a> <div> <ul> {gallery} </ul> </div> <a href="#" class="pp_arrow_next">Next</a> </div>',image_markup:'<img id="fullResImage" src="{path}" />',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">{content}</div>',custom_markup:"",social_tools:'<div class="pp_social"><div class="twitter"><a href="http://twitter.com/share" class="twitter-share-button" data-count="none">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"><\/script></div><div class="facebook"><iframe src="http://www.facebook.com/plugins/like.php?locale=en_US&href='+location.href+'&amp;layout=button_count&amp;show_faces=true&amp;width=500&amp;action=like&amp;font&amp;colorscheme=light&amp;height=23" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:23px;" allowTransparency="true"></iframe></div></div>'},
j),s=this,m=!1,b,p,q,v,i,h,d=a(window).height(),e=a(window).width(),l;doresize=!0;scroll_pos=w();a(window).unbind("resize.prettyphoto").bind("resize.prettyphoto",function(){r();d=a(window).height();e=a(window).width();typeof $pp_overlay!="undefined"&&$pp_overlay.height(a(document).height()).width(e)});j.keyboard_shortcuts&&a(document).unbind("keydown.prettyphoto").bind("keydown.prettyphoto",function(c){if(typeof $pp_pic_holder!="undefined"&&$pp_pic_holder.is(":visible"))switch(c.keyCode){case 37:a.prettyPhoto.changePage("previous");
c.preventDefault();break;case 39:a.prettyPhoto.changePage("next");c.preventDefault();break;case 27:settings.modal||a.prettyPhoto.close(),c.preventDefault()}});a.prettyPhoto.initialize=function(){settings=j;if(settings.theme=="pp_default")settings.horizontal_padding=16;if(settings.ie6_fallback&&a.browser.msie&&parseInt(a.browser.version)==6)settings.theme="light_square";theRel=a(this).attr("rel");galleryRegExp=/\[(?:.*)\]/;pp_images=(isSet=galleryRegExp.exec(theRel)?!0:!1)?jQuery.map(s,function(c){if(a(c).attr("rel").indexOf(theRel)!=
-1)return a(c).attr("href")}):a.makeArray(a(this).attr("href"));pp_titles=isSet?jQuery.map(s,function(c){if(a(c).attr("rel").indexOf(theRel)!=-1)return a(c).find("img").attr("alt")?a(c).find("img").attr("alt"):""}):a.makeArray(a(this).find("img").attr("alt"));pp_descriptions=isSet?jQuery.map(s,function(c){if(a(c).attr("rel").indexOf(theRel)!=-1)return a(c).attr("title")?a(c).attr("title"):""}):a.makeArray(a(this).attr("title"));set_position=jQuery.inArray(a(this).attr("href"),pp_images);rel_index=
isSet?set_position:a("a[rel^='"+theRel+"']").index(a(this));x(this);settings.allow_resize&&a(window).bind("scroll.prettyphoto",function(){r()});a.prettyPhoto.open();return!1};a.prettyPhoto.open=function(c,d,e){if(typeof settings=="undefined"){settings=j;if(a.browser.msie&&a.browser.version==6)settings.theme="light_square";pp_images=a.makeArray(c);pp_titles=d?a.makeArray(d):a.makeArray("");pp_descriptions=e?a.makeArray(e):a.makeArray("");isSet=pp_images.length>1?!0:!1;set_position=0;x(c.target)}a.browser.msie&&
a.browser.version==6&&a("select").css("visibility","hidden");settings.hideflash&&a("object,embed,iframe[src*=youtube],iframe[src*=vimeo]").css("visibility","hidden");y(a(pp_images).size());a(".pp_loaderIcon").show();$ppt.is(":hidden")&&$ppt.css("opacity",0).show();$pp_overlay.show().fadeTo(settings.animation_speed,settings.opacity);$pp_pic_holder.find(".currentTextHolder").text(set_position+1+settings.counter_separator_label+a(pp_images).size());pp_descriptions[set_position]!=""?$pp_pic_holder.find(".pp_description").show().html(unescape(pp_descriptions[set_position])):
$pp_pic_holder.find(".pp_description").hide();movie_width=parseFloat(g("width",pp_images[set_position]))?g("width",pp_images[set_position]):settings.default_width.toString();movie_height=parseFloat(g("height",pp_images[set_position]))?g("height",pp_images[set_position]):settings.default_height.toString();m=!1;movie_height.indexOf("%")!=-1&&(movie_height=parseFloat(a(window).height()*parseFloat(movie_height)/100-150),m=!0);movie_width.indexOf("%")!=-1&&(movie_width=parseFloat(a(window).width()*parseFloat(movie_width)/
100-150),m=!0);$pp_pic_holder.fadeIn(function(){settings.show_title&&pp_titles[set_position]!=""&&typeof pp_titles[set_position]!="undefined"?$ppt.html(unescape(pp_titles[set_position])):$ppt.html("&nbsp;");imgPreloader="";skipInjection=!1;switch(o(pp_images[set_position])){case "image":imgPreloader=new Image;nextImage=new Image;if(isSet&&set_position<a(pp_images).size()-1)nextImage.src=pp_images[set_position+1];prevImage=new Image;if(isSet&&pp_images[set_position-1])prevImage.src=pp_images[set_position-
1];$pp_pic_holder.find("#pp_full_res")[0].innerHTML=settings.image_markup.replace(/{path}/g,pp_images[set_position]);imgPreloader.onload=function(){b=f(imgPreloader.width,imgPreloader.height);n()};imgPreloader.onerror=function(){alert("Image cannot be loaded. Make sure the path is correct and image exist.");a.prettyPhoto.close()};imgPreloader.src=pp_images[set_position];break;case "youtube":b=f(movie_width,movie_height);movie="http://www.youtube.com/embed/"+g("v",pp_images[set_position]);g("rel",
pp_images[set_position])?movie+="?rel="+g("rel",pp_images[set_position]):movie+="?rel=1";settings.autoplay&&(movie+="&autoplay=1");toInject=settings.iframe_markup.replace(/{width}/g,b.width).replace(/{height}/g,b.height).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,movie);break;case "vimeo":b=f(movie_width,movie_height);movie_id=pp_images[set_position];movie="http://player.vimeo.com/video/"+movie_id.match(/http:\/\/(www\.)?vimeo.com\/(\d+)/)[2]+"?title=0&amp;byline=0&amp;portrait=0";settings.autoplay&&
(movie+="&autoplay=1;");vimeo_width=b.width+"/embed/?moog_width="+b.width;toInject=settings.iframe_markup.replace(/{width}/g,vimeo_width).replace(/{height}/g,b.height).replace(/{path}/g,movie);break;case "quicktime":b=f(movie_width,movie_height);b.height+=15;b.contentHeight+=15;b.containerHeight+=15;toInject=settings.quicktime_markup.replace(/{width}/g,b.width).replace(/{height}/g,b.height).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,pp_images[set_position]).replace(/{autoplay}/g,settings.autoplay);
break;case "flash":b=f(movie_width,movie_height);flash_vars=pp_images[set_position];flash_vars=flash_vars.substring(pp_images[set_position].indexOf("flashvars")+10,pp_images[set_position].length);filename=pp_images[set_position];filename=filename.substring(0,filename.indexOf("?"));toInject=settings.flash_markup.replace(/{width}/g,b.width).replace(/{height}/g,b.height).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,filename+"?"+flash_vars);break;case "iframe":b=f(movie_width,movie_height);frame_url=
pp_images[set_position];frame_url=frame_url.substr(0,frame_url.indexOf("iframe")-1);toInject=settings.iframe_markup.replace(/{width}/g,b.width).replace(/{height}/g,b.height).replace(/{path}/g,frame_url);break;case "ajax":doresize=!1;b=f(movie_width,movie_height);skipInjection=doresize=!0;a.get(pp_images[set_position],function(a){toInject=settings.inline_markup.replace(/{content}/g,a);$pp_pic_holder.find("#pp_full_res")[0].innerHTML=toInject;n()});break;case "custom":b=f(movie_width,movie_height);
toInject=settings.custom_markup;break;case "inline":myClone=a(pp_images[set_position]).clone().append('<br clear="all" />').css({width:settings.default_width}).wrapInner('<div id="pp_full_res"><div class="pp_inline"></div></div>').appendTo(a("body")).show(),doresize=!1,b=f(a(myClone).width(),a(myClone).height()),doresize=!0,a(myClone).remove(),toInject=settings.inline_markup.replace(/{content}/g,a(pp_images[set_position]).html())}if(!imgPreloader&&!skipInjection)$pp_pic_holder.find("#pp_full_res")[0].innerHTML=
toInject,n()});return!1};a.prettyPhoto.changePage=function(c){currentGalleryPage=0;c=="previous"?(set_position--,set_position<0&&(set_position=a(pp_images).size()-1)):c=="next"?(set_position++,set_position>a(pp_images).size()-1&&(set_position=0)):set_position=c;rel_index=set_position;doresize||(doresize=!0);a(".pp_contract").removeClass("pp_contract").addClass("pp_expand");k(function(){a.prettyPhoto.open()})};a.prettyPhoto.changeGalleryPage=function(a){a=="next"?(currentGalleryPage++,currentGalleryPage>
totalPage&&(currentGalleryPage=0)):a=="previous"?(currentGalleryPage--,currentGalleryPage<0&&(currentGalleryPage=totalPage)):currentGalleryPage=a;slide_speed=a=="next"||a=="previous"?settings.animation_speed:0;slide_to=currentGalleryPage*itemsPerPage*itemWidth;$pp_gallery.find("ul").animate({left:-slide_to},slide_speed)};a.prettyPhoto.startSlideshow=function(){typeof l=="undefined"?($pp_pic_holder.find(".pp_play").unbind("click").removeClass("pp_play").addClass("pp_pause").click(function(){a.prettyPhoto.stopSlideshow();
return!1}),l=setInterval(a.prettyPhoto.startSlideshow,settings.slideshow)):a.prettyPhoto.changePage("next")};a.prettyPhoto.stopSlideshow=function(){$pp_pic_holder.find(".pp_pause").unbind("click").removeClass("pp_pause").addClass("pp_play").click(function(){a.prettyPhoto.startSlideshow();return!1});clearInterval(l);l=void 0};a.prettyPhoto.close=function(){$pp_overlay.is(":animated")||(a.prettyPhoto.stopSlideshow(),$pp_pic_holder.stop().find("object,embed").css("visibility","hidden"),a("div.pp_pic_holder,div.ppt,.pp_fade").fadeOut(settings.animation_speed,
function(){a(this).remove()}),$pp_overlay.fadeOut(settings.animation_speed,function(){a.browser.msie&&a.browser.version==6&&a("select").css("visibility","visible");settings.hideflash&&a("object,embed,iframe[src*=youtube],iframe[src*=vimeo]").css("visibility","visible");a(this).remove();a(window).unbind("scroll.prettyphoto");settings.callback();doresize=!0;p=!1;delete settings}))};!pp_alreadyInitialized&&t()&&(pp_alreadyInitialized=!0,hashRel=hashIndex=t(),hashIndex=hashIndex.substring(hashIndex.indexOf("/")+
1,hashIndex.length-1),hashRel=hashRel.substring(0,hashRel.indexOf("/")),setTimeout(function(){a("a[rel^='"+hashRel+"']:eq("+hashIndex+")").trigger("click")},50));return this.unbind("click.prettyphoto").bind("click.prettyphoto",a.prettyPhoto.initialize)}})(jQuery);var pp_alreadyInitialized=!1;

/*
	jQuery Version:				jQuery 1.3.2
	Plugin Name:				aToolTip V 1.0
	Plugin by: 					Ara Abcarians: http://ara-abcarians.com
	License:					aToolTip is licensed under a Creative Commons Attribution 3.0 Unported License
								Read more about this license at --> http://creativecommons.org/licenses/by/3.0/			
*/
(function(b){b.fn.aToolTip=function(e){var a=b.extend({},{clickIt:!1,closeTipBtn:"aToolTipCloseBtn",fixed:!1,inSpeed:200,outSpeed:0,tipContent:"",toolTipClass:"aToolTip",xOffset:5,yOffset:5},e);return this.each(function(){var c=b(this),d=c.attr("title")?c.attr("title"):a.tipContent;d&&!a.clickIt&&c.hover(function(){c.attr({title:""});b("body").append("<div class='"+a.toolTipClass+"'><p class='aToolTipContent'>"+d+"</p></div>");b("."+a.toolTipClass).css({position:"absolute",display:"none",zIndex:"50000",
top:c.offset().top-b("."+a.toolTipClass).outerHeight()-a.yOffset+"px",left:c.offset().left+0.5*c.outerWidth()+a.xOffset+"px"}).stop().fadeIn(a.inSpeed)},function(){b("."+a.toolTipClass).stop().fadeOut(a.outSpeed,function(){b(this).remove()})});!a.fixed&&!a.clickIt&&c.mousemove(function(c){b("."+a.toolTipClass).css({top:c.pageY-b("."+a.toolTipClass).outerHeight()-a.yOffset,left:c.pageX+a.xOffset})});d&&a.clickIt&&c.click(function(){c.attr({title:""});b("body").append("<div class='"+a.toolTipClass+
"'><p class='aToolTipContent'>"+d+"</p></div>");b("."+a.toolTipClass).append("<a class='"+a.closeTipBtn+"' href='#' alt='close'>close</a>");b("."+a.toolTipClass).css({position:"absolute",display:"none",zIndex:"50000",top:c.offset().top-b("."+a.toolTipClass).outerHeight()-a.yOffset+"px",left:c.offset().left+c.outerWidth()+a.xOffset+"px"}).fadeIn(a.inSpeed);b("."+a.closeTipBtn).click(function(){b("."+a.toolTipClass).fadeOut(a.outSpeed,function(){b(this).remove()});return!1});return!1})})}})(jQuery);


/*
 * jQuery Cookie plugin
 *
 * Copyright (c) 2010 Klaus Hartl (stilbuero.de)
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 *
*/
jQuery.cookie=function(d,e,b){if(arguments.length>1&&(e===null||typeof e!=="object")){b=jQuery.extend({},b);if(e===null){b.expires=-1}if(typeof b.expires==="number"){var g=b.expires,c=b.expires=new Date();c.setDate(c.getDate()+g)}return(document.cookie=[encodeURIComponent(d),"=",b.raw?String(e):encodeURIComponent(String(e)),b.expires?"; expires="+b.expires.toUTCString():"",b.path?"; path="+b.path:"",b.domain?"; domain="+b.domain:"",b.secure?"; secure":""].join(""))}b=e||{};var a,f=b.raw?function(h){return h}:decodeURIComponent;return(a=new RegExp("(?:^|; )"+encodeURIComponent(d)+"=([^;]*)").exec(document.cookie))?f(a[1]):null};

