/* JavaScriptCompressor 0.8 [www.devpro.it], thanks to Dean Edwards for idea [dean.edwards.name] */
(function($){$.facebox=function(data,klass){$.facebox.init()
$.facebox.loading()
$.isFunction(data)?data.call($):$.facebox.reveal(data,klass)}
$.facebox.settings={loading_image:
'/squelettes/images/facebox/loading.gif'
,close_image:
'/squelettes/images/facebox/closelabel.gif'
,image_types:[
'png'
,
'jpg'
,
'jpeg'
,
'gif'
],facebox_html:
'\
  <div id="facebox" style="display:none;"> \
    <div class="popup"> \
      <table> \
        <tbody> \
          <tr> \
            <td class="tl"/><td class="b"/><td class="tr"/> \
          </tr> \
          <tr> \
            <td class="b"/> \
            <td class="body"> \
              <div class="content"> \
              </div> \
              <div class="footer"> \
              </div> \
			  <div class="btClose"> \
	                <a href="#" class="close"> \
                  <img src="/squelettes/images/facebox/closelabel.gif" title="close" class="close_image" /> \
                </a> \
			  </div> \
		  	 <div class="navigation"> \
			  </div> \
            </td> \
            <td class="b"/> \
          </tr> \
          <tr> \
            <td class="bl"/><td class="b"/><td class="br"/> \
          </tr> \
        </tbody> \
      </table> \
    </div> \
  </div>'
}
$.facebox.loading=function(){if ($(
'#facebox .loading'
).length==1) return true
$(
'#facebox .content'
).empty()
$(
'#facebox .body'
).children().hide().end().
append(
'<div class="loading"><img src="'
+$.facebox.settings.loading_image+
'"/></div>'
)
$(
'#facebox'
).css({top:$(document).scrollTop()+($(document).height()/ 10)-40,left:$(document).scrollLeft()-20}).show()
$(document).bind(
'keydown.facebox'
,function(e){if (e.keyCode==27) $.facebox.close()})}
$.facebox.reveal=function(data,klass){if (klass) $(
'#facebox .content'
).addClass(klass)
$(
'#facebox .content'
).append(data)
$(
'#facebox .loading'
).remove()
$(
'#facebox .body'
).children().fadeIn(
'normal'
)}
$.facebox.close=function(){$(document).trigger(
'close.facebox'
)
if($.browser.OS==
"Linux"
){if(!($(
'flash'
).length>0)){
$(
'#replaceflash'
).removeClass(
'on'
)
$(
'#replaceflash'
).addClass(
'off'
)
$(
'#flash'
).removeClass(
'off'
)
$(
'#flash'
).addClass(
'on'
)}}
return false}
$(document).bind(
'close.facebox'
,function(){$(document).unbind(
'keydown.facebox'
)
$(
'#facebox'
).fadeOut(function(){$(
'#facebox .content'
).removeClass().addClass(
'content'
)})})
$.fn.facebox=function(settings){$.facebox.init(settings)
var image_types=$.facebox.settings.image_types.join(
'|'
)
image_types=new RegExp(
'\.'
+image_types+
'$'
,
'i'
)
function click_handler(){$.facebox.loading(true)
var klass=this.rel.match(
/facebox\[\.(\w+)\]/)
if (klass) klass=klass[1]
if (this.href.match(
/#/)){var target=
'#'
+this.href.split(
'#'
)[1]
$.facebox.reveal($(target).clone().show(),klass)
} else if (this.href.match(image_types)){var image=new Image()
image.onload=function(){$.facebox.reveal(
'<div class="image"><img src="'
+image.src+
'" /></div>'
,klass)}
image.src=this.href
} else {$.get(this.href,function(data){$.facebox.reveal(data,klass)})}
return false}
this.click(click_handler)
return this}
$.facebox.init=function(settings){if ($.facebox.settings.inited){return true} else {$.facebox.settings.inited=true}
if (settings) $.extend($.facebox.settings,settings)
$(
'body'
).append($.facebox.settings.facebox_html)
var preload=[ new Image(),new Image() ]
preload[0].src=$.facebox.settings.close_image
preload[1].src=$.facebox.settings.loading_image
$(
'#facebox'
).find(
'.b:first, .bl, .br, .tl, .tr'
).each(function(){preload.push(new Image())
preload.slice(-1).src=$(this).css(
'background-image'
).replace(
/url\((.+)\)/,
'$1'
)})
$(
'#facebox .close'
).click($.facebox.close)
$(
'#facebox .close_image'
).attr(
'src'
,$.facebox.settings.close_image)}})(jQuery);