/* ColorBox v1.1.6 - a full featured, light-weight, customizable lightbox based on jQuery 1.3 (c) 2009 Jack Moore - www.colorpowered.com - jack@colorpowered.com Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php */ (function(h){var s,k,e,n,b,j,x,t,m,o,q,i,g,v,f,p,d,l,u;function a(){i.css({position:"absolute",width:h(window).width(),height:h(window).height(),top:h(window).scrollTop(),left:h(window).scrollLeft()})}function c(y){if(y.keyCode==37){y.preventDefault();h(document).unbind("keydown",c);h("a#contentPrevious").click()}else{if(y.keyCode==39){y.preventDefault();h(document).unbind("keydown",c);h("a#contentNext").click()}}}function w(){if(h("#colorboxInlineTemp").length>0){v.children().insertAfter("#colorboxInlineTemp")}if(t){h(t).remove()}}function r(y,z){return(typeof y=="string")?(y.match(/%/)?(z/100)*parseInt(y,10):parseInt(y,10)):y}h(function(){h("body").append(i=h('
').hide(),m=h('').css("opacity",0));h('').appendTo(m).append(h('"+I+"
";if(x.length>1){G+=" "+D.contentCurrent+"";G=G.replace(/\{current\}/,j+1).replace(/\{total\}/,x.length);G+=""+D.contentPrevious+""+D.contentNext+" "}if(D.inline){t=h('').hide().insertBefore(h(H)[0]);B(h(H).wrapAll("").parent(),G)}else{if(D.iframe){B(h(""),G)}else{if(H.match(/\.(gif|png|jpg|jpeg|bmp)(?:\?([^#]*))?(?:#(.*))?$/i)){t=new Image();t.onload=function(){t.onload=null;B(h("").css({width:this.width,height:this.height}).append(h(this).css({width:this.width,height:this.height,display:"block",margin:"auto"}).attr("id","modalPhoto")),G);if(x.length>1){h(this).css({cursor:"pointer"}).click(A)}};t.src=H}else{t=h("").load(H,function(J,K){if(K=="success"){B(h(this),G)}else{B(h("Request unsuccessful.
"))}})}}}}D=h.extend({},h.fn.colorbox.settings,D);h(this).unbind("click.colorbox").bind("click.colorbox",function(){if(D.fixedWidth){D.fixedWidth=r(D.fixedWidth,document.documentElement.clientWidth)}if(D.fixedHeight){D.fixedHeight=r(D.fixedHeight,document.documentElement.clientHeight)}if(this.rel&&"nofollow"!=this.rel){x=h("a[rel='"+this.rel+"']");j=h(x).index(this)}else{x=h(this);j=0}if(m.data("open")!==true){h(document).bind("keydown",c);f.html(D.modalClose);i.css({opacity:D.bgOpacity}).show();m.data("open",true).css({opacity:1});y(r(D.initialWidth,document.documentElement.clientWidth),r(D.initialHeight,document.documentElement.clientHeight),0);if(h.browser.msie&&h.browser.version<7){h(window).bind("resize scroll",a)}}E(D.href?D.href:x[j].href,D.title?D.title:x[j].title);h("a#contentPrevious, a#contentNext").die().live("click",A);if(D.overlayClose!==false){i.css({cursor:"pointer"}).click(function(){h.fn.colorbox.close()})}return false});if(D.open!==false&&m.data("open")!==true){h(this).triggerHandler("click.colorbox")}return this.each(function(){})};h.fn.colorbox.close=function(){h("#contentTitle").remove();w();i.css({cursor:"auto"}).fadeOut("fast");m.stop(true,false).removeData("open").fadeOut("fast",function(){v.remove()});h(document).unbind("keydown",c);h(window).unbind("resize scroll",a);return false};h.fn.colorbox.settings={transition:"elastic",transitionSpeed:350,initialWidth:"400",initialHeight:"400",fixedWidth:false,fixedHeight:false,inline:false,iframe:false,href:false,title:false,bgOpacity:0.85,preloading:true,contentCurrent:"image {current} of {total}",contentPrevious:"previous",contentNext:"next",modalClose:"close",open:false,overlayClose:true}})(jQuery);