var tb_pathToImage = "http://www.jigoku.it/plugins/thickbox/loadingAnimation.gif"; $.browser.msie6 = $.browser.msie
&& /MSIE 6\.0/i.test(window.navigator.userAgent)
&& !/MSIE 7\.0/i.test(window.navigator.userAgent); $(document).ready(function(){ tb_init('a.thickbox, area.thickbox, input.thickbox'); imgLoader = new Image(); imgLoader.src = tb_pathToImage;}); function tb_init(domChunk){ $(domChunk).click(function(){ var t = this.title || this.name || null; var a = this.href || this.alt; var g = this.rel || false; tb_show(t,a,g); this.blur(); return false;});}
function tb_show(caption, url, imageGroup) { try { if (typeof document.body.style.maxHeight === "undefined") { $("body","html").css({height: "100%", width: "100%"}); $("html").css("overflow","hidden"); if (document.getElementById("TB_HideSelect") === null) { $("body").append("<iframe id='TB_HideSelect'></iframe><div id='TB_overlay'></div><div id='TB_window'></div>"); $("#TB_overlay").click(tb_remove);}
}else{ if(document.getElementById("TB_overlay") === null){ $("body").append("<div id='TB_overlay'></div><div id='TB_window'></div>"); $("#TB_overlay").click(tb_remove);}
}
if(tb_detectMacXFF()){ $("#TB_overlay").addClass("TB_overlayMacFFBGHack");}else{ $("#TB_overlay").addClass("TB_overlayBG");}
if(caption===null){caption="";}
$("body").append("<div id='TB_load'><img src='"+imgLoader.src+"' /></div>"); $('#TB_load').show(); var baseURL; if(url.indexOf("?")!==-1){ baseURL = url.substr(0, url.indexOf("?"));}else{ baseURL = url;}
var urlString = /\.jpg$|\.jpeg$|\.png$|\.gif$|\.bmp$/; var urlType = baseURL.toLowerCase().match(urlString); if(urlType == '.jpg' || urlType == '.jpeg' || urlType == '.png' || urlType == '.gif' || urlType == '.bmp'){ TB_PrevCaption = ""; TB_PrevURL = ""; TB_PrevHTML = ""; TB_NextCaption = ""; TB_NextURL = ""; TB_NextHTML = ""; TB_imageCount = ""; TB_FoundURL = false; if(imageGroup){ TB_TempArray = $("a[@rel="+imageGroup+"]").get(); for (TB_Counter = 0; ((TB_Counter < TB_TempArray.length) && (TB_NextHTML === "")); TB_Counter++) { var urlTypeTemp = TB_TempArray[TB_Counter].href.toLowerCase().match(urlString); if (!(TB_TempArray[TB_Counter].href == url)) { if (TB_FoundURL) { TB_NextCaption = TB_TempArray[TB_Counter].title; TB_NextURL = TB_TempArray[TB_Counter].href; TB_NextHTML = "<span id='TB_next'>&nbsp;&nbsp;<a href='#'>Next &gt;</a></span>";} else { TB_PrevCaption = TB_TempArray[TB_Counter].title; TB_PrevURL = TB_TempArray[TB_Counter].href; TB_PrevHTML = "<span id='TB_prev'>&nbsp;&nbsp;<a href='#'>&lt; Prev</a></span>";}
} else { TB_FoundURL = true; TB_imageCount = "Image " + (TB_Counter + 1) +" of "+ (TB_TempArray.length);}
}
}
imgPreloader = new Image(); imgPreloader.onload = function(){ imgPreloader.onload = null; var pagesize = tb_getPageSize(); var x = pagesize[0] - 100; var y = pagesize[1] - 100; var imageWidth = imgPreloader.width; var imageHeight = imgPreloader.height; if (imageWidth > x) { imageHeight = imageHeight * (x / imageWidth); imageWidth = x; if (imageHeight > y) { imageWidth = imageWidth * (y / imageHeight); imageHeight = y;}
} else if (imageHeight > y) { imageWidth = imageWidth * (y / imageHeight); imageHeight = y; if (imageWidth > x) { imageHeight = imageHeight * (x / imageWidth); imageWidth = x;}
}
TB_WIDTH = imageWidth + 30; TB_HEIGHT = imageHeight + 60; $("#TB_window").append("<a href='' id='TB_ImageOff' title='Chiudi'><img id='TB_Image' src='"+url+"' width='"+imageWidth+"' height='"+imageHeight+"' alt='"+caption+"'/></a>" + "<div id='TB_caption'>"+caption+"<div id='TB_secondLine'>" + TB_imageCount + TB_PrevHTML + TB_NextHTML + "</div></div><div id='TB_closeWindow'><a href='#' id='TB_closeWindowButton' title='Chiudi'><img src=\"http://www.jigoku.it/plugins/thickbox/close.png\" style=\"margin-top:3px\"></a></div>"); $("#TB_closeWindowButton").click(tb_remove); if (!(TB_PrevHTML === "")) { function goPrev(){ if($(document).unbind("click",goPrev)){$(document).unbind("click",goPrev);}
$("#TB_window").remove(); $("body").append("<div id='TB_window'></div>"); tb_show(TB_PrevCaption, TB_PrevURL, imageGroup); return false;}
$("#TB_prev").click(goPrev);}
if (!(TB_NextHTML === "")) { function goNext(){ $("#TB_window").remove(); $("body").append("<div id='TB_window'></div>"); tb_show(TB_NextCaption, TB_NextURL, imageGroup); return false;}
$("#TB_next").click(goNext);}
document.onkeydown = function(e){ if (e == null) { keycode = event.keyCode;} else { keycode = e.which;}
if(keycode == 27){ tb_remove();} else if(keycode == 190){ if(!(TB_NextHTML == "")){ document.onkeydown = ""; goNext();}
} else if(keycode == 188){ if(!(TB_PrevHTML == "")){ document.onkeydown = ""; goPrev();}
}
}; tb_position(); $("#TB_load").remove(); $("#TB_ImageOff").click(tb_remove); $("#TB_window").css({display:"block"});}; imgPreloader.src = url;}else{ var queryString = url.replace(/^[^\?]+\??/,''); var params = tb_parseQuery( queryString ); TB_WIDTH = (params['width']*1) + 30 || 630; TB_HEIGHT = (params['height']*1) + 40 || 440; ajaxContentW = TB_WIDTH - 30; ajaxContentH = TB_HEIGHT - 45; if(url.indexOf('TB_iframe') != -1){ urlNoQuery = url.split('TB_'); $("#TB_iframeContent").remove(); if(params['modal'] != "true"){ if(params['youtube'] == "true"){ $("#TB_window").append("<iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW + 29)+"px;height:"+(ajaxContentH + 17)+"px;border-right:1px #525252 solid;' > </iframe>");}else{ $("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton' title='Chiudi'><img src=\"http://www.jigoku.it/plugins/thickbox/w_close.gif\" alt='Chiudi'></a></div></div><iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW + 29)+"px;height:"+(ajaxContentH + 17)+"px;' > </iframe>");}
}else{ $("#TB_overlay").unbind(); $("#TB_window").append("<iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW + 29)+"px;height:"+(ajaxContentH + 17)+"px;'> </iframe>");}
}else{ if($("#TB_window").css("display") != "block"){ if(params['modal'] != "true"){ $("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton'><img src=\"http://www.jigoku.it/plugins/thickbox/w_close.gif\" alt='Chiudi'></a></div></div><div id='TB_ajaxContent' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px'></div>");}else{ $("#TB_overlay").unbind(); $("#TB_window").append("<div id='TB_ajaxContent' class='TB_modal' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px;'></div>");}
}else{ $("#TB_ajaxContent")[0].style.width = ajaxContentW +"px"; $("#TB_ajaxContent")[0].style.height = ajaxContentH +"px"; $("#TB_ajaxContent")[0].scrollTop = 0; $("#TB_ajaxWindowTitle").html(caption);}
}
$("#TB_closeWindowButton").click(tb_remove); if(url.indexOf('TB_inline') != -1){ $("#TB_ajaxContent").append($('#' + params['inlineId']).children()); $("#TB_window").unload(function () { $('#' + params['inlineId']).append( $("#TB_ajaxContent").children() );}); tb_position(); $("#TB_load").remove(); $("#TB_window").css({display:"block"});}else if(url.indexOf('TB_iframe') != -1){ tb_position(); if($.browser.safari){ $("#TB_load").remove(); $("#TB_window").css({display:"block"});}
}else{ $("#TB_ajaxContent").load(url += "&random=" + (new Date().getTime()),function(){ tb_position(); $("#TB_load").remove(); tb_init("#TB_ajaxContent a.thickbox"); $("#TB_window").css({display:"block"});});}
}
if(!params['modal']){ document.onkeyup = function(e){ if (e == null) { keycode = event.keyCode;} else { keycode = e.which;}
if(keycode == 27){ tb_remove();}
};}
} catch(e) { }
}
function tb_showIframe(){ $("#TB_load").remove(); $("#TB_window").css({display:"block"});}
function tb_remove() { $("#TB_imageOff").unbind("click"); $("#TB_closeWindowButton").unbind("click"); $("#TB_window").fadeOut("fast",function(){$('#TB_window,#TB_overlay,#TB_HideSelect').trigger("unload").unbind().remove();}); $("#TB_load").remove(); if (typeof document.body.style.maxHeight == "undefined") { $("body","html").css({height: "auto", width: "auto"}); $("html").css("overflow","");}
document.onkeydown = ""; document.onkeyup = ""; return false;}
function tb_position() { $("#TB_window").css({marginLeft: '-' + parseInt((TB_WIDTH / 2),10) + 'px', width: TB_WIDTH + 'px'}); if (!(jQuery.browser.msie6)) { $("#TB_window").css({marginTop: '-' + parseInt((TB_HEIGHT / 2),10) + 'px'});}
}
function tb_parseQuery ( query ) { var Params = {}; if ( ! query ) {return Params;}
var Pairs = query.split(/[;&]/); for ( var i = 0; i < Pairs.length; i++ ) { var KeyVal = Pairs[i].split('='); if ( ! KeyVal || KeyVal.length != 2 ) {continue;}
var key = unescape( KeyVal[0] ); var val = unescape( KeyVal[1] ); val = val.replace(/\+/g, ' '); Params[key] = val;}
return Params;}
function tb_getPageSize(){ var de = document.documentElement; var w = window.innerWidth || self.innerWidth || (de&&de.clientWidth) || document.body.clientWidth; var h = window.innerHeight || self.innerHeight || (de&&de.clientHeight) || document.body.clientHeight; arrayPageSize = [w,h]; return arrayPageSize;}
function tb_detectMacXFF() { var userAgent = navigator.userAgent.toLowerCase(); if (userAgent.indexOf('mac') != -1 && userAgent.indexOf('firefox')!=-1) { return true;}
}
(function($){$.fn.lightBox=function(settings){settings=jQuery.extend({overlayBgColor:'#000',overlayOpacity:0.8,fixedNavigation:false,imageLoading:'/images/lightbox-ico-loading.gif',imageBtnPrev:'/images/lightbox-btn-prev.gif',imageBtnNext:'/images/lightbox-btn-next.gif',imageBtnClose:'/images/lightbox-btn-close.gif',imageBlank:'/images/lightbox-blank.gif',containerBorderSize:10,containerResizeSpeed:400,txtImage:'Image',txtOf:'of',keyToClose:'c',keyToPrev:'p',keyToNext:'n',imageArray:[],activeImage:0},settings);var jQueryMatchedObj=this;function _initialize(){_start(this,jQueryMatchedObj);return false;}
function _start(objClicked,jQueryMatchedObj){$('embed, object, select').css({'visibility':'hidden'});_set_interface();settings.imageArray.length=0;settings.activeImage=0;if(jQueryMatchedObj.length==1){settings.imageArray.push(new Array(objClicked.getAttribute('href'),objClicked.getAttribute('title')));}else{for(var i=0;i<jQueryMatchedObj.length;i++){settings.imageArray.push(new Array(jQueryMatchedObj[i].getAttribute('href'),jQueryMatchedObj[i].getAttribute('title')));}}
while(settings.imageArray[settings.activeImage][0]!=objClicked.getAttribute('href')){settings.activeImage++;}
_set_image_to_view();}
function _set_interface(){$('body').append('<div id="jquery-overlay"></div><div id="jquery-lightbox"><div id="lightbox-container-image-box"><div id="lightbox-container-image"><img id="lightbox-image"><div style="" id="lightbox-nav"><a href="#" id="lightbox-nav-btnPrev"></a><a href="#" id="lightbox-nav-btnNext"></a></div><div id="lightbox-loading"><a href="#" id="lightbox-loading-link"><img src="'+settings.imageLoading+'"></a></div></div></div><div id="lightbox-container-image-data-box"><div id="lightbox-container-image-data"><div id="lightbox-image-details"><span id="lightbox-image-details-caption"></span><span id="lightbox-image-details-currentNumber"></span></div><div id="lightbox-secNav"><a href="#" id="lightbox-secNav-btnClose"><img src="'+settings.imageBtnClose+'"></a></div></div></div></div>');var arrPageSizes=___getPageSize();$('#jquery-overlay').css({backgroundColor:settings.overlayBgColor,opacity:settings.overlayOpacity,width:arrPageSizes[0],height:arrPageSizes[1]}).fadeIn();var arrPageScroll=___getPageScroll();$('#jquery-lightbox').css({top:arrPageScroll[1]+(arrPageSizes[3]/10),left:arrPageScroll[0]}).show();$('#jquery-overlay,#jquery-lightbox').click(function(){_finish();});$('#lightbox-loading-link,#lightbox-secNav-btnClose').click(function(){_finish();return false;});$(window).resize(function(){var arrPageSizes=___getPageSize();$('#jquery-overlay').css({width:arrPageSizes[0],height:arrPageSizes[1]});var arrPageScroll=___getPageScroll();$('#jquery-lightbox').css({top:arrPageScroll[1]+(arrPageSizes[3]/10),left:arrPageScroll[0]});});}
function _set_image_to_view(){$('#lightbox-loading').show();if(settings.fixedNavigation){$('#lightbox-image,#lightbox-container-image-data-box,#lightbox-image-details-currentNumber').hide();}else{$('#lightbox-image,#lightbox-nav,#lightbox-nav-btnPrev,#lightbox-nav-btnNext,#lightbox-container-image-data-box,#lightbox-image-details-currentNumber').hide();}
var objImagePreloader=new Image();objImagePreloader.onload=function(){$('#lightbox-image').attr('src',settings.imageArray[settings.activeImage][0]);_resize_container_image_box(objImagePreloader.width,objImagePreloader.height);objImagePreloader.onload=function(){};};objImagePreloader.src=settings.imageArray[settings.activeImage][0];};function _resize_container_image_box(intImageWidth,intImageHeight){var intCurrentWidth=$('#lightbox-container-image-box').width();var intCurrentHeight=$('#lightbox-container-image-box').height();var intWidth=(intImageWidth+(settings.containerBorderSize*2));var intHeight=(intImageHeight+(settings.containerBorderSize*2));var intDiffW=intCurrentWidth-intWidth;var intDiffH=intCurrentHeight-intHeight;$('#lightbox-container-image-box').animate({width:intWidth,height:intHeight},settings.containerResizeSpeed,function(){_show_image();});if((intDiffW==0)&&(intDiffH==0)){if($.browser.msie){___pause(250);}else{___pause(100);}}
$('#lightbox-container-image-data-box').css({width:intImageWidth});$('#lightbox-nav-btnPrev,#lightbox-nav-btnNext').css({height:intImageHeight+(settings.containerBorderSize*2)});};function _show_image(){$('#lightbox-loading').hide();$('#lightbox-image').fadeIn(function(){_show_image_data();_set_navigation();});_preload_neighbor_images();};function _show_image_data(){$('#lightbox-container-image-data-box').slideDown('fast');$('#lightbox-image-details-caption').hide();if(settings.imageArray[settings.activeImage][1]){$('#lightbox-image-details-caption').html(settings.imageArray[settings.activeImage][1]).show();}
if(settings.imageArray.length>1){$('#lightbox-image-details-currentNumber').html(settings.txtImage+' '+(settings.activeImage+1)+' '+settings.txtOf+' '+settings.imageArray.length).show();}}
function _set_navigation(){$('#lightbox-nav').show();$('#lightbox-nav-btnPrev,#lightbox-nav-btnNext').css({'background':'transparent url('+settings.imageBlank+') no-repeat'});if(settings.activeImage!=0){if(settings.fixedNavigation){$('#lightbox-nav-btnPrev').css({'background':'url('+settings.imageBtnPrev+') left 15% no-repeat'}).unbind().bind('click',function(){settings.activeImage=settings.activeImage-1;_set_image_to_view();return false;});}else{$('#lightbox-nav-btnPrev').unbind().hover(function(){$(this).css({'background':'url('+settings.imageBtnPrev+') left 15% no-repeat'});},function(){$(this).css({'background':'transparent url('+settings.imageBlank+') no-repeat'});}).show().bind('click',function(){settings.activeImage=settings.activeImage-1;_set_image_to_view();return false;});}}
if(settings.activeImage!=(settings.imageArray.length-1)){if(settings.fixedNavigation){$('#lightbox-nav-btnNext').css({'background':'url('+settings.imageBtnNext+') right 15% no-repeat'}).unbind().bind('click',function(){settings.activeImage=settings.activeImage+1;_set_image_to_view();return false;});}else{$('#lightbox-nav-btnNext').unbind().hover(function(){$(this).css({'background':'url('+settings.imageBtnNext+') right 15% no-repeat'});},function(){$(this).css({'background':'transparent url('+settings.imageBlank+') no-repeat'});}).show().bind('click',function(){settings.activeImage=settings.activeImage+1;_set_image_to_view();return false;});}}
_enable_keyboard_navigation();}
function _enable_keyboard_navigation(){$(document).keydown(function(objEvent){_keyboard_action(objEvent);});}
function _disable_keyboard_navigation(){$(document).unbind();}
function _keyboard_action(objEvent){if(objEvent==null){keycode=event.keyCode;escapeKey=27;}else{keycode=objEvent.keyCode;escapeKey=objEvent.DOM_VK_ESCAPE;}
key=String.fromCharCode(keycode).toLowerCase();if((key==settings.keyToClose)||(key=='x')||(keycode==escapeKey)){_finish();}
if((key==settings.keyToPrev)||(keycode==37)){if(settings.activeImage!=0){settings.activeImage=settings.activeImage-1;_set_image_to_view();_disable_keyboard_navigation();}}
if((key==settings.keyToNext)||(keycode==39)){if(settings.activeImage!=(settings.imageArray.length-1)){settings.activeImage=settings.activeImage+1;_set_image_to_view();_disable_keyboard_navigation();}}}
function _preload_neighbor_images(){if((settings.imageArray.length-1)>settings.activeImage){objNext=new Image();objNext.src=settings.imageArray[settings.activeImage+1][0];}
if(settings.activeImage>0){objPrev=new Image();objPrev.src=settings.imageArray[settings.activeImage-1][0];}}
function _finish(){$('#jquery-lightbox').remove();$('#jquery-overlay').fadeOut(function(){$('#jquery-overlay').remove();});$('embed, object, select').css({'visibility':'visible'});}
function ___getPageSize(){var xScroll,yScroll;if(window.innerHeight&&window.scrollMaxY){xScroll=window.innerWidth+window.scrollMaxX;yScroll=window.innerHeight+window.scrollMaxY;}else if(document.body.scrollHeight>document.body.offsetHeight){xScroll=document.body.scrollWidth;yScroll=document.body.scrollHeight;}else{xScroll=document.body.offsetWidth;yScroll=document.body.offsetHeight;}
var windowWidth,windowHeight;if(self.innerHeight){if(document.documentElement.clientWidth){windowWidth=document.documentElement.clientWidth;}else{windowWidth=self.innerWidth;}
windowHeight=self.innerHeight;}else if(document.documentElement&&document.documentElement.clientHeight){windowWidth=document.documentElement.clientWidth;windowHeight=document.documentElement.clientHeight;}else if(document.body){windowWidth=document.body.clientWidth;windowHeight=document.body.clientHeight;}
if(yScroll<windowHeight){pageHeight=windowHeight;}else{pageHeight=yScroll;}
if(xScroll<windowWidth){pageWidth=xScroll;}else{pageWidth=windowWidth;}
arrayPageSize=new Array(pageWidth,pageHeight,windowWidth,windowHeight);return arrayPageSize;};function ___getPageScroll(){var xScroll,yScroll;if(self.pageYOffset){yScroll=self.pageYOffset;xScroll=self.pageXOffset;}else if(document.documentElement&&document.documentElement.scrollTop){yScroll=document.documentElement.scrollTop;xScroll=document.documentElement.scrollLeft;}else if(document.body){yScroll=document.body.scrollTop;xScroll=document.body.scrollLeft;}
arrayPageScroll=new Array(xScroll,yScroll);return arrayPageScroll;};function ___pause(ms){var date=new Date();curDate=null;do{var curDate=new Date();}
while(curDate-date<ms);};return this.unbind('click').click(_initialize);};})(jQuery); (function($) { $.alerts = { verticalOffset: -75, horizontalOffset: 0, repositionOnResize: true, overlayOpacity: .01, overlayColor: '#FFF', draggable: true, okButton: '&nbsp;OK&nbsp;', yesButton:'&nbsp;SI&nbsp;', cancelButton: '&nbsp;NO&nbsp;', dialogClass: null, alert: function(message, title, callback) { if( title == null ) title = 'Alert'; $.alerts._show(title, message, null, 'alert', function(result) { if( callback ) callback(result);});}, confirm: function(message, title, callback) { if( title == null ) title = 'Confirm'; $.alerts._show(title, message, null, 'confirm', function(result) { if( callback ) callback(result);});}, prompt: function(message, value, title, callback) { if( title == null ) title = 'Prompt'; $.alerts._show(title, message, value, 'prompt', function(result) { if( callback ) callback(result);});}, _show: function(title, msg, value, type, callback) { $.alerts._hide(); $.alerts._overlay('show'); $("BODY").append( '<div id="popup_container">' + '<h1 id="popup_title"></h1>' + '<div id="popup_content">' + '<div id="popup_message"></div>' + '</div>' + '</div>'); if( $.alerts.dialogClass ) $("#popup_container").addClass($.alerts.dialogClass); var pos = ($.browser.msie && parseInt($.browser.version) <= 6 ) ? 'absolute' : 'fixed'; $("#popup_container").css({ position: pos, zIndex: 99999, padding: 0, margin: 0
}); $("#popup_title").text(title); $("#popup_content").addClass(type); $("#popup_message").text(msg); $("#popup_message").html( $("#popup_message").text().replace(/\n/g, '<br />') ); $("#popup_container").css({ minWidth: $("#popup_container").outerWidth(), maxWidth: $("#popup_container").outerWidth()
}); $.alerts._reposition(); $.alerts._maintainPosition(true); switch( type ) { case 'alert':
$("#popup_message").after('<div id="popup_panel"><input type="button" value="' + $.alerts.okButton + '" id="popup_ok" /></div>'); $("#popup_ok").click( function() { $.alerts._hide(); callback(true);}); $("#popup_ok").focus().keypress( function(e) { if( e.keyCode == 13 || e.keyCode == 27 ) $("#popup_ok").trigger('click');}); break; case 'confirm':
$("#popup_message").after('<div id="popup_panel"><input type="button" value="' + $.alerts.yesButton + '" id="popup_ok" /> <input type="button" value="' + $.alerts.cancelButton + '" id="popup_cancel" /></div>'); $("#popup_ok").click( function() { $.alerts._hide(); if( callback ) callback(true);}); $("#popup_cancel").click( function() { $.alerts._hide(); if( callback ) callback(false);}); $("#popup_ok").focus(); $("#popup_ok, #popup_cancel").keypress( function(e) { if( e.keyCode == 13 ) $("#popup_ok").trigger('click'); if( e.keyCode == 27 ) $("#popup_cancel").trigger('click');}); break; case 'prompt':
$("#popup_message").append('<br /><input type="text" size="30" id="popup_prompt" />').after('<div id="popup_panel"><input type="button" value="' + $.alerts.okButton + '" id="popup_ok" /> <input type="button" value="' + $.alerts.cancelButton + '" id="popup_cancel" /></div>'); $("#popup_prompt").width( $("#popup_message").width() ); $("#popup_ok").click( function() { var val = $("#popup_prompt").val(); $.alerts._hide(); if( callback ) callback( val );}); $("#popup_cancel").click( function() { $.alerts._hide(); if( callback ) callback( null );}); $("#popup_prompt, #popup_ok, #popup_cancel").keypress( function(e) { if( e.keyCode == 13 ) $("#popup_ok").trigger('click'); if( e.keyCode == 27 ) $("#popup_cancel").trigger('click');}); if( value ) $("#popup_prompt").val(value); $("#popup_prompt").focus().select(); break;}
if( $.alerts.draggable ) { try { $("#popup_container").draggable({ handle: $("#popup_title") }); $("#popup_title").css({ cursor: 'move' });} catch(e) { }
}
}, _hide: function() { $("#popup_container").remove(); $.alerts._overlay('hide'); $.alerts._maintainPosition(false);}, _overlay: function(status) { switch( status ) { case 'show':
$.alerts._overlay('hide'); $("BODY").append('<div id="popup_overlay"></div>'); $("#popup_overlay").css({ position: 'absolute', zIndex: 99998, top: '0px', left: '0px', width: '100%', height: $(document).height(), background: $.alerts.overlayColor, opacity: $.alerts.overlayOpacity
}); break; case 'hide':
$("#popup_overlay").remove(); break;}
}, _reposition: function() { var top = (($(window).height() / 2) - ($("#popup_container").outerHeight() / 2)) + $.alerts.verticalOffset; var left = (($(window).width() / 2) - ($("#popup_container").outerWidth() / 2)) + $.alerts.horizontalOffset; if( top < 0 ) top = 0; if( left < 0 ) left = 0; if( $.browser.msie && parseInt($.browser.version) <= 6 ) top = top + $(window).scrollTop(); $("#popup_container").css({ top: top + 'px', left: left + 'px'
}); $("#popup_overlay").height( $(document).height() );}, _maintainPosition: function(status) { if( $.alerts.repositionOnResize ) { switch(status) { case true:
$(window).bind('resize', function() { $.alerts._reposition();}); break; case false:
$(window).unbind('resize'); break;}
}
}
}
jAlert = function(message, title, callback) { $.alerts.alert(message, title, callback);}
jConfirm = function(message, title, callback) { $.alerts.confirm(message, title, callback);}; jPrompt = function(message, value, title, callback) { $.alerts.prompt(message, value, title, callback);};})(jQuery);eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(8(C){C.h={19:{13:8(E,D,H){c G=C.h[E].1K;2H(c F 3D H){G.1W[F]=G.1W[F]||[];G.1W[F].2F([D,H[F]])}},2f:8(D,F,E){c H=D.1W[F];5(!H){e}2H(c G=0;G<H.1F;G++){5(D.a[H[G][0]]){H[G][1].1M(D.j,E)}}}},1Z:{},d:8(D){5(C.h.1Z[D]){e C.h.1Z[D]}c E=C(\'<2c 33="h-3C">\').1V(D).d({n:"Z",6:"-3a",7:"-3a",3E:"3F"}).1v("11");C.h.1Z[D]=!!((!(/1G|3I/).X(E.d("1q"))||(/^[1-9]/).X(E.d("w"))||(/^[1-9]/).X(E.d("T"))||!(/35/).X(E.d("3H"))||!(/3G|3z\\(0, 0, 0, 0\\)/).X(E.d("3y"))));3w{C("11").3c(0).3e(E.3c(0))}3T(F){}e C.h.1Z[D]},3Y:8(D){C(D).1N("1Q","3p").d("30","35")},3S:8(D){C(D).1N("1Q","3R").d("30","")},3L:8(G,D){c F=/6/.X(D||"6")?"v":"u",E=p;5(G[F]>0){e q}G[F]=1;E=G[F]>0?q:p;G[F]=0;e E}};c A=C.2Q.1u;C.2Q.1u=8(){C("*",4).13(4).2J("1u");e A.1M(4,3k)};8 B(F,D,G){c E=C[F][D].3Q||[];E=(2j E=="2D"?E.2K(/,?\\s+/):E);e(C.3P(G,E)!=-1)}C.1C=8(D,E){c F=D.2K(".")[0];D=D.2K(".")[1];C.2Q[D]=8(J){c H=(2j J=="2D"),I=3M.1K.3W.2f(3k,1);5(H&&B(F,D,J)){c G=C.U(4[0],D);e(G?G[J].1M(G,I):1L)}e 4.1h(8(){c K=C.U(4,D);5(H&&K&&C.39(K[J])){K[J].1M(K,I)}1A{5(!H){C.U(4,D,3K C[F][D](4,J))}}})};C[F][D]=8(H,I){c G=4;4.1m=D;4.3t=F+"-"+D;4.a=C.1S({},C.1C.1H,C[F][D].1H,I);4.j=C(H).1x("1R."+D,8(L,J,K){e G.1R(J,K)}).1x("2G."+D,8(K,J){e G.2G(J)}).1x("1u",8(){e G.2u()});4.2m()};C[F][D].1K=C.1S({},C.1C.1K,E)};C.1C.1K={2m:8(){},2u:8(){4.j.3l(4.1m)},2G:8(D){e 4.a[D]},1R:8(D,E){4.a[D]=E;5(D=="1j"){4.j[E?"1V":"2s"](4.3t+"-1j")}},3U:8(){4.1R("1j",p)},3Z:8(){4.1R("1j",q)}};C.1C.1H={1j:p};C.h.2k={3b:8(){c D=4;4.j.1x("3x."+4.1m,8(E){e D.3f(E)});5(C.2h.2o){4.3i=4.j.1N("1Q");4.j.1N("1Q","3p")}4.3A=p},3r:8(){4.j.2b("."+4.1m);(C.2h.2o&&4.j.1N("1Q",4.3i))},3f:8(F){(4.1e&&4.1Y(F));4.27=F;c D=4,G=(F.3V==1),E=(2j 4.a.2e=="2D"?C(F.1T).38().13(F.1T).3B(4.a.2e).1F:p);5(!G||E||!4.2M(F)){e q}4.23=!4.a.2g;5(!4.23){4.3J=3X(8(){D.23=q},4.a.2g)}5(4.2z(F)&&4.2y(F)){4.1e=(4.1U(F)!==p);5(!4.1e){F.3N();e q}}4.2C=8(H){e D.3u(H)};4.2n=8(H){e D.1Y(H)};C(i).1x("36."+4.1m,4.2C).1x("3h."+4.1m,4.2n);e p},3u:8(D){5(C.2h.2o&&!D.3O){e 4.1Y(D)}5(4.1e){4.1y(D);e p}5(4.2z(D)&&4.2y(D)){4.1e=(4.1U(4.27,D)!==p);(4.1e?4.1y(D):4.1Y(D))}e!4.1e},1Y:8(D){C(i).2b("36."+4.1m,4.2C).2b("3h."+4.1m,4.2n);5(4.1e){4.1e=p;4.1I(D)}e p},2z:8(D){e(S.2l(S.1b(4.27.1k-D.1k),S.1b(4.27.1i-D.1i))>=4.a.2p)},2y:8(D){e 4.23},1U:8(D){},1y:8(D){},1I:8(D){},2M:8(D){e q}};C.h.2k.1H={2e:3n,2p:1,2g:0}})(31);(8(A){A.1C("h.l",A.1S({},A.h.2k,{2m:8(){c B=4.a;5(B.g=="2q"&&!(/(o|Z|17)/).X(4.j.d("n"))){4.j.d("n","o")}4.j.1V("h-l");(B.1j&&4.j.1V("h-l-1j"));4.3b()},1U:8(F){c H=4.a;5(4.g||H.1j||A(F.1T).4h(".h-4q-26")){e p}c B=!4.a.26||!A(4.a.26,4.j).1F?q:p;A(4.a.26,4.j).4r("*").4s().1h(8(){5(4==F.1T){B=q}});5(!B){e p}5(A.h.1n){A.h.1n.4p=4}4.g=A.39(H.g)?A(H.g.1M(4.j[0],[F])):(H.g=="2O"?4.j.2O():4.j);5(!4.g.38("11").1F){4.g.1v((H.1v=="m"?4.j[0].1D:H.1v))}5(4.g[0]!=4.j[0]&&!(/(17|Z)/).X(4.g.d("n"))){4.g.d("n","Z")}4.Y={7:(r(4.j.d("4o"),10)||0),6:(r(4.j.d("4l"),10)||0)};4.W=4.g.d("n");4.b=4.j.b();4.b={6:4.b.6-4.Y.6,7:4.b.7-4.Y.7};4.b.z={7:F.1k-4.b.7,6:F.1i-4.b.6};4.t=4.g.t();c C=4.t.b();5(4.t[0]==i.11&&A.2h.4m){C={6:0,7:0}}4.b.m={6:C.6+(r(4.t.d("2i"),10)||0),7:C.7+(r(4.t.d("2x"),10)||0)};c E=4.j.n();4.b.o=4.W=="o"?{6:E.6-(r(4.g.d("6"),10)||0)+4.t[0].v,7:E.7-(r(4.g.d("7"),10)||0)+4.t[0].u}:{6:0,7:0};4.1s=4.2B(F);4.V={T:4.g.2P(),w:4.g.2E()};5(H.1g){5(H.1g.7!=1L){4.b.z.7=H.1g.7+4.Y.7}5(H.1g.3g!=1L){4.b.z.7=4.V.T-H.1g.3g+4.Y.7}5(H.1g.6!=1L){4.b.z.6=H.1g.6+4.Y.6}5(H.1g.37!=1L){4.b.z.6=4.V.w-H.1g.37+4.Y.6}}5(H.k){5(H.k=="m"){H.k=4.g[0].1D}5(H.k=="i"||H.k=="1B"){4.k=[0-4.b.o.7-4.b.m.7,0-4.b.o.6-4.b.m.6,A(H.k=="i"?i:1B).T()-4.b.o.7-4.b.m.7-4.V.T-4.Y.7-(r(4.j.d("2X"),10)||0),(A(H.k=="i"?i:1B).w()||i.11.1D.2W)-4.b.o.6-4.b.m.6-4.V.w-4.Y.6-(r(4.j.d("2Z"),10)||0)]}5(!(/^(i|1B|m)$/).X(H.k)){c D=A(H.k)[0];c G=A(H.k).b();4.k=[G.7+(r(A(D).d("2x"),10)||0)-4.b.o.7-4.b.m.7,G.6+(r(A(D).d("2i"),10)||0)-4.b.o.6-4.b.m.6,G.7+S.2l(D.4n,D.2U)-(r(A(D).d("2x"),10)||0)-4.b.o.7-4.b.m.7-4.V.T-4.Y.7-(r(4.j.d("2X"),10)||0),G.6+S.2l(D.2W,D.2S)-(r(A(D).d("2i"),10)||0)-4.b.o.6-4.b.m.6-4.V.w-4.Y.6-(r(4.j.d("2Z"),10)||0)]}}4.1d("1f",F);4.V={T:4.g.2P(),w:4.g.2E()};5(A.h.1n&&!H.32){A.h.1n.4u(4,F)}4.g.1V("h-l-3o");4.1y(F);e q},12:8(C,D){5(!D){D=4.n}c B=C=="Z"?1:-1;e{6:(D.6+4.b.o.6*B+4.b.m.6*B-(4.W=="17"||(4.W=="Z"&&4.t[0]==i.11)?0:4.t[0].v)*B+(4.W=="17"?A(i).v():0)*B+4.Y.6*B),7:(D.7+4.b.o.7*B+4.b.m.7*B-(4.W=="17"||(4.W=="Z"&&4.t[0]==i.11)?0:4.t[0].u)*B+(4.W=="17"?A(i).u():0)*B+4.Y.7*B)}},2B:8(E){c F=4.a;c B={6:(E.1i-4.b.z.6-4.b.o.6-4.b.m.6+(4.W=="17"||(4.W=="Z"&&4.t[0]==i.11)?0:4.t[0].v)-(4.W=="17"?A(i).v():0)),7:(E.1k-4.b.z.7-4.b.o.7-4.b.m.7+(4.W=="17"||(4.W=="Z"&&4.t[0]==i.11)?0:4.t[0].u)-(4.W=="17"?A(i).u():0))};5(!4.1s){e B}5(4.k){5(B.7<4.k[0]){B.7=4.k[0]}5(B.6<4.k[1]){B.6=4.k[1]}5(B.7>4.k[2]){B.7=4.k[2]}5(B.6>4.k[3]){B.6=4.k[3]}}5(F.1c){c D=4.1s.6+S.3j((B.6-4.1s.6)/F.1c[1])*F.1c[1];B.6=4.k?(!(D<4.k[1]||D>4.k[3])?D:(!(D<4.k[1])?D-F.1c[1]:D+F.1c[1])):D;c C=4.1s.7+S.3j((B.7-4.1s.7)/F.1c[0])*F.1c[0];B.7=4.k?(!(C<4.k[0]||C>4.k[2])?C:(!(C<4.k[0])?C-F.1c[0]:C+F.1c[0])):C}e B},1y:8(B){4.n=4.2B(B);4.1t=4.12("Z");4.n=4.1d("1l",B)||4.n;5(!4.a.1O||4.a.1O!="y"){4.g[0].1P.7=4.n.7+"21"}5(!4.a.1O||4.a.1O!="x"){4.g[0].1P.6=4.n.6+"21"}5(A.h.1n){A.h.1n.1l(4,B)}e p},1I:8(C){c D=p;5(A.h.1n&&!4.a.32){c D=A.h.1n.4B(4,C)}5((4.a.1w=="4z"&&!D)||(4.a.1w=="4y"&&D)||4.a.1w===q){c B=4;A(4.g).4v(4.1s,r(4.a.1w,10)||4w,8(){B.1d("1p",C);B.2r()})}1A{4.1d("1p",C);4.2r()}e p},2r:8(){4.g.2s("h-l-3o");5(4.a.g!="2q"&&!4.1X){4.g.1u()}4.g=3n;4.1X=p},1W:{},2t:8(B){e{g:4.g,n:4.n,2I:4.1t,a:4.a}},1d:8(C,B){A.h.19.2f(4,C,[B,4.2t()]);5(C=="1l"){4.1t=4.12("Z")}e 4.j.2J(C=="1l"?C:"1l"+C,[B,4.2t()],4.a[C])},2u:8(){5(!4.j.U("l")){e}4.j.3l("l").2b(".l").2s("h-l");4.3r()}}));A.1S(A.h.l,{1H:{1v:"m",1O:p,2e:":4x",2g:0,2p:1,g:"2q"}});A.h.19.13("l","1q",{1f:8(D,C){c B=A("11");5(B.d("1q")){C.a.2v=B.d("1q")}B.d("1q",C.a.1q)},1p:8(C,B){5(B.a.2v){A("11").d("1q",B.a.2v)}}});A.h.19.13("l","14",{1f:8(D,C){c B=A(C.g);5(B.d("14")){C.a.2w=B.d("14")}B.d("14",C.a.14)},1p:8(C,B){5(B.a.2w){A(B.g).d("14",B.a.2w)}}});A.h.19.13("l","1o",{1f:8(D,C){c B=A(C.g);5(B.d("1o")){C.a.2A=B.d("1o")}B.d("1o",C.a.1o)},1p:8(C,B){5(B.a.2A){A(B.g).d("1o",B.a.2A)}}});A.h.19.13("l","22",{1f:8(C,B){A(B.a.22===q?"4t":B.a.22).1h(8(){A(\'<2c 33="h-l-22" 1P="4k: #46;"></2c>\').d({T:4.2U+"21",w:4.2S+"21",n:"Z",1o:"0.40",14:47}).d(A(4).b()).1v("11")})},1p:8(C,B){A("2c.48").1h(8(){4.1D.3e(4)})}});A.h.19.13("l","1J",{1f:8(D,C){c E=C.a;c B=A(4).U("l");E.18=E.18||20;E.1a=E.1a||20;B.16=8(F){2Y{5(/1G|1J/.X(F.d("29"))||(/1G|1J/).X(F.d("29-y"))){e F}F=F.m()}3q(F[0].1D);e A(i)}(4);B.15=8(F){2Y{5(/1G|1J/.X(F.d("29"))||(/1G|1J/).X(F.d("29-x"))){e F}F=F.m()}3q(F[0].1D);e A(i)}(4);5(B.16[0]!=i&&B.16[0].25!="24"){B.2R=B.16.b()}5(B.15[0]!=i&&B.15[0].25!="24"){B.2T=B.15.b()}},1l:8(D,C){c E=C.a;c B=A(4).U("l");5(B.16[0]!=i&&B.16[0].25!="24"){5((B.2R.6+B.16[0].2S)-D.1i<E.18){B.16[0].v=B.16[0].v+E.1a}5(D.1i-B.2R.6<E.18){B.16[0].v=B.16[0].v-E.1a}}1A{5(D.1i-A(i).v()<E.18){A(i).v(A(i).v()-E.1a)}5(A(1B).w()-(D.1i-A(i).v())<E.18){A(i).v(A(i).v()+E.1a)}}5(B.15[0]!=i&&B.15[0].25!="24"){5((B.2T.7+B.15[0].2U)-D.1k<E.18){B.15[0].u=B.15[0].u+E.1a}5(D.1k-B.2T.7<E.18){B.15[0].u=B.15[0].u-E.1a}}1A{5(D.1k-A(i).u()<E.18){A(i).u(A(i).u()-E.1a)}5(A(1B).T()-(D.1k-A(i).u())<E.18){A(i).u(A(i).u()+E.1a)}}}});A.h.19.13("l","2V",{1f:8(D,C){c B=A(4).U("l");B.1r=[];A(C.a.2V===q?".h-l":C.a.2V).1h(8(){c F=A(4);c E=F.b();5(4!=B.j[0]){B.1r.2F({34:4,T:F.2P(),w:F.2E(),6:E.6,7:E.7})}})},1l:8(J,O){c I=A(4).U("l");c L=O.a.41||20;c D=O.2I.7,C=D+I.V.T,P=O.2I.6,N=P+I.V.w;2H(c H=I.1r.1F-1;H>=0;H--){c E=I.1r[H].7,B=E+I.1r[H].T,R=I.1r[H].6,M=R+I.1r[H].w;5(!((E-L<D&&D<B+L&&R-L<P&&P<M+L)||(E-L<D&&D<B+L&&R-L<N&&N<M+L)||(E-L<C&&C<B+L&&R-L<P&&P<M+L)||(E-L<C&&C<B+L&&R-L<N&&N<M+L))){43}5(O.a.3v!="49"){c K=S.1b(R-N)<=20;c Q=S.1b(M-P)<=20;c G=S.1b(E-C)<=20;c F=S.1b(B-D)<=20;5(K){O.n.6=I.12("o",{6:R-I.V.w,7:0}).6}5(Q){O.n.6=I.12("o",{6:M,7:0}).6}5(G){O.n.7=I.12("o",{6:0,7:E-I.V.T}).7}5(F){O.n.7=I.12("o",{6:0,7:B}).7}}5(O.a.3v!="4a"){c K=S.1b(R-P)<=20;c Q=S.1b(M-N)<=20;c G=S.1b(E-D)<=20;c F=S.1b(B-C)<=20;5(K){O.n.6=I.12("o",{6:R,7:0}).6}5(Q){O.n.6=I.12("o",{6:M-I.V.w,7:0}).6}5(G){O.n.7=I.12("o",{6:0,7:E}).7}5(F){O.n.7=I.12("o",{6:0,7:B-I.V.T}).7}}}}});A.h.19.13("l","3m",{1f:8(D,C){c B=A(4).U("l");B.2d=[];A(C.a.3m).1h(8(){5(A.U(4,"2N")){c E=A.U(4,"2N");B.2d.2F({f:E,3s:E.a.1w});E.4c();E.1d("4d",D,B)}})},1p:8(D,C){c B=A(4).U("l");A.1h(B.2d,8(){5(4.f.1z){4.f.1z=0;B.1X=q;4.f.1X=p;5(4.3s){4.f.a.1w=q}4.f.1I(D);4.f.j.2J("4j",[D,A.1S(4.f.h(),{4i:B.j})],4.f.a.4g);4.f.a.g=4.f.a.2L}1A{4.f.1d("42",D,B)}})},1l:8(F,E){c D=A(4).U("l"),B=4;c C=8(K){c H=K.7,J=H+K.T,I=K.6,G=I+K.w;e(H<(4.1t.7+4.b.z.7)&&(4.1t.7+4.b.z.7)<J&&I<(4.1t.6+4.b.z.6)&&(4.1t.6+4.b.z.6)<G)};A.1h(D.2d,8(G){5(C.2f(D,4.f.4A)){5(!4.f.1z){4.f.1z=1;4.f.2a=A(B).2O().1v(4.f.j).U("2N-34",q);4.f.a.2L=4.f.a.g;4.f.a.g=8(){e E.g[0]};F.1T=4.f.2a[0];4.f.2M(F,q);4.f.1U(F,q,q);4.f.b.z.6=D.b.z.6;4.f.b.z.7=D.b.z.7;4.f.b.m.7-=D.b.m.7-4.f.b.m.7;4.f.b.m.6-=D.b.m.6-4.f.b.m.6;D.1d("45",F)}5(4.f.2a){4.f.1y(F)}}1A{5(4.f.1z){4.f.1z=0;4.f.1X=q;4.f.a.1w=p;4.f.1I(F,q);4.f.a.g=4.f.a.2L;4.f.2a.1u();5(4.f.3d){4.f.3d.1u()}D.1d("44",F)}}})}});A.h.19.13("l","1E",{1f:8(D,B){c C=A.4b(A(B.a.1E.4e)).4f(8(F,E){e(r(A(F).d("14"),10)||B.a.1E.28)-(r(A(E).d("14"),10)||B.a.1E.28)});A(C).1h(8(E){4.1P.14=B.a.1E.28+E});4[0].1P.14=B.a.1E.28+C.1F}})})(31);',62,286,'||||this|if|top|left|function||options|offset|var|css|return|instance|helper|ui|document|element|containment|draggable|parent|position|relative|false|true|parseInt||offsetParent|scrollLeft|scrollTop|height|||click|||||||||||||||||||Math|width|data|helperProportions|cssPosition|test|margins|absolute||body|convertPositionTo|add|zIndex|overflowX|overflowY|fixed|scrollSensitivity|plugin|scrollSpeed|abs|grid|propagate|_mouseStarted|start|cursorAt|each|pageY|disabled|pageX|drag|widgetName|ddmanager|opacity|stop|cursor|snapElements|originalPosition|positionAbs|remove|appendTo|revert|bind|mouseDrag|isOver|else|window|widget|parentNode|stack|length|auto|defaults|mouseStop|scroll|prototype|undefined|apply|attr|axis|style|unselectable|setData|extend|target|mouseStart|addClass|plugins|cancelHelperRemoval|mouseUp|cssCache||px|iframeFix|_mouseDelayMet|HTML|tagName|handle|_mouseDownEvent|min|overflow|currentItem|unbind|div|sortables|cancel|call|delay|browser|borderTopWidth|typeof|mouse|max|init|_mouseUpDelegate|msie|distance|original|clear|removeClass|uiHash|destroy|_cursor|_zIndex|borderLeftWidth|mouseDelayMet|mouseDistanceMet|_opacity|generatePosition|_mouseMoveDelegate|string|outerHeight|push|getData|for|absolutePosition|triggerHandler|split|_helper|mouseCapture|sortable|clone|outerWidth|fn|overflowYOffset|offsetHeight|overflowXOffset|offsetWidth|snap|scrollHeight|marginRight|do|marginBottom|MozUserSelect|jQuery|dropBehaviour|class|item|none|mousemove|bottom|parents|isFunction|5000px|mouseInit|get|placeholder|removeChild|mouseDown|right|mouseup|_mouseUnselectable|round|arguments|removeData|connectToSortable|null|dragging|on|while|mouseDestroy|shouldRevert|widgetBaseClass|mouseMove|snapMode|try|mousedown|backgroundColor|rgba|started|filter|gen|in|display|block|transparent|backgroundImage|default|_mouseDelayTimer|new|hasScroll|Array|preventDefault|button|inArray|getter|off|enableSelection|catch|enable|which|slice|setTimeout|disableSelection|disable|001|snapTolerance|deactivate|continue|fromSortable|toSortable|fff|1000|DragDropIframeFix|inner|outer|makeArray|refreshItems|activate|group|sort|receive|is|sender|sortreceive|background|marginTop|mozilla|scrollWidth|marginLeft|current|resizable|find|andSelf|iframe|prepareOffsets|animate|500|input|valid|invalid|containerCache|drop'.split('|'),0,{}))
var timeout = 500; var closetimer = 0; var ddmenuitem = 0; function jsddm_open(){ jsddm_canceltimer(); jsddm_close(); ddmenuitem = $(this).find('ul').css('visibility', 'visible');}
function jsddm_close(){ if(ddmenuitem) ddmenuitem.css('visibility', 'hidden');}
function jsddm_timer(){ closetimer = window.setTimeout(jsddm_close, timeout);}
function jsddm_canceltimer(){ if(closetimer){ window.clearTimeout(closetimer); closetimer = null;}
}
$(document).ready(function(){ $('#jsddm > li').bind('mouseover', jsddm_open)
$('#jsddm > li').bind('mouseout', jsddm_timer)
}); document.onclick = jsddm_close; ;(function($){var l=location.href.replace(/#.*/,'');var g=$.localScroll=function(a){$('body').localScroll(a)};g.defaults={duration:1e3,axis:'y',event:'click',stop:true,target:window,reset:true};g.hash=function(a){if(location.hash){a=$.extend({},g.defaults,a);a.hash=false;if(a.reset){var e=a.duration;delete a.duration;$(a.target).scrollTo(0,a);a.duration=e}i(0,location,a)}};$.fn.localScroll=function(b){b=$.extend({},g.defaults,b);return b.lazy?this.bind(b.event,function(a){var e=$([a.target,a.target.parentNode]).filter(d)[0];if(e)i(a,e,b)}):this.find('a,area').filter(d).bind(b.event,function(a){i(a,this,b)}).end().end();function d(){return!!this.href&&!!this.hash&&this.href.replace(this.hash,'')==l&&(!b.filter||$(this).is(b.filter))}};function i(a,e,b){var d=e.hash.slice(1),f=document.getElementById(d)||document.getElementsByName(d)[0];if(!f)return;if(a)a.preventDefault();var h=$(b.target);if(b.lock&&h.is(':animated')||b.onBefore&&b.onBefore.call(b,a,f,h)===false)return;if(b.stop)h.stop(true);if(b.hash){var j=f.id==d?'id':'name',k=$('<a> </a>').attr(j,d).css({position:'absolute',top:$(window).scrollTop(),left:$(window).scrollLeft()});f[j]='';$('body').prepend(k);location=e.hash;k.remove();f[j]=d}h.scrollTo(f,b).trigger('notify.serialScroll',[f])}})(jQuery); ;(function($){var m=$.scrollTo=function(b,h,f){$(window).scrollTo(b,h,f)};m.defaults={axis:'xy',duration:parseFloat($.fn.jquery)>=1.3?0:1};m.window=function(b){return $(window).scrollable()};$.fn.scrollable=function(){return this.map(function(){var b=this,h=!b.nodeName||$.inArray(b.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!h)return b;var f=(b.contentWindow||b).document||b.ownerDocument||b;return $.browser.safari||f.compatMode=='BackCompat'?f.body:f.documentElement})};$.fn.scrollTo=function(l,j,a){if(typeof j=='object'){a=j;j=0}if(typeof a=='function')a={onAfter:a};if(l=='max')l=9e9;a=$.extend({},m.defaults,a);j=j||a.speed||a.duration;a.queue=a.queue&&a.axis.length>1;if(a.queue)j/=2;a.offset=n(a.offset);a.over=n(a.over);return this.scrollable().each(function(){var k=this,o=$(k),d=l,p,g={},q=o.is('html,body');switch(typeof d){case'number':case'string':if(/^([+-]=)?\d+(\.\d+)?(px)?$/.test(d)){d=n(d);break}d=$(d,this);case'object':if(d.is||d.style)p=(d=$(d)).offset()}$.each(a.axis.split(''),function(b,h){var f=h=='x'?'Left':'Top',i=f.toLowerCase(),c='scroll'+f,r=k[c],s=h=='x'?'Width':'Height';if(p){g[c]=p[i]+(q?0:r-o.offset()[i]);if(a.margin){g[c]-=parseInt(d.css('margin'+f))||0;g[c]-=parseInt(d.css('border'+f+'Width'))||0}g[c]+=a.offset[i]||0;if(a.over[i])g[c]+=d[s.toLowerCase()]()*a.over[i]}else g[c]=d[i];if(/^\d+$/.test(g[c]))g[c]=g[c]<=0?0:Math.min(g[c],u(s));if(!b&&a.queue){if(r!=g[c])t(a.onAfterFirst);delete g[c]}});t(a.onAfter);function t(b){o.animate(g,j,a.easing,b&&function(){b.call(this,l,a)})};function u(b){var h='scroll'+b;if(!q)return k[h];var f='client'+b,i=k.ownerDocument.documentElement,c=k.ownerDocument.body;return Math.max(i[h],c[h])-Math.min(i[f],c[f])}}).end()};function n(b){return typeof b=='object'?b:{top:b,left:b}}})(jQuery); ;(function($) { $.ifixpng = function(customPixel) { $.ifixpng.pixel = customPixel;}; $.ifixpng.regexp = { bg: /^url\(["']?(.*\.png([?].*)?)["']?\)$/i,
		img: /.*\.png([?].*)?$/i
	},
	
	$.ifixpng.getPixel = function() {
		return $.ifixpng.pixel || '/images/pixel.gif';
	};
	
	var hack = {
		base	: $('base').attr('href'),
		ltie7	: $.browser.msie && $.browser.version < 7,
		filter	: function(src) {
			return "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,sizingMethod=crop,src='"+src+"')";
		}
	};
	
	/**
	 * Applies ie png hack to selected dom elements
	 *
	 * $('img[@src$=.png]').ifixpng();
	 * @desc apply hack to all images with png extensions
	 *
	 * $('#panel, img[@src$=.png]').ifixpng();
	 * @desc apply hack to element #panel and all images with png extensions
	 *
	 * @name ifixpng
	 */
	 
	$.fn.ifixpng = hack.ltie7 ? function() {
		function fixImage(image, source, width, height, hidden) {
			image.css({filter:hack.filter(source), width: width, height: height})
			  .attr({src:$.ifixpng.getPixel()})
			  .positionFix();
		}
		
    	return this.each(function() {
			var $$ = $(this);
			if ($$.is('img') || $$.is('input')) { // hack image tags present in dom
				var source, img;
				if (this.src && this.src.match($.ifixpng.regexp.img)) { // make sure it is png image
					// use source tag value if set 
					source = (hack.base && this.src.substring(0,1)!='/' && this.src.indexOf(hack.base) === -1) ? hack.base + this.src : this.src;
					// If the width is not set, we have a problem; the image is not probably visible or not loaded
					// and we need a work around.
					if (!this.width || !this.height) {
						$(new Image()).one('load', function() {
							fixImage($$, source, this.width, this.height);
							$(this).remove();
						}).attr('src', source);
					// If the image already has dimensions (it's loaded and visible) we can fix it straight away.
} else fixImage($$, source, this.width, this.height);}
} else if (this.style) { var imageSrc = $$.css('backgroundImage'); if (imageSrc && imageSrc.match($.ifixpng.regexp.bg) && this.currentStyle.backgroundRepeat == 'no-repeat') { imageSrc = RegExp.$1; var x = this.currentStyle.backgroundPositionX || 0, y = this.currentStyle.backgroundPositionY || 0; if (x || y) { var css = {}, img; if (typeof x != 'undefined') { if (x == 'left') css.left = 0; else if (x == 'right') css.right = $$.width() % 2 === 1 ? -1 : 0; else css.left = x;}
if (typeof y != 'undefined') { if (y == 'bottom') css.bottom = $$.height() % 2 === 1 ? -1 : 0; else if (y == 'top') css.top = 0; else css.top = y;}
img = new Image(); $(img).one('load', function() { var x,y, expr = {}, prop; if (/center|%/.test(css.top)) { expr.top = "(this.parentNode.offsetHeight - this.offsetHeight) * " + (css.top == 'center' ? 0.5 : (parseInt(css.top) / 100)); delete css.top;}
if (/center|%/.test(css.left)) { expr.left = "(this.parentNode.offsetWidth - this.offsetWidth) * " + (css.left == 'center' ? 0.5 : (parseInt(css.left) / 100)); delete css.left;}
$$.positionFix().css({backgroundImage: 'none'}).prepend( $('<div></div>').css(css).css({ width: this.width, height: this.height, position: 'absolute', filter: hack.filter(imageSrc)
}) ); if (expr.top || expr.left) { var elem = $$.children(':first')[0]; for (prop in expr) elem.style.setExpression(prop, expr[prop], 'JavaScript');}
$(this).remove();}); img.src = imageSrc;} else { $$.css({backgroundImage: 'none', filter:hack.filter(imageSrc)});}
}
}
});} : function() { return this;}; $.fn.positionFix = function() { return this.each(function() { var $$ = $(this); if ($$.css('position') != 'absolute') $$.css({position:'relative'});});};})(jQuery);function changez(id) { if(id=="vm18"){ identity=document.getElementById("scans_warning"); if(identity.className == 'hide'){identity.className='show';}
else{identity.className='hide';}
identity=document.getElementById("scans_contents"); if(identity.className == 'hide'){identity.className='show';}
else{identity.className='hide';}
}else if(id=="vm18_stream"){ identity=document.getElementById("streaming_vm18_warning"); if(identity.className == 'hide'){identity.className='show';}
else{identity.className='hide';}
identity=document.getElementById("streaming_vm18_video"); if(identity.className == 'hide'){identity.className='show';}
else{identity.className='hide';}
}else if(id=="recensione"){ identity=document.getElementById(id); if(identity.className == 'hide'){identity.className='show';}
}else{ identity=document.getElementById(id); if(identity.className == 'hide'){identity.className='show';}
else{identity.className='hide';}
}
}
function logout(){ jConfirm('Sei sicuro di volerti disconnettere?', 'Jigoku.it - Logout', function(r) { if(r==true) location.href = "/logout.php"; else return false;});}
function checkLogin(){ if(document.dati.username.value==""){ jAlert("Inserisci il tuo Username!", 'Attenzione!'); document.dati.username.focus(); return false;}
if(document.dati.password.value==""){ jAlert("Inserisci la tua Password!", 'Attenzione!'); document.dati.password.focus(); return false;}
return true;}
function checkTicketReply(){ if(document.dati.Descrizione.value.length < 6){ jAlert("Il messaggio deve essere di almeno 6 caratteri", 'Attenzione!'); document.dati.Descrizione.focus(); return false;}
return true;}
var fullscreen=0; function streaming_enlarge(){ func=document.getElementById('streaming_functions'); if(fullscreen==0){ document.getElementById('streaming_data').style.display = "none"; document.getElementById('streaming_links').style.display = "none"; document.getElementById('streaming_news').style.display = "none"; document.getElementById('footer').style.display = "none"; document.getElementById('streaming_player').className = "videoBig"; func.innerHTML =func.innerHTML.replace('fullscreen', 'nofullscreen'); func.innerHTML =func.innerHTML.replace('Grande', 'Piccolo'); var vid=document.getElementById('track'); document.getElementById('oplayer').className=document.getElementById('eplayer').className='embedBig'; fullscreen=1;}else{ document.getElementById('streaming_data').style.display = ""; document.getElementById('streaming_links').style.display = ""; document.getElementById('streaming_news').style.display = ""; document.getElementById('footer').style.display = ""; document.getElementById('streaming_player').className = "video"; func.innerHTML =func.innerHTML.replace('nofullscreen', 'fullscreen'); func.innerHTML =func.innerHTML.replace('Piccolo', 'Grande'); document.getElementById('oplayer').className=document.getElementById('eplayer').className='embedSmall'; document.getElementById('opera_refreshCurtain').style.display = "";timeOut1=setTimeout("operaRefresh()",1); fullscreen=0;}
}
function operaRefresh(){ document.getElementById('opera_refreshCurtain').style.display = "none";}
function opacity(id, opacStart, opacEnd, millisec) { var speed = Math.round(millisec / 100); var timer = 0; if(opacStart > opacEnd) { for(i = opacStart; i >= opacEnd; i--) { setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed)); timer++;}
} else if(opacStart < opacEnd) { for(i = opacStart; i <= opacEnd; i++)
{ setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed)); timer++;}
}
}
function changeOpac(opacity, id) { var object = document.getElementById(id).style; object.opacity = (opacity / 100); object.MozOpacity = (opacity / 100); object.KhtmlOpacity = (opacity / 100); object.filter = "alpha(opacity=" + opacity + ")";}
function checkTopSearch(){ if(document.ricerca.top_search_input.value.length < 3){ jAlert("La chiave di ricerca deve essere di almeno 3 caratteri.", 'Attenzione!'); document.ricerca.top_search_input.focus(); return false;}
return true;}
function searchAll(){ if(document.ricerca.search_all.checked){ document.ricerca.search_anime.checked=document.ricerca.search_manga.checked=document.ricerca.search_news.checked=false;}return true;}
function searchOne(){ document.ricerca.search_all.checked=false; return true;}
var closetimer2 = 0; function show(id) { canceltimer(); $("#"+id).slideDown("normal");}
function canceltimer(){ if(closetimer2){ window.clearTimeout(closetimer2); closetimer2 = null;}
}
function timer(id){ closetimer2 = window.setTimeout( function () {hide(id);}, 500);}
function hide(id) { $("#"+id).slideUp("normal");}
function youtubePopup(id,titolo,wi,he) { var w = wi; var h = he; var l = Math.floor((screen.width-w)/2); var t = Math.floor((screen.height-h)/2); window.open("/youtube.php?id=" + id +"&titolo="+titolo,"","width=" + w + ",height=" + h + ",top=" + t + ",left=" + l +",location=no,resizable");}
