if(!Array.indexOf){Array.prototype.indexOf=function(obj){for(var i=0;i<this.length;i++){if(this[i]==obj){return i;}}
return-1;}}
if(!String.trim){String.prototype.trim=function(){return this.replace(/^\s*/,"").replace(/\s*$/,"");}}
var ff=(function(){var loaded_css=undefined;var plugins=undefined;var plugins_loads=undefined;var plugins_inits=undefined;function pluginInit(id){var inits;if((inits=plugins_inits.get(id))!==undefined){for(var i=0;i<inits.length;i++){inits[i]();}
plugins_inits.set(id,[]);}}
function initEvents(key){var parts=key.split(".");if(parts.length>1&&parts[0]=="ff"){var path="ff";for(var i=1;i<parts.length;i++){path+="."+parts[i];if(eval(path+' === undefined'))
eval(path+" = {};");if(eval('typeof('+path+')')==="object"&&eval(path+".events === undefined"))
eval('jQuery.extend(true, '+path+', ff.ffEvents());');}}}
var that={"site_path":undefined,"theme":undefined,"language":undefined,"layer":undefined,"phpsession":{"name":undefined,"value":undefined},"struct":undefined,"initFF":function(params){that.site_path=params.site_path;that.theme=params.theme;if(params.site_path.length>0&&params.site_path!='/'){that.page_path=window.location.pathname.substr(params.site_path.length);}else{that.page_path=window.location.pathname;}
that.domain=window.location.hostname;that.language=params.language;that.layer=params.layer;that.phpsession.name=params.phpsession.name;that.phpsession.value=params.phpsession.value;that.struct=params.struct;that.js_path=that.site_path+'/themes/'+that.theme+'/javascript';that.pluginLoad("ff.ffEvent",that.site_path+"/themes/library/ff/ffEvent.js",undefined,false);that.pluginLoad("ff.ffEvents",that.site_path+"/themes/library/ff/ffEvents.js",undefined,false);if(params.libs!==undefined)
params.libs.each(function(key,value){that.pluginLoad(key,that.site_path+value,undefined,false);});},"extend":function(object){jQuery.extend(true,ff,object);},"pluginLoad":function(id,source,callback,async){if(callback!==undefined)
that.pluginAddInitLoad(id,callback);if(plugins.isset(id)===undefined){plugins.set(id,false);var objFF=id.split(".");var strFF='';var objFF_is_loaded=true;for(var x=0;x<objFF.length;x++)
{if(strFF==''){strFF=objFF[x];if(strFF=='jquery'){strFF='jQuery';}
strFF='window'+'["'+strFF+'"]';}else{strFF=strFF+'["'+objFF[x]+'"]';}
try{if(eval(strFF)===undefined){objFF_is_loaded=false;break;}}catch(error){objFF_is_loaded=false;break;}}
if(objFF_is_loaded){if(id==="ff.ffEvents")
ff.extend(that.ffEvents());ff.pluginInitLoad(id);}else{if(ff.site_path!==undefined&&ff.site_path.length>0&&source.indexOf("/")==0&&source.indexOf(ff.site_path)!=0)
source=ff.site_path+source;jQuery.ajax({"async":async,"url":source,"dataType":"script","success":function(data){if(id==="ff.ffEvents")
ff.extend(that.ffEvents());jQuery(document).append('<script type="text/javascript">ff.pluginInitLoad("'+id+'");</script>');}});}}},"pluginAddInitLoad":function(id,callback){if(plugins.get(id)!==true){if(plugins_loads.isset(id)===undefined)
plugins_loads.set(id,[]);plugins_loads.get(id).push(callback);}else
callback();},"pluginInitLoad":function(id){if(id!=="ff.ffEvent"&&id!=="ff.ffEvents")
initEvents(id);var loads;if((loads=plugins_loads.get(id))!==undefined){for(var i=0;i<loads.length;i++){loads[i]();}
plugins_loads.set(id,[]);}
pluginInit(id);plugins.set(id,true);},"pluginAddInit":function(id,callback){if(plugins.get(id)!==true){if(plugins_inits.isset(id)===undefined)
plugins_inits.set(id,[]);plugins_inits.get(id).push(callback);}else
callback();},"CSSload":function(link,callback){var cssLoaded=false;try{if(link.sheet&&link.sheet.cssRules.length>0){cssLoaded=true;}else if(link.styleSheet&&link.styleSheet.cssText.length>0){cssLoaded=true;}else if(link.innerHTML&&link.innerHTML.length>0){cssLoaded=true;}}
catch(ex){}
if(cssLoaded){if(callback!==undefined)
callback();}else{setTimeout(function(){ff.CSSload(link,callback);},10);}},"injectCSS":function(id,source,callback){if(loaded_css.get(id)!==true){loaded_css.set(id,true);if(ff.site_path!==undefined&&ff.site_path.length>0&&source.indexOf("/")==0&&source.indexOf(ff.site_path)!=0)
source=ff.site_path+source;if('\v'=='v'){var css=document.createStyleSheet(source);if(callback!==undefined)
callback();}else{var css=jQuery('<link rel="stylesheet" href="'+source+'"/>');jQuery('head').append(css);ff.CSSload(css.get(0),callback);}}else{if(callback!==undefined)
callback();}},"addLoadEvent":function(func){var oldonload=window.onload;if(typeof window.onload!='function'){window.onload=func;}else{window.onload=function(){if(oldonload){oldonload();}
func();}}},"submitProcessKey":function(e,button){if(null==e)
e=window.event;if(e.keyCode==13){document.getElementById(button).click();return false;}},"clearComponent":function(component){if(ff.struct.get(component)!==undefined){if(ff.struct.get(component).type=="ffGrid")
try{ff.ffPageNavigator.deleteNavigator(component);}catch(e){};ff.struct.get(component).fields.each(function(key,field){ff.doEvent({"event_name":"onClearField","event_params":[component,key,field]});});ff.struct.unset(component);}},"utf8":{"encode":function(s){return unescape(encodeURIComponent(s));},"decode":function(s){return decodeURIComponent(escape(s));}},"hash":function(){var that={"keys":[],"values":[],"length":0,"set":function(key,value){var index=that.keys.indexOf(key);if(index>-1){that.values[index]=value;return index;}else{that.keys.push(key);that.values.push(value);that.length++;return that.length-1;}},"get":function(key){var index=that.keys.indexOf(key);if(index>-1)
return that.values[index];else
return undefined;},"indexget":function(index){if(index>0&&index<that.length)
return that.values[index];else
return undefined;},"isset":function(key){var index=that.keys.indexOf(key);if(index>-1)
return index;else
return undefined;},"find":function(value,offset){var index=that.values.indexOf.apply(that.values,arguments);if(index>-1){return{"index":index,"key":that.keys[index]};}else{return undefined;}},"keyfind":function(value,key){var index;if(key===undefined)
index=that.values.indexOf(value);else{index=that.keys.indexOf(key);if(index>-1)
index=that.values.indexOf(value,index);else
return undefined;}
if(index>-1){return{"index":index,"key":that.keys[index]};}else{return undefined;}},"unset":function(key){var index=that.keys.indexOf(key);if(index>-1){that.keys.splice(index,1);that.values.splice(index,1);that.length--;return that.length;}else{return undefined;}},"indexunset":function(index){if(index>0&&index<that.length)
return undefined;else{that.keys.splice(index,1);that.values.splice(index,1);that.length--;return that.length;}},"each":function(func){var tmp_keys=that.keys.slice();var tmp_values=that.values.slice();var l=tmp_keys.length;for(var i=0;i<l;i++){func(tmp_keys[i],tmp_values[i],i);}
return l;},"clear":function(){that.keys.length=0;that.values.length=0;that.length=0;}};return that;}};loaded_css=that.hash();plugins=that.hash();plugins_loads=that.hash();plugins_inits=that.hash();return that;})();ff.ffEvent=(function(){var that={"BREAK_NEVER":0,"BREAK_EQUAL":1,"BREAK_NOT_EQUAL":2,"BREAK_CALLBACK":3,"BREAK_DEFAULT":0,"PRIORITY_TOPLEVEL":0,"PRIORITY_HIGH":1,"PRIORITY_NORMAL":2,"PRIORITY_LOW":3,"PRIORITY_FINAL":4,"PRIORITY_DEFAULT":2,"factory":function(params){var instance={"func_name":params.func_name||console.log("unnamed event"),"break_when":params.break_when,"break_value":params.break_value,"additional_data":params.additional_data||[],"checkBreak":function(result){switch(that.break_when){case ff.ffEvent.BREAK_CALLBACK:return that.break_value.apply(this,result);case ff.ffEvent.BREAK_EQUAL:if(result===that.break_value)
return true;break;case ff.ffEvent.BREAK_NOT_EQUAL:if(result!==that.break_value)
return true;break;}
return false;}};return instance;},"getLast":function(results){if(results.length>0)
return results[results.length];else
return undefined;}};return that;})();ff.ffEvents=function(){var that={events:ff.hash(),"addEvent":function(params){var event_name=params.event_name||console.log("event_name required");var func_name=params.func_name||console.log("func_name required");var priority=params.priority===undefined?ff.ffEvent.PRIORITY_DEFAULT:params.priority;var break_when=params.break_when;var break_value=params.break_value;var additional_data=params.additional_data||[];var event=ff.ffEvent.factory({"func_name":func_name,"break_when":break_when,"break_value":break_value,"additional_data":additional_data});if(that.events.isset(event_name)===undefined)
that.events.set(event_name,ff.hash());switch(priority){case ff.ffEvent.PRIORITY_TOPLEVEL:if(that.events.get(event_name).get("toplevel")!==undefined)
console.log("A toplevel event already exists");else
that.events.get(event_name).set("toplevel",event);break;case ff.ffEvent.PRIORITY_FINAL:if(that.events.isset(event_name).get("final")!==undefined)
console.log("A final event already exists");else
that.events.get(event_name).set("final",event);break;default:var queue=that.events.get(event_name).get(priority);if(queue===undefined)
queue=[];queue.push(event);that.events.get(event_name).set(priority,queue);break;}},"doEvent":function(params){var event_name=params.event_name||console.log("event_name required");var event_params=params.event_params||[];var results=[];var tmp_queue=that.events.get(event_name);var event;var tmp_args;if(tmp_queue!==undefined){if(tmp_queue.isset("toplevel")!==undefined){event=tmp_queue.get("toplevel");tmp_args=event_params.slice().concat(event.additional_data.slice());tmp_args.push(undefined);results.push(event.func_name.apply(event,tmp_args));if(event.checkBreak(results[results.length-1]))
return results;}
for(var q=ff.ffEvent.PRIORITY_TOPLEVEL+1;q<ff.ffEvent.PRIORITY_FINAL;q++){if(undefined!==(event=tmp_queue.get(q))){for(var e=0;e<event.length;e++){tmp_args=event_params.slice().concat(event[e].additional_data.slice());tmp_args.push(results[results.length-1]);results.push(event[e].func_name.apply(event[e],tmp_args));if(event[e].checkBreak(results[results.length-1]))
return results;}}}
if(tmp_queue.isset("final")!==undefined){event=tmp_queue.get("final");tmp_args=event_params.slice().concat(event.additional_data.slice());tmp_args.push(results[results.length-1]);results.push(event.func_name.apply(event,tmp_args));if(event.checkBreak(results[results.length-1]))
return results;}}
return results;}};return that;};ff.ffPage=(function(){var that={};return that;})();var jsFuncObserve=new Object();jsFuncObserve.init=function(targetid,reload){if(!reload){for(var func in jsFuncObserve){if(func!="init"&&func!="exec"&&func!="loadContent"&&jQuery.isFunction(eval("jsFuncObserve."+func))){jsFuncObserve.exec(func,targetid);}}}else{setTimeout("jsFuncObserve.init('"+targetid+"', false)",400);}};jsFuncObserve.exec=function(func,targetid){eval("jsFuncObserve."+func+"('"+targetid+"')");};if(navigator.userAgent.indexOf('MSIE 6')>-1){ff.pluginLoad("jquery.pngfix","/themes/library/plugins/jquery.pngfix/jquery.pngfix.js",undefined,true);ff.pluginLoad("jquery.pngfix.observe","/themes/library/plugins/jquery.pngfix/jquery.pngfix.observe.js",undefined,true);}
jsFuncObserve.loadContent=function(){jQuery('INPUT.ajaxcontent[type=hidden]').each(function(){var link=jQuery(this).attr("value");var elem=jQuery(this);jQuery.ajax({async:true,type:"GET",url:link.substring(0,link.indexOf("?")),data:link.substring(link.indexOf("?")+1),cache:true,success:function(item){if(typeof jQuery!=undefined){item_id=jQuery(item).closest("div").attr("id");if(item_id=="#")
item_id="";if(item_id!=undefined&&item_id.length){jsFuncObserve.init("#"+item_id,true);}else{jsFuncObserve.init("",true);}
jQuery(elem).after(item);jQuery(elem).next().hide();jQuery(elem).next().fadeIn();jQuery(elem).remove();}}});});}
jQuery(function(){setTimeout("jsFuncObserve.loadContent()",100);jsFuncObserve.init("",false);});;(function($){$.extend($.fn,{rightClick:function(handler){$(this).each(function(){$(this).mousedown(function(e){var evt=e;$(this).mouseup(function(){$(this).unbind('mouseup');if(evt.button==2){handler.call($(this),evt);return false;}else{return true;}});});$(this)[0].oncontextmenu=function(){return false;}});return $(this);},rightMouseDown:function(handler){$(this).each(function(){$(this).mousedown(function(e){if(e.button==2){handler.call($(this),e);return false;}else{return true;}});$(this)[0].oncontextmenu=function(){return false;}});return $(this);},rightMouseUp:function(handler){$(this).each(function(){$(this).mouseup(function(e){if(e.button==2){handler.call($(this),e);return false;}else{return true;}});$(this)[0].oncontextmenu=function(){return false;}});return $(this);},noContext:function(){$(this).each(function(){$(this)[0].oncontextmenu=function(){return false;}});return $(this);}});})(jQuery);;(function($){var $cluetip,$cluetipInner,$cluetipOuter,$cluetipTitle,$cluetipArrows,$dropShadow,imgCount;$.fn.cluetip=function(js,options){if(typeof js=='object'){options=js;js=null;}return this.each(function(index){var $this=$(this);var opts=$.extend(true,{},$.fn.cluetip.defaults,options||{},$.metadata?$this.metadata():$.meta?$this.data():{});var cluetipContents=false;var cluezIndex=parseInt(opts.cluezIndex,10)-1;var isActive=false,closeOnDelay=0;if(!$('#cluetip').length){$cluetipInner=$('<div id="cluetip-inner"></div>');$cluetipTitle=$('<h3 id="cluetip-title"></h3>');$cluetipOuter=$('<div id="cluetip-outer"></div>').append($cluetipInner).prepend($cluetipTitle);$cluetip=$('<div id="cluetip"></div>').css({zIndex:opts.cluezIndex}).append($cluetipOuter).append('<div id="cluetip-extra"></div>')[insertionType](insertionElement).hide();$('<div id="cluetip-waitimage"></div>').css({position:'absolute',zIndex:cluezIndex-1}).insertBefore('#cluetip').hide();$cluetip.css({position:'absolute',zIndex:cluezIndex});$cluetipOuter.css({position:'relative',zIndex:cluezIndex+1});$cluetipArrows=$('<div id="cluetip-arrows" class="cluetip-arrows"></div>').css({zIndex:cluezIndex+1}).appendTo('#cluetip');}var dropShadowSteps=(opts.dropShadow)?+opts.dropShadowSteps:0;if(!$dropShadow){$dropShadow=$([]);for(var i=0;i<dropShadowSteps;i++){$dropShadow=$dropShadow.add($('<div></div>').css({zIndex:cluezIndex-i-1,opacity:.1,top:1+i,left:1+i}));};$dropShadow.css({position:'absolute',backgroundColor:'#000'}).prependTo($cluetip);}var tipAttribute=$this.attr(opts.attribute),ctClass=opts.cluetipClass;if(!tipAttribute&&!opts.splitTitle&&!js)return true;if(opts.local&&opts.localPrefix){tipAttribute=opts.localPrefix+tipAttribute;}if(opts.local&&opts.hideLocal){$(tipAttribute+':first').hide();}var tOffset=parseInt(opts.topOffset,10),lOffset=parseInt(opts.leftOffset,10);var tipHeight,wHeight;var defHeight=isNaN(parseInt(opts.height,10))?'auto':(/\D/g).test(opts.height)?opts.height:opts.height+'px';var sTop,linkTop,posY,tipY,mouseY,baseline;var tipInnerWidth=isNaN(parseInt(opts.width,10))?275:parseInt(opts.width,10);var tipWidth=tipInnerWidth+(parseInt($cluetip.css('paddingLeft'),10)||0)+(parseInt($cluetip.css('paddingRight'),10)||0)+dropShadowSteps;var linkWidth=this.offsetWidth;var linkLeft,posX,tipX,mouseX,winWidth;var tipParts;var tipTitle=(opts.attribute!='title')?$this.attr(opts.titleAttribute):'';if(opts.splitTitle){if(tipTitle==undefined){tipTitle='';}tipParts=tipTitle.split(opts.splitTitle);tipTitle=tipParts.shift();}if(opts.escapeTitle){tipTitle=tipTitle.replace(/&/g,'&amp;').replace(/>/g,'&gt;').replace(/</g,'&lt;');}var localContent;var activate=function(event){if(!opts.onActivate($this)){return false;}isActive=true;$dropShadow.hide();$cluetip.removeClass().css({width:tipInnerWidth});if(tipAttribute==$this.attr('href')){$this.css('cursor',opts.cursor);}$this.attr('title','');if(opts.hoverClass){$this.addClass(opts.hoverClass);}linkTop=posY=$this.offset().top;linkLeft=$this.offset().left;mouseX=event.pageX;mouseY=event.pageY;if($this[0].tagName.toLowerCase()!='area'){sTop=$(document).scrollTop();winWidth=$(window).width();}if(opts.positionBy=='fixed'){posX=linkWidth+linkLeft+lOffset;$cluetip.css({left:posX});}else{posX=(linkWidth>linkLeft&&linkLeft>tipWidth)||linkLeft+linkWidth+tipWidth+lOffset>winWidth?linkLeft-tipWidth-lOffset:linkWidth+linkLeft+lOffset;if($this[0].tagName.toLowerCase()=='area'||opts.positionBy=='mouse'||linkWidth+tipWidth>winWidth){if(mouseX+20+tipWidth>winWidth){$cluetip.addClass(' cluetip-'+ctClass);posX=(mouseX-tipWidth-lOffset)>=0?mouseX-tipWidth-lOffset-parseInt($cluetip.css('marginLeft'),10)+parseInt($cluetipInner.css('marginRight'),10):mouseX-(tipWidth/2);}else{posX=mouseX+lOffset;}}var pY=posX<0?event.pageY+tOffset:event.pageY;$cluetip.css({left:(posX>0&&opts.positionBy!='bottomTop')?posX:(mouseX+(tipWidth/2)>winWidth)?winWidth/2-tipWidth/2:Math.max(mouseX-(tipWidth/2),0)});}wHeight=$(window).height();if(js){if(typeof js=='function'){js=js($this[0]);}$cluetipInner.html(js);cluetipShow(pY);}else if(tipParts){var tpl=tipParts.length;$cluetipInner.empty();for(var i=0;i<tpl;i++){if(i==0){$cluetipInner.html(tipParts[i]);}else{$cluetipInner.append('<div class="split-body">'+tipParts[i]+'</div>');}};cluetipShow(pY);}else if(!opts.local&&tipAttribute.indexOf('#')!=0){if(/\.(jpe?g|tiff?|gif|png)$/i.test(tipAttribute)){$cluetipInner.html('<img src="'+tipAttribute+'" alt="'+tipTitle+'" />');cluetipShow(pY);}else if(cluetipContents&&opts.ajaxCache){$cluetipInner.html(cluetipContents);cluetipShow(pY);}else{var ajaxSettings=opts.ajaxSettings;ajaxSettings.cache=false;ajaxSettings.url=tipAttribute;ajaxSettings.beforeSend=function(){$cluetipOuter.children().empty();if(opts.waitImage){$('#cluetip-waitimage').css({top:mouseY+20,left:mouseX+20}).show();}};ajaxSettings.error=function(){if(isActive){$cluetipInner.html('<i>sorry, the contents could not be loaded</i>');}};ajaxSettings.success=function(data){cluetipContents=opts.ajaxProcess(data);if(isActive){$cluetipInner.html(cluetipContents);}};ajaxSettings.complete=function(){imgCount=$('#cluetip-inner img').length;if(imgCount&&!$.browser.opera){$('#cluetip-inner img').each(function(){imgCount--;if(imgCount<1){$('#cluetip-waitimage').hide();if(isActive)cluetipShow(pY);}});}else{$('#cluetip-waitimage').hide();if(isActive)cluetipShow(pY);}};$.ajax(ajaxSettings);}}else if(opts.local){var $localContent=$(tipAttribute+(/#\w+$/.test(tipAttribute)?'':':eq('+index+')')).clone(true).show();$cluetipInner.html($localContent);cluetipShow(pY);}};var cluetipShow=function(bpY){$cluetip.addClass('cluetip-'+ctClass);if(opts.truncate){var $truncloaded=$cluetipInner.text().slice(0,opts.truncate)+'...';$cluetipInner.html($truncloaded);}function doNothing(){};tipTitle?$cluetipTitle.show().html(tipTitle):(opts.showTitle)?$cluetipTitle.show().html('&nbsp;'):$cluetipTitle.hide();if(opts.sticky){var $closeLink=$('<div id="cluetip-close"><a href="#">'+opts.closeText+'</a></div>');(opts.closePosition=='bottom')?$closeLink.appendTo($cluetipInner):(opts.closePosition=='title')?$closeLink.prependTo($cluetipTitle):$closeLink.prependTo($cluetipInner);$closeLink.click(function(){cluetipClose();return false;});if(opts.mouseOutClose){if($.fn.hoverIntent&&opts.hoverIntent){$cluetip.hoverIntent({over:doNothing,timeout:opts.hoverIntent.timeout,out:function(){$closeLink.trigger('click');}});}else{$cluetip.hover(doNothing,function(){$closeLink.trigger('click');});}}else{$cluetip.unbind('mouseout');}}var direction='';$cluetipOuter.css({overflow:defHeight=='auto'?'visible':'auto',height:defHeight});tipHeight=defHeight=='auto'?Math.max($cluetip.outerHeight(),$cluetip.height()):parseInt(defHeight,10);tipY=posY;baseline=sTop+wHeight;if(opts.positionBy=='fixed'){tipY=posY-opts.dropShadowSteps+tOffset;}else if((posX<mouseX&&Math.max(posX,0)+tipWidth>mouseX)||opts.positionBy=='bottomTop'){if(posY+tipHeight+tOffset>baseline&&mouseY-sTop>tipHeight+tOffset){tipY=mouseY-tipHeight-tOffset;direction='top';}else{tipY=mouseY+tOffset;direction='bottom';}}else if(posY+tipHeight+tOffset>baseline){tipY=(tipHeight>=wHeight)?sTop:baseline-tipHeight-tOffset;}else if($this.css('display')=='block'||$this[0].tagName.toLowerCase()=='area'||opts.positionBy=="mouse"){tipY=bpY-tOffset;}else{tipY=posY-opts.dropShadowSteps;}if(direction==''){posX<linkLeft?direction='left':direction='right';}$cluetip.css({top:tipY+'px'}).removeClass().addClass('clue-'+direction+'-'+ctClass).addClass(' cluetip-'+ctClass);if(opts.arrows){var bgY=(posY-tipY-opts.dropShadowSteps);$cluetipArrows.css({top:(/(left|right)/.test(direction)&&posX>=0&&bgY>0)?bgY+'px':/(left|right)/.test(direction)?0:''}).show();}else{$cluetipArrows.hide();}$dropShadow.hide();$cluetip.hide()[opts.fx.open](opts.fx.open!='show'&&opts.fx.openSpeed);if(opts.dropShadow)$dropShadow.css({height:tipHeight,width:tipInnerWidth}).show();if($.fn.bgiframe){$cluetip.bgiframe();}if(opts.delayedClose>0){closeOnDelay=setTimeout(cluetipClose,opts.delayedClose);}opts.onShow($cluetip,$cluetipInner);};var inactivate=function(event){isActive=false;$('#cluetip-waitimage').hide();if(!opts.sticky||(/click|toggle/).test(opts.activation)){cluetipClose();clearTimeout(closeOnDelay);};if(opts.hoverClass){$this.removeClass(opts.hoverClass);}};var cluetipClose=function(){$cluetipOuter.parent().hide().removeClass();opts.onHide($cluetip,$cluetipInner);$this.removeClass('cluetip-clicked');if(tipTitle){$this.attr(opts.titleAttribute,tipTitle);}$this.css('cursor','');if(opts.arrows)$cluetipArrows.css({top:''});};if((/click|toggle/).test(opts.activation)){$this.click(function(event){if($cluetip.is(':hidden')||!$this.is('.cluetip-clicked')){activate(event);$('.cluetip-clicked').removeClass('cluetip-clicked');$this.addClass('cluetip-clicked');}else{inactivate(event);}this.blur();return false;});}else if((/rightClick|toggle/).test(opts.activation)){$this.rightClick(function(event){if($cluetip.is(':hidden')||!$this.is('.cluetip-clicked')){activate(event);$('.cluetip-clicked').removeClass('cluetip-clicked');$this.addClass('cluetip-clicked');}else{inactivate(event);}this.blur();return false;});}else if(opts.activation=='focus'){$this.focus(function(event){activate(event);});$this.blur(function(event){inactivate(event);});}else{$this.click(function(){if($this.attr('href')&&$this.attr('href')==tipAttribute&&!opts.clickThrough){return false;}});var mouseTracks=function(evt){if(opts.tracking==true){var trackX=posX-evt.pageX;var trackY=tipY?tipY-evt.pageY:posY-evt.pageY;$this.mousemove(function(evt){$cluetip.css({left:evt.pageX+trackX,top:evt.pageY+trackY});});}};if($.fn.hoverIntent&&opts.hoverIntent){$this.mouseover(function(){$this.attr('title','');}).hoverIntent({sensitivity:opts.hoverIntent.sensitivity,interval:opts.hoverIntent.interval,over:function(event){activate(event);mouseTracks(event);},timeout:opts.hoverIntent.timeout,out:function(event){inactivate(event);$this.unbind('mousemove');}});}else{$this.hover(function(event){activate(event);mouseTracks(event);},function(event){inactivate(event);$this.unbind('mousemove');});}}});};$.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(e){return true;},onShow:function(ct,c){},onHide:function(ct,c){},ajaxCache:true,ajaxProcess:function(data){data=data.replace(/<s(cript|tyle)(.|\s)*?\/s(cript|tyle)>/g,'').replace(/<(link|title)(.|\s)*?\/(link|title)>/g,'');return data;},ajaxSettings:{dataType:'html'},debug:false};var insertionType='appendTo',insertionElement='body';$.cluetip={};$.cluetip.setup=function(options){if(options&&options.insertionType&&(options.insertionType).match(/appendTo|prependTo|insertBefore|insertAfter/)){insertionType=options.insertionType;}if(options&&options.insertionElement){insertionElement=options.insertionElement;}};})(jQuery);jsFuncObserve.cluetipclick=function(targetid){var targetid=targetid;if(targetid.length>0)
targetid=targetid+" ";ff.pluginLoad("jquery.fn.rightClick","/themes/library/plugins/jquery.rightclick/jquery.rightclick.js",function(){ff.pluginLoad("jquery.cluetip","/themes/library/plugins/jquery.cluetip/jquery.cluetip.js",function(){var arrCluetip=new Array();jQuery(targetid+'input[type="hidden"].cluetip').each(function(){if(jQuery(this).closest("div,li,td").attr("id")!==undefined)
if(arrCluetip[jQuery(this).closest("div,li,td").attr("id")]===undefined)
arrCluetip[jQuery(this).closest("div,li,td").attr("id")]=true;else
arrCluetip[jQuery(this).closest("div,li,td").attr("id")]=false;});jQuery(targetid+'input[type="hidden"].cluetip').each(function(){if(arrCluetip[jQuery(this).closest("div,li,td").attr("id")]!==undefined&&arrCluetip[jQuery(this).closest("div,li,td").attr("id")]){jQuery(this).closest("div,li,td").attr("admin",jQuery(this).val());jQuery(this).closest("div,li,td").cluetip({activation:'rightClick',attribute:'admin',cluetipClass:'jtip',width:'100%',titleAttribute:'title',positionBy:'mouse',showTitle:false,arrows:false,dropShadow:false,hoverIntent:true,waitImage:true,sticky:true,mouseOutClose:true,closePosition:'title',closeText:'<img src="'+ff.site_path+'/themes/gallery/javascript/plugin/jquery.cluetipclick/images/cross.png" alt="close" />',fx:{open:'fadeIn',openSpeed:'1000'},hoverIntent:{sensitivity:1,interval:400,timeout:1},onActivate:function(e){return true;}});}else{jQuery(this).next().attr("admin",jQuery(this).val());jQuery(this).next().cluetip({activation:'rightClick',attribute:'admin',cluetipClass:'jtip',width:'100%',titleAttribute:'title',positionBy:'mouse',showTitle:false,arrows:false,dropShadow:false,hoverIntent:true,waitImage:true,sticky:true,mouseOutClose:true,closePosition:'title',closeText:'<img src="'+ff.site_path+'/themes/gallery/javascript/plugin/jquery.cluetipclick/images/cross.png" alt="close" />',fx:{open:'fadeIn',openSpeed:'1000'},hoverIntent:{sensitivity:1,interval:400,timeout:1},onActivate:function(e){return true;}});}
jQuery(this).remove();});},false);},false);};jsFuncObserve.issuu=function(targetid){var targetid=targetid;var user="pizzapress";var width="980";var height="693";var mode="embed";var layout="http%3A%2F%2Fskin.issuu.com%2Fv%2Flight%2Flayout.xml";var showFlipBtn="false";jQuery(targetid+' .issuu').click(function(){var altTitle=jQuery(this).children("img").attr("alt");if(altTitle===undefined)
altTitle="";var altName="";if(!altName.length>0){var arrFile=jQuery(this).attr("href").split("/");var lastValue=arrFile[arrFile.length-1];if(lastValue.indexOf(".")>0){altName=lastValue.substr(0,lastValue.indexOf("."));}else if(lastValue.indexOf("?")>0){altName=lastValue.substr(0,lastValue.indexOf("?"));}else{altName=lastValue;}}
var url='http://issuu.com/'+user+'/docs/'+altName+'?mode='+mode+'&layout='+layout+'&showFlipBtn='+showFlipBtn;if(jQuery(".issuucontent").children("iframe").attr("id")===undefined){jQuery(this).parent().parent().append('<div class="issuucontent"><iframe id="issuuviewer" src="#" width="'+width+'" height="'+height+'" ></iframe></div>');jQuery(".issuucontent").height(height);jQuery(".issuucontent").width(width);jQuery(".issuucontent").hide();}
jQuery("#issuuviewer").attr("src",url);jQuery(".issuucontent").dialog({title:altTitle,width:'auto'});return false;});};jQuery.easing['jswing']=jQuery.easing['swing'];jQuery.extend(jQuery.easing,{def:'easeOutQuad',swing:function(x,t,b,c,d){return jQuery.easing[jQuery.easing.def](x,t,b,c,d);},easeInQuad:function(x,t,b,c,d){return c*(t/=d)*t+b;},easeOutQuad:function(x,t,b,c,d){return-c*(t/=d)*(t-2)+b;},easeInOutQuad:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t+b;return-c/2*((--t)*(t-2)-1)+b;},easeInCubic:function(x,t,b,c,d){return c*(t/=d)*t*t+b;},easeOutCubic:function(x,t,b,c,d){return c*((t=t/d-1)*t*t+1)+b;},easeInOutCubic:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t+b;return c/2*((t-=2)*t*t+2)+b;},easeInQuart:function(x,t,b,c,d){return c*(t/=d)*t*t*t+b;},easeOutQuart:function(x,t,b,c,d){return-c*((t=t/d-1)*t*t*t-1)+b;},easeInOutQuart:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t+b;return-c/2*((t-=2)*t*t*t-2)+b;},easeInQuint:function(x,t,b,c,d){return c*(t/=d)*t*t*t*t+b;},easeOutQuint:function(x,t,b,c,d){return c*((t=t/d-1)*t*t*t*t+1)+b;},easeInOutQuint:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t*t+b;return c/2*((t-=2)*t*t*t*t+2)+b;},easeInSine:function(x,t,b,c,d){return-c*Math.cos(t/d*(Math.PI/2))+c+b;},easeOutSine:function(x,t,b,c,d){return c*Math.sin(t/d*(Math.PI/2))+b;},easeInOutSine:function(x,t,b,c,d){return-c/2*(Math.cos(Math.PI*t/d)-1)+b;},easeInExpo:function(x,t,b,c,d){return(t==0)?b:c*Math.pow(2,10*(t/d-1))+b;},easeOutExpo:function(x,t,b,c,d){return(t==d)?b+c:c*(-Math.pow(2,-10*t/d)+1)+b;},easeInOutExpo:function(x,t,b,c,d){if(t==0)return b;if(t==d)return b+c;if((t/=d/2)<1)return c/2*Math.pow(2,10*(t-1))+b;return c/2*(-Math.pow(2,-10*--t)+2)+b;},easeInCirc:function(x,t,b,c,d){return-c*(Math.sqrt(1-(t/=d)*t)-1)+b;},easeOutCirc:function(x,t,b,c,d){return c*Math.sqrt(1-(t=t/d-1)*t)+b;},easeInOutCirc:function(x,t,b,c,d){if((t/=d/2)<1)return-c/2*(Math.sqrt(1-t*t)-1)+b;return c/2*(Math.sqrt(1-(t-=2)*t)+1)+b;},easeInElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4;}
else var s=p/(2*Math.PI)*Math.asin(c/a);return-(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;},easeOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4;}
else var s=p/(2*Math.PI)*Math.asin(c/a);return a*Math.pow(2,-10*t)*Math.sin((t*d-s)*(2*Math.PI)/p)+c+b;},easeInOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d/2)==2)return b+c;if(!p)p=d*(.3*1.5);if(a<Math.abs(c)){a=c;var s=p/4;}
else var s=p/(2*Math.PI)*Math.asin(c/a);if(t<1)return-.5*(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;return a*Math.pow(2,-10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p)*.5+c+b;},easeInBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*(t/=d)*t*((s+1)*t-s)+b;},easeOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*((t=t/d-1)*t*((s+1)*t+s)+1)+b;},easeInOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;if((t/=d/2)<1)return c/2*(t*t*(((s*=(1.525))+1)*t-s))+b;return c/2*((t-=2)*t*(((s*=(1.525))+1)*t+s)+2)+b;},easeInBounce:function(x,t,b,c,d){return c-jQuery.easing.easeOutBounce(x,d-t,0,c,d)+b;},easeOutBounce:function(x,t,b,c,d){if((t/=d)<(1/2.75)){return c*(7.5625*t*t)+b;}else if(t<(2/2.75)){return c*(7.5625*(t-=(1.5/2.75))*t+.75)+b;}else if(t<(2.5/2.75)){return c*(7.5625*(t-=(2.25/2.75))*t+.9375)+b;}else{return c*(7.5625*(t-=(2.625/2.75))*t+.984375)+b;}},easeInOutBounce:function(x,t,b,c,d){if(t<d/2)return jQuery.easing.easeInBounce(x,t*2,0,c,d)*.5+b;return jQuery.easing.easeOutBounce(x,t*2-d,0,c,d)*.5+c*.5+b;}});
/*
 * CrossSlide jQuery plugin v0.6.2
 *
 * Copyright 2007-2010 by Tobia Conforto <tobia.conforto@gmail.com>
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the Free
 * Software Foundation; either version 2 of the License, or (at your option)
 * any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program; if not, write to the Free Software Foundation, Inc., 51
 * Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 */
(function(){var $=jQuery,animate=($.fn.startAnimation?'startAnimation':'animate'),pause_missing='pause plugin missing.';function format(str){for(var i=1;i<arguments.length;i++)
str=str.replace(new RegExp('\\{'+(i-1)+'}','g'),arguments[i]);return str;}
function abort(){arguments[0]='CrossSlide: '+arguments[0];throw new Error(format.apply(null,arguments));}
function parse_position_param(param){var zoom=1;var tokens=param.replace(/^\s*|\s*$/g,'').split(/\s+/);if(tokens.length>3)throw new Error();if(tokens[0]=='center')
if(tokens.length==1)
tokens=['center','center'];else if(tokens.length==2&&tokens[1].match(/^[\d.]+x$/i))
tokens=['center','center',tokens[1]];if(tokens.length==3)
zoom=parseFloat(tokens[2].match(/^([\d.]+)x$/i)[1]);var pos=tokens[0]+' '+tokens[1];if(pos=='left top'||pos=='top left')
return{xrel:0,yrel:0,zoom:zoom};if(pos=='left center'||pos=='center left')
return{xrel:0,yrel:.5,zoom:zoom};if(pos=='left bottom'||pos=='bottom left')
return{xrel:0,yrel:1,zoom:zoom};if(pos=='center top'||pos=='top center')
return{xrel:.5,yrel:0,zoom:zoom};if(pos=='center center')
return{xrel:.5,yrel:.5,zoom:zoom};if(pos=='center bottom'||pos=='bottom center')
return{xrel:.5,yrel:1,zoom:zoom};if(pos=='right top'||pos=='top right')
return{xrel:1,yrel:0,zoom:zoom};if(pos=='right center'||pos=='center right')
return{xrel:1,yrel:.5,zoom:zoom};if(pos=='right bottom'||pos=='bottom right')
return{xrel:1,yrel:1,zoom:zoom};return{xrel:parseInt(tokens[0].match(/^(\d+)%$/)[1])/100,yrel:parseInt(tokens[1].match(/^(\d+)%$/)[1])/100,zoom:zoom};}
$.fn.crossSlide=function(opts,plan,callback)
{var self=this,self_width=this.width(),self_height=this.height();if(self.length!=1)
abort('crossSlide() must be called on exactly 1 element')
self.get(0).crossSlideArgs=[opts,plan,callback];plan=$.map(plan,function(p){return $.extend({},p);});if(!opts.easing)
opts.easing=opts.variant?'swing':'linear';if(!callback)
callback=function(){};(function(proceed){var n_loaded=0;function loop(i,img){img.onload=function(e){n_loaded++;plan[i].width=img.width;plan[i].height=img.height;if(n_loaded==plan.length)
proceed();}
img.src=plan[i].src;if(i+1<plan.length)
loop(i+1,new Image());}
loop(0,new Image());})(function(){if(!opts.fade)
abort('missing fade parameter.');if(opts.speed&&opts.sleep)
abort('you cannot set both speed and sleep at the same time.');var fade_ms=Math.round(opts.fade*1000);if(opts.sleep)
var sleep=Math.round(opts.sleep*1000);if(opts.speed)
var speed=opts.speed/1000,fade_px=Math.round(fade_ms*speed);self.empty().css({overflow:'hidden',padding:0});if(!/^(absolute|relative|fixed)$/.test(self.css('position')))
self.css({position:'relative'});if(!self.width()||!self.height())
abort('container element does not have its own width and height');if(opts.shuffle)
plan.sort(function(){return Math.random()-0.5;});for(var i=0;i<plan.length;++i){var p=plan[i];if(!p.src)
abort('missing src parameter in picture {0}.',i+1);if(speed){switch(p.dir){case'up':p.from={xrel:.5,yrel:0,zoom:1};p.to={xrel:.5,yrel:1,zoom:1};var slide_px=p.height-self_height-2*fade_px;break;case'down':p.from={xrel:.5,yrel:1,zoom:1};p.to={xrel:.5,yrel:0,zoom:1};var slide_px=p.height-self_height-2*fade_px;break;case'left':p.from={xrel:0,yrel:.5,zoom:1};p.to={xrel:1,yrel:.5,zoom:1};var slide_px=p.width-self_width-2*fade_px;break;case'right':p.from={xrel:1,yrel:.5,zoom:1};p.to={xrel:0,yrel:.5,zoom:1};var slide_px=p.width-self_width-2*fade_px;break;default:abort('missing or malformed dir parameter in picture {0}.',i+1);}
if(slide_px<=0)
abort('impossible animation: either picture {0} is too small or '
+'div is too large or fade duration too long.',i+1);p.time_ms=Math.round(slide_px/speed);}else if(!sleep){if(!p.from||!p.to||!p.time)
abort('missing either speed/sleep option, or from/to/time params '
+'in picture {0}.',i+1);try{p.from=parse_position_param(p.from)}catch(e){abort('malformed "from" parameter in picture {0}.',i+1);}
try{p.to=parse_position_param(p.to)}catch(e){abort('malformed "to" parameter in picture {0}.',i+1);}
if(!p.time)
abort('missing "time" parameter in picture {0}.',i+1);p.time_ms=Math.round(p.time*1000)}
if(p.from)
$.each([p.from,p.to],function(i,each){each.width=Math.round(p.width*each.zoom);each.height=Math.round(p.height*each.zoom);each.left=Math.round((self_width-each.width)*each.xrel);each.top=Math.round((self_height-each.height)*each.yrel);});var img,elm;elm=img=$(format('<img src="{0}"/>',p.src));if(p.href)
elm=$(format('<a href="{0}"></a>',p.href)).append(img);if(p.onclick)
elm.click(p.onclick);if(p.alt)
img.attr('alt',p.alt);if(p.rel)
elm.attr('rel',p.rel);if(p.href&&p.target)
elm.attr('target',p.target);elm.appendTo(self);}
delete speed;function position_to_css(p,phase){var pos=[0,fade_ms/(p.time_ms+2*fade_ms),1-fade_ms/(p.time_ms+2*fade_ms),1][phase];return{left:Math.round(p.from.left+pos*(p.to.left-p.from.left)),top:Math.round(p.from.top+pos*(p.to.top-p.from.top)),width:Math.round(p.from.width+pos*(p.to.width-p.from.width)),height:Math.round(p.from.height+pos*(p.to.height-p.from.height))};}
var imgs=self.find('img').css({position:'absolute',visibility:'hidden',top:0,left:0,border:0});imgs.eq(0).css({visibility:'visible'});if(!sleep)
imgs.eq(0).css(position_to_css(plan[0],opts.variant?0:1));var countdown=opts.loop;function create_chain(i,chainf){if(i%2==0){if(sleep){var i_sleep=i/2,i_hide=(i_sleep-1+plan.length)%plan.length,img_sleep=imgs.eq(i_sleep),img_hide=imgs.eq(i_hide);var newf=function(){callback(i_sleep,img_sleep.get(0));img_hide.css('visibility','hidden');setTimeout(chainf,sleep);};}else{var i_slide=i/2,i_hide=(i_slide-1+plan.length)%plan.length,img_slide=imgs.eq(i_slide),img_hide=imgs.eq(i_hide),time=plan[i_slide].time_ms,slide_anim=position_to_css(plan[i_slide],opts.variant?3:2);var newf=function(){callback(i_slide,img_slide.get(0));img_hide.css('visibility','hidden');img_slide[animate](slide_anim,time,opts.easing,chainf);};}}else{var i_from=Math.floor(i/2),i_to=Math.ceil(i/2)%plan.length,img_from=imgs.eq(i_from),img_to=imgs.eq(i_to),from_anim={},to_init={visibility:'visible'},to_anim={};if(i_to>i_from){to_init.opacity=0;to_anim.opacity=1;if(opts.doubleFade)
from_anim.opacity=0;}else{from_anim.opacity=0;if(opts.doubleFade){to_init.opacity=0;to_anim.opacity=1;}}
if(!sleep){$.extend(to_init,position_to_css(plan[i_to],0));if(!opts.variant){$.extend(from_anim,position_to_css(plan[i_from],3));$.extend(to_anim,position_to_css(plan[i_to],1));}}
if($.isEmptyObject(to_anim)){var newf=function(){callback(i_to,img_to.get(0),i_from,img_from.get(0));img_to.css(to_init);img_from[animate](from_anim,fade_ms,'linear',chainf);};}else if($.isEmptyObject(from_anim)){var newf=function(){callback(i_to,img_to.get(0),i_from,img_from.get(0));img_to.css(to_init);img_to[animate](to_anim,fade_ms,'linear',chainf);};}else{var newf=function(){callback(i_to,img_to.get(0),i_from,img_from.get(0));img_to.css(to_init);img_to[animate](to_anim,fade_ms,'linear');img_from[animate](from_anim,fade_ms,'linear',chainf);};}}
if(opts.loop&&i==plan.length*2-2){var newf_orig=newf;newf=function(){if(--countdown)newf_orig();}}
if(i>0)
return create_chain(i-1,newf);else
return newf;}
var animation=create_chain(plan.length*2-1,function(){return animation();});animation();});return self;};$.fn.crossSlideFreeze=function()
{this.find('img').stop();}
$.fn.crossSlideStop=function()
{this.find('img').stop().remove();}
$.fn.crossSlideRestart=function()
{this.find('img').stop().remove();$.fn.crossSlide.apply(this,this.get(0).crossSlideArgs);}
$.fn.crossSlidePause=function()
{if(!$.fn.pause)
abort(pause_missing);this.find('img').pause();}
$.fn.crossSlideResume=function()
{if(!$.fn.pause)
abort(pause_missing);this.find('img').resume();}})();jsFuncObserve.crosslide=function(targetid){var targetid=targetid;if(targetid.length>0)
targetid=targetid+" ";ff.pluginLoad("jquery.fn.crossSlide","/themes/library/plugins/jquery.crosslide/jquery.crosslide.js",function(){var arrCrosSlide=new Array();jQuery(targetid+'.crosslide').each(function(){if(jQuery(this).parent().attr("id")!=''){if(arrCrosSlide[jQuery(this).parent().attr("id")]===undefined)
arrCrosSlide[jQuery(this).parent().attr("id")]='';if(arrCrosSlide[jQuery(this).parent().attr("id")]!='')
arrCrosSlide[jQuery(this).parent().attr("id")]=arrCrosSlide[jQuery(this).parent().attr("id")]+',';arrCrosSlide[jQuery(this).parent().attr("id")]=arrCrosSlide[jQuery(this).parent().attr("id")]+"{ src: '"+jQuery(this).attr('src')+"' }";}});for(var crossSlide in arrCrosSlide){if(!jQuery.isFunction(arrCrosSlide[crossSlide])){jQuery("#"+crossSlide).height(jQuery("#"+crossSlide+' .crosslide:first').height());jQuery("#"+crossSlide).width(jQuery("#"+crossSlide+' .crosslide:first').width());jQuery("#"+crossSlide).hide();jQuery("#"+crossSlide).crossSlide({sleep:2,fade:1},eval('['+arrCrosSlide[crossSlide]+']'));jQuery("#"+crossSlide).show();}}},true);};﻿
/*
 * jQuery blockUI plugin
 * Version 2.33 (29-MAR-2010)
 * @requires jQuery v1.2.3 or later
 *
 * Examples at: http://malsup.com/jquery/block/
 * Copyright (c) 2007-2008 M. Alsup
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 *
 * Thanks to Amir-Hossein Sobhi for some excellent contributions!
 */
;(function($){if(/1\.(0|1|2)\.(0|1|2)/.test($.fn.jquery)||/^1.1/.test($.fn.jquery)){alert('blockUI requires jQuery v1.2.3 or later!  You are using v'+$.fn.jquery);return;}
$.fn._fadeIn=$.fn.fadeIn;var noOp=function(){};var mode=document.documentMode||0;var setExpr=$.browser.msie&&(($.browser.version<8&&!mode)||mode<8);var ie6=$.browser.msie&&/MSIE 6.0/.test(navigator.userAgent)&&!mode;$.blockUI=function(opts){install(window,opts);};$.unblockUI=function(opts){remove(window,opts);};$.growlUI=function(title,message,timeout,onClose){var $m=$('<div class="growlUI"></div>');if(title)$m.append('<h1>'+title+'</h1>');if(message)$m.append('<h2>'+message+'</h2>');if(timeout==undefined)timeout=3000;$.blockUI({message:$m,fadeIn:700,fadeOut:1000,centerY:false,timeout:timeout,showOverlay:false,onUnblock:onClose,css:$.blockUI.defaults.growlCSS});};$.fn.block=function(opts){return this.unblock({fadeOut:0}).each(function(){if($.css(this,'position')=='static')
this.style.position='relative';if($.browser.msie)
this.style.zoom=1;install(this,opts);});};$.fn.unblock=function(opts){return this.each(function(){remove(this,opts);});};$.blockUI.version=2.33;$.blockUI.defaults={message:'<h1>Please wait...</h1>',title:null,draggable:true,theme:false,css:{padding:0,margin:0,width:'30%',top:'40%',left:'35%',textAlign:'center',color:'#000',border:'3px solid #aaa',backgroundColor:'#fff',cursor:'wait'},themedCSS:{width:'30%',top:'40%',left:'35%'},overlayCSS:{backgroundColor:'#000',opacity:0.6,cursor:'wait'},growlCSS:{width:'350px',top:'10px',left:'',right:'10px',border:'none',padding:'5px',opacity:0.6,cursor:'default',color:'#fff',backgroundColor:'#000','-webkit-border-radius':'10px','-moz-border-radius':'10px','border-radius':'10px'},iframeSrc:/^https/i.test(window.location.href||'')?'javascript:false':'about:blank',forceIframe:false,baseZ:1000,centerX:true,centerY:true,allowBodyStretch:true,bindEvents:true,constrainTabKey:true,fadeIn:200,fadeOut:400,timeout:0,showOverlay:true,focusInput:true,applyPlatformOpacityRules:true,onBlock:null,onUnblock:null,quirksmodeOffsetHack:4};var pageBlock=null;var pageBlockEls=[];function install(el,opts){var full=(el==window);var msg=opts&&opts.message!==undefined?opts.message:undefined;opts=$.extend({},$.blockUI.defaults,opts||{});opts.overlayCSS=$.extend({},$.blockUI.defaults.overlayCSS,opts.overlayCSS||{});var css=$.extend({},$.blockUI.defaults.css,opts.css||{});var themedCSS=$.extend({},$.blockUI.defaults.themedCSS,opts.themedCSS||{});msg=msg===undefined?opts.message:msg;if(full&&pageBlock)
remove(window,{fadeOut:0});if(msg&&typeof msg!='string'&&(msg.parentNode||msg.jquery)){var node=msg.jquery?msg[0]:msg;var data={};$(el).data('blockUI.history',data);data.el=node;data.parent=node.parentNode;data.display=node.style.display;data.position=node.style.position;if(data.parent)
data.parent.removeChild(node);}
var z=opts.baseZ;var lyr1=($.browser.msie||opts.forceIframe)?$('<iframe class="blockUI" style="z-index:'+(z++)+';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="'+opts.iframeSrc+'"></iframe>'):$('<div class="blockUI" style="display:none"></div>');var lyr2=$('<div class="blockUI blockOverlay" style="z-index:'+(z++)+';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>');var lyr3,s;if(opts.theme&&full){s='<div class="blockUI blockMsg blockPage ui-dialog ui-widget ui-corner-all" style="z-index:'+z+';display:none;position:fixed">'+'<div class="ui-widget-header ui-dialog-titlebar blockTitle">'+(opts.title||'&nbsp;')+'</div>'+'<div class="ui-widget-content ui-dialog-content"></div>'+'</div>';}
else if(opts.theme){s='<div class="blockUI blockMsg blockElement ui-dialog ui-widget ui-corner-all" style="z-index:'+z+';display:none;position:absolute">'+'<div class="ui-widget-header ui-dialog-titlebar blockTitle">'+(opts.title||'&nbsp;')+'</div>'+'<div class="ui-widget-content ui-dialog-content"></div>'+'</div>';}
else if(full){s='<div class="blockUI blockMsg blockPage" style="z-index:'+z+';display:none;position:fixed"></div>';}
else{s='<div class="blockUI blockMsg blockElement" style="z-index:'+z+';display:none;position:absolute"></div>';}
lyr3=$(s);if(msg){if(opts.theme){lyr3.css(themedCSS);lyr3.addClass('ui-widget-content');}
else
lyr3.css(css);}
if(!opts.applyPlatformOpacityRules)
lyr2.css(opts.overlayCSS);lyr2.css('position',full?'fixed':'absolute');if($.browser.msie||opts.forceIframe)
lyr1.css('opacity',0.0);var layers=[lyr1,lyr2,lyr3],$par=full?$('body'):$(el);$.each(layers,function(){this.appendTo($par);});if(opts.theme&&opts.draggable&&$.fn.draggable){lyr3.draggable({handle:'.ui-dialog-titlebar',cancel:'li'});}
var expr=setExpr&&(!$.boxModel||$('object,embed',full?null:el).length>0);if(ie6||expr){if(full&&opts.allowBodyStretch&&$.boxModel)
$('html,body').css('height','100%');if((ie6||!$.boxModel)&&!full){var t=sz(el,'borderTopWidth'),l=sz(el,'borderLeftWidth');var fixT=t?'(0 - '+t+')':0;var fixL=l?'(0 - '+l+')':0;}
$.each([lyr1,lyr2,lyr3],function(i,o){var s=o[0].style;s.position='absolute';if(i<2){full?s.setExpression('height','Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.boxModel?0:'+opts.quirksmodeOffsetHack+') + "px"'):s.setExpression('height','this.parentNode.offsetHeight + "px"');full?s.setExpression('width','jQuery.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"'):s.setExpression('width','this.parentNode.offsetWidth + "px"');if(fixL)s.setExpression('left',fixL);if(fixT)s.setExpression('top',fixT);}
else if(opts.centerY){if(full)s.setExpression('top','(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"');s.marginTop=0;}
else if(!opts.centerY&&full){var top=(opts.css&&opts.css.top)?parseInt(opts.css.top):0;var expression='((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + '+top+') + "px"';s.setExpression('top',expression);}});}
if(msg){if(opts.theme)
lyr3.find('.ui-widget-content').append(msg);else
lyr3.append(msg);if(msg.jquery||msg.nodeType)
$(msg).show();}
if(($.browser.msie||opts.forceIframe)&&opts.showOverlay)
lyr1.show();if(opts.fadeIn){var cb=opts.onBlock?opts.onBlock:noOp;var cb1=(opts.showOverlay&&!msg)?cb:noOp;var cb2=msg?cb:noOp;if(opts.showOverlay)
lyr2._fadeIn(opts.fadeIn,cb1);if(msg)
lyr3._fadeIn(opts.fadeIn,cb2);}
else{if(opts.showOverlay)
lyr2.show();if(msg)
lyr3.show();if(opts.onBlock)
opts.onBlock();}
bind(1,el,opts);if(full){pageBlock=lyr3[0];pageBlockEls=$(':input:enabled:visible',pageBlock);if(opts.focusInput)
setTimeout(focus,20);}
else
center(lyr3[0],opts.centerX,opts.centerY);if(opts.timeout){var to=setTimeout(function(){full?$.unblockUI(opts):$(el).unblock(opts);},opts.timeout);$(el).data('blockUI.timeout',to);}};function remove(el,opts){var full=(el==window);var $el=$(el);var data=$el.data('blockUI.history');var to=$el.data('blockUI.timeout');if(to){clearTimeout(to);$el.removeData('blockUI.timeout');}
opts=$.extend({},$.blockUI.defaults,opts||{});bind(0,el,opts);var els;if(full)
els=$('body').children().filter('.blockUI').add('body > .blockUI');else
els=$('.blockUI',el);if(full)
pageBlock=pageBlockEls=null;if(opts.fadeOut){els.fadeOut(opts.fadeOut);setTimeout(function(){reset(els,data,opts,el);},opts.fadeOut);}
else
reset(els,data,opts,el);};function reset(els,data,opts,el){els.each(function(i,o){if(this.parentNode)
this.parentNode.removeChild(this);});if(data&&data.el){data.el.style.display=data.display;data.el.style.position=data.position;if(data.parent)
data.parent.appendChild(data.el);$(el).removeData('blockUI.history');}
if(typeof opts.onUnblock=='function')
opts.onUnblock(el,opts);};function bind(b,el,opts){var full=el==window,$el=$(el);if(!b&&(full&&!pageBlock||!full&&!$el.data('blockUI.isBlocked')))
return;if(!full)
$el.data('blockUI.isBlocked',b);if(!opts.bindEvents||(b&&!opts.showOverlay))
return;var events='mousedown mouseup keydown keypress';b?$(document).bind(events,opts,handler):$(document).unbind(events,handler);};function handler(e){if(e.keyCode&&e.keyCode==9){if(pageBlock&&e.data.constrainTabKey){var els=pageBlockEls;var fwd=!e.shiftKey&&e.target==els[els.length-1];var back=e.shiftKey&&e.target==els[0];if(fwd||back){setTimeout(function(){focus(back)},10);return false;}}}
if($(e.target).parents('div.blockMsg').length>0)
return true;return $(e.target).parents().children().filter('div.blockUI').length==0;};function focus(back){if(!pageBlockEls)
return;var e=pageBlockEls[back===true?pageBlockEls.length-1:0];if(e)
e.focus();};function center(el,x,y){var p=el.parentNode,s=el.style;var l=((p.offsetWidth-el.offsetWidth)/2)-sz(p,'borderLeftWidth');var t=((p.offsetHeight-el.offsetHeight)/2)-sz(p,'borderTopWidth');if(x)s.left=l>0?(l+'px'):'0';if(y)s.top=t>0?(t+'px'):'0';};function sz(el,p){return parseInt($.css(el,p))||0;};})(jQuery);ff.ajax=(function(){var blocked_ui=0;var that={"chainupdate":{},"blockUI":function(chainupdate){blocked_ui++;if(blocked_ui>1||chainupdate)
return;that.chainupdate.resources=ff.hash();that.chainupdate.updated=ff.hash();if(jQuery.blockUI===undefined){ff.pluginLoad("jquery.fn.block","/themes/library/plugins/jquery.blockui/jquery.blockui.js",function(){jQuery.blockUI.defaults.css={padding:0,margin:0,top:'40%',left:'45%',textAlign:'center',cursor:'wait'};jQuery.blockUI.defaults.overlayCSS={};jQuery.blockUI({message:'<h1 class="block-loader"></h1>'});});}else{jQuery.blockUI.defaults.css={padding:0,margin:0,top:'40%',left:'45%',textAlign:'center',cursor:'wait'};jQuery.blockUI.defaults.overlayCSS={};jQuery.blockUI({message:'<h1 class="block-loader"></h1>'});}},"unblockUI":function(chainupdate,reset,data){if(reset)
blocked_ui=0;else
blocked_ui--;if(blocked_ui>0){return;}
if(chainupdate===undefined&&that.chainupdate.resources.length){var chainupdated=false;ff.struct.each(function(componentid,component){if(that.chainupdate.updated.isset(componentid)===undefined){var update=false;for(var i=0;i<component.resources.length;i++){if(that.chainupdate.resources.isset(component.resources[i])!==undefined){update=true;}}
if(update){that.chainupdate.updated.set(componentid,true);switch(component.type){case"ffGrid":chainupdated=true;if(component.dialog){ff.ffPage.dialog.doRequest(component.dialog,{"action":"refresh","component":componentid,"section":"GridData","chainupdate":true});}else{ff.ajax.doRequest({"component":componentid,"section":"GridData","chainupdate":true});}
break;case"ffDetails":chainupdated=true;if(component.dialog){ff.ffPage.dialog.doRequest(component.dialog,{"action":"refresh","component":componentid,"chainupdate":true});}else{ff.ajax.doRequest({"component":componentid,"chainupdate":true});}
break;default:}}else{component.fields.each(function(fieldid,field){var tmp=componentid+"_"+fieldid;if(that.chainupdate.updated.isset(tmp)===undefined){update=false;for(var i=0;i<field.resources.length;i++){if(that.chainupdate.resources.isset(field.resources[i])!==undefined){update=true;}}
if(update){that.chainupdate.updated.set(tmp,true);that.doEvent({"event_name":"onUpdateField","event_params":[componentid,fieldid,field]});}}});}}});ff.struct.fields.each(function(fieldid,field){if(that.chainupdate.updated.isset(fieldid)===undefined){var update=false;for(var i=0;i<field.resources.length;i++){if(that.chainupdate.resources.isset(field.resources[i])!==undefined){update=true;}}
if(update){that.chainupdate.updated.set(fieldid,true);that.doEvent({"event_name":"onUpdateField","event_params":[undefined,fieldid,field]});}}});that.chainupdate.resources.each(function(key,value,index){that.doEvent({"event_name":"onUpdate","event_params":[key,value]});});if(!chainupdated){that.doEvent({"event_name":"onEmptyQueue","event_params":[data]});jQuery.unblockUI();}}else{if(that.doEvent!==undefined)
that.doEvent({"event_name":"onEmptyQueue","event_params":[data]});jQuery.unblockUI();}},"doRequest":function(params){var form=(params.formName?jQuery("#"+params.formName):jQuery("#frmMain"));var url=(params.url?params.url:(function(){if(params.component)
var tmp=ff.struct.get(params.component);if(tmp!==undefined&&tmp.url)
return tmp.url;return document.location.href})());var fields=(params.fields===undefined?jQuery(":input",form).not("input:checkbox:not(:checked)").not("input:radio:not(:checked)"):params.fields);var type=(params.type===undefined?"POST":params.type);if(params.component){fields.push({name:"XHR_COMPONENT",value:params.component});if(params.section&&jQuery("#"+params.component+"_"+params.section).attr("id")!==undefined)
fields.push({name:"XHR_SECTION",value:params.section});}
if(params.action){var found=false;for(var i=0;i<fields.length;i++){if(fields[i].name=="frmAction")
delete fields[i];}
fields.push({name:"frmAction",value:params.action});}
ff.ajax.blockUI(params.chainupdate);jQuery.ajax({"url":url,"async":true,"data":fields,"type":type,"dataType":"json","success":ff.ajax.onSuccess,"error":ff.ajax.onError,"mydata":{"params":params,"parsed_url":url,"parsed_fields":fields}});},"onError":function(jqXHR,textStatus,errorThrown){that.unblockUI(false,true);alert("A Impossibile connettersi con il server, riprovare più tardi "+errorThrown);if(this.mydata){var callback=this.mydata.params.callback;if(callback!==undefined)
callback(null,this.mydata.params.customdata);}
return false;},"onSuccess":function(data){var component=this.mydata.params.component;var section=this.mydata.params.section;var injectid=(this.mydata.params.injectid?this.mydata.params.injectid:"#"+(component?(section&&jQuery("#"+component+"_"+section).attr("id")!==undefined?component+"_"+section:component):"content"));var callback=this.mydata.params.callback;var dialog=this.mydata.params.dialog;if(data===null){if(callback!==undefined)
callback(null,this.mydata.params.customdata);return false;}
if(this.mydata.params.chainupdate!==true){if(data.resources&&(data["insert_id"]!==undefined||data.refresh)){ff.struct.each(function(key,value){if(data["url"]!==undefined&&value.dialog===dialog)
that.chainupdate.updated.set(key,true);else if(component!==undefined&&key===component)
that.chainupdate.updated.set(key,true);if(data.resources.length){for(var c=0;c<data["resources"].length;c++){that.chainupdate.resources.set(data["resources"][c],(data["insert_id"]!==undefined?data["insert_id"]:true));}}});}}
if(data["html"]!==undefined||data["url"]!==undefined){if(component!==undefined){if(section){}else{ff.clearComponent(component);}}else{if(dialog){ff.struct.each(function(key,value){if(value.dialog===dialog)
ff.clearComponent(key);});}else{ff.struct.each(function(key){ff.clearComponent(key);});}}}
if(data["html"]!==undefined){if(data["headers"]!==undefined)
jQuery(document).append(data["headers"]);if(component===undefined){if(injectid=="#content"){if(dialog){jQuery(ff.ffPage.dialog.get(dialog).instance).html(data["html"]);ff.ffPage.dialog.refresh(dialog,true,false);}else{if(data["injectid"]!==undefined){jQuery("#"+data["injectid"]).html(data["html"]);}else{jQuery(injectid).html(data["html"]);}}}else{if(dialog){jQuery(ff.ffPage.dialog.get(dialog).instance).html(data["html"]);ff.ffPage.dialog.refresh(dialog,true,false);}else{if(this.mydata.params.replace)
jQuery(injectid).replaceWith(data["html"]);else
jQuery(injectid).html(data["html"]);}}}else{if(component===null&&injectid=="#content"&&data["injectid"]!==undefined){jQuery("#"+data["injectid"]).replaceWith(data["html"]);}else{jQuery(injectid).replaceWith(data["html"]);}
if(data["hidden"]!==undefined)
jQuery("#"+component+"_hidden").replaceWith(data["hidden"]);}
if(data["footers"]!==undefined)
jQuery(document).append(data["footers"]);if(component!==undefined&&section=="GridData"&&ff.struct.get(component).type=="ffGrid"){try{ff.ffPageNavigator.updateButtons(component,data["rows"]);}catch(e){};}
if(callback!==undefined&&!this.mydata.params.chainupdate)
callback(data,this.mydata.params.customdata);ff.ajax.unblockUI(this.mydata.params.chainupdate,false,data);}else if(data["url"]!==undefined){if(this.mydata.params.doredirects||data["doredirects"]!==undefined){if(dialog){ff.ffPage.dialog.get(dialog).instance.dialog("close");}
that.doEvent({"event_name":"onRedirect","event_params":[data["url"]]});top.location.href=data["url"];return true;}
if(callback!==undefined&&!this.mydata.params.chainupdate)
callback(data,this.mydata.params.customdata);var fields=[];if(component){fields.push({name:"XHR_COMPONENT",value:component});if(section&&jQuery("#"+component+"_"+section).attr("id")!==undefined)
fields.push({name:"XHR_SECTION",value:section});}else if(data["component"]!==undefined&&data["component"]){fields.push({name:"XHR_COMPONENT",value:data["component"]});this.mydata.params.component=data["component"];if(data["injectid"]!==undefined)
this.mydata.params.injectid="#"+data["injectid"];}
if(dialog){fields.push({name:"XHR_DIALOG_ID",value:dialog});}
jQuery.ajax({"url":data["url"],"async":true,"data":fields,"type":"GET","dataType":"json","success":ff.ajax.onSuccess,"mydata":{"params":this.mydata.params,"parsed_url":data["url"],"parsed_fields":fields}});}else{if(callback!==undefined&&!this.mydata.params.chainupdate){ff.ajax.unblockUI(this.mydata.params.chainupdate,false,data);callback(data,this.mydata.params.customdata);}
if(this.mydata.params.doredirects){top.location.reload(true);return true;}
if(callback===undefined)
ff.ajax.unblockUI(this.mydata.params.chainupdate,false,data);}
return true;}};return that;})();jQuery.extend(jQuery.ui.dialog.overlay,{create:function(dialog){if(this.instances.length===0){setTimeout(function(){if(jQuery.ui.dialog.overlay.instances.length){jQuery(document).bind(jQuery.ui.dialog.overlay.events,function(event){var parentDialog=jQuery(event.target).parents('.ui-dialog');if(parentDialog.length>0){var parentDialogZIndex=parentDialog.css('zIndex')||0;return parentDialogZIndex>jQuery.ui.dialog.overlay.maxZ;}
var aboveOverlay=false;jQuery(event.target).parents().each(function(){var currentZ=jQuery(this).css('zIndex')||0;if(currentZ>jQuery.ui.dialog.overlay.maxZ){aboveOverlay=true;return;}});return aboveOverlay;});}},1);jQuery(document).bind('keydown.dialog-overlay',function(event){(dialog.options.closeOnEscape&&event.keyCode&&event.keyCode==jQuery.ui.keyCode.ESCAPE&&dialog.close(event));});jQuery(window).bind('resize.dialog-overlay',jQuery.ui.dialog.overlay.resize);}
var $el=jQuery('<div></div>').appendTo(document.body).addClass('ui-widget-overlay').css({width:this.width(),height:this.height()});(dialog.options.stackfix&&jQuery.fn.stackfix&&$el.stackfix());this.instances.push($el);return $el;}});ff.ffPage.dialog=(function(){var dialogs=ff.hash();var that={"dialog_params":ff.hash(),"get":function(id){return dialogs.get(id);},"param":function(id,param,value){if(value!==undefined)
that.dialog_params.get(id)[param]=value;else
return that.dialog_params.get(id)[param];},"refresh":function(id,resize,setDefault){var target=jQuery('#ffWidget_dialog_container_'+id).closest(".ui-dialog");if(target.length>0){if(resize&&setDefault&&(jQuery('#ffWidget_dialog_container_'+id).find(".ffWidget_ckeditor").length>0||jQuery('#ffWidget_dialog_container_'+id).find(".ffWidget_tinymce").length>0||jQuery('#ffWidget_dialog_container_'+id).find(".ffWidget_editarea").length>0)){jQuery(target).width("96%");jQuery(target).css("left","2%");}
var position=jQuery(target).offset();var marginContainer=0;if(jQuery(".container").length>0){marginContainer=jQuery(".container").css("margin-top").replace("px","");if(jQuery("body").css("position")=="relative"){jQuery(target).css("top","0");}else{jQuery(target).css("top",parseInt(marginContainer)+"px");}}
if(resize){var containerMaxHeight=((jQuery(window).height()*0.90)-Math.ceil(parseInt(marginContainer)));jQuery('#ffWidget_dialog_container_'+id).css("max-height",containerMaxHeight);}
jQuery(target).css("top",Math.ceil((jQuery(window).height()-jQuery(target).height())/2)+"px");jQuery('#ffWidget_dialog_container_'+id).css("padding-right","16px");jQuery(target).css("top",Math.ceil(jQuery(window).scrollTop()+parseInt(jQuery(target).css("top").replace("px",""))));jQuery(target).css("left",Math.ceil((jQuery(window).width()-jQuery(target).width())/2)+"px");}
return true;},"addDialog":function(params){that.dialog_params.set(params.id,{"callback":params.callback,"url":params.url,"title":params.title,"params":params.params,"height":params.height,"width":params.width,"resizable":params.resizable,"position":params.position,"draggable":params.draggable,"doredirects":params.doredirects})},"doOpen":function(id,url,title){if(url!==undefined&&that.dialog_params.get(id)!==undefined)
that.dialog_params.get(id)["url"]=url;if(title!==undefined&&title.length>0&&that.dialog_params.get(id)!==undefined)
that.dialog_params.get(id)["title"]=title;if(dialogs.get(id)&&dialogs.get(id).instance){dialogs.get(id).instance.dialog("open");return;}
jQuery("body").css("overflow","hidden");dialogs.set(id,{"instance":jQuery('<div id="ffWidget_dialog_container_'+id+'"></div>').dialog({autoOpen:false,resizable:that.dialog_params.get(id).resizable,position:that.dialog_params.get(id).position,modal:true,draggable:that.dialog_params.get(id).draggable,overlay:{backgroundColor:'#000',opacity:0.5},close:function(ev,ui){that.onClose(id);jQuery("body").css("overflow","auto");},title:that.dialog_params.get(id).title,height:that.dialog_params.get(id).height||"auto",width:that.dialog_params.get(id).width||"auto",open:function(){ff.ffPage.dialog.refresh(id,true,true);},resizeStart:function(event,ui){jQuery('#ffWidget_dialog_container_'+id).hide();},resizeStop:function(event,ui){ff.ffPage.dialog.refresh(id,true,false);jQuery('#ffWidget_dialog_container_'+id).fadeIn();},resize:function(event,ui){}}),"params":jQuery.extend(true,{},that.dialog_params.get(id))});dialogs.get(id).params.current_url=dialogs.get(id).params.url;var fields=[{name:"XHR_DIALOG_ID",value:id}];ff.ajax.doRequest({"url":that.parseUrl(id,dialogs.get(id).params.current_url),"type":"GET","fields":fields,"callback":that.onSuccess,"customdata":{"id":id},"injectid":dialogs.get(id).instance,"dialog":id,"doredirects":dialogs.get(id).params.doredirects});},"close":function(id){dialogs.get(id).instance.dialog("close");},"onSuccess":function(data,customdata){var id=customdata.id;if(data===null){if(dialogs.get(id).params.params&&dialogs.get(id).params.params.persistent)
dialogs.get(id).params.params.persistent=false;dialogs.get(id).instance.dialog("close");return false;}
if(data["close"]){dialogs.get(id).instance.dialog("close");}else{if(data["html"]){if(dialogs.get(id)!==undefined&&!dialogs.get(id).instance.dialog("isOpen"))
dialogs.get(id).instance.dialog("open");}else if(data["url"]){dialogs.get(id).params.current_url=data["url"];}}
return true;},"onClose":function(id,hide){if(dialogs.get(id).params.params&&dialogs.get(id).params.params.persistent)
return;if(dialogs.get(id).params.callback){eval(dialogs.get(id).params.callback);}
ff.struct.each(function(componentid,component){if(component.dialog===id){ff.clearComponent(componentid);}});ff.struct.fields.each(function(key,field){if(field.dialog!==undefined&&field.dialog===id){ff.doEvent({"event_name":"onClearField","event_params":[undefined,key,field]});ff.struct.fields.unset(key);}});dialogs.get(id).instance.remove();dialogs.unset(id);that.doEvent({"event_name":"onClose"});},"doAction":function(id,action,component,detailaction,action_param){switch(action){case"close":dialogs.get(id).instance.dialog("close");break;default:that.doEvent({"event_name":"doAction","event_params":[id,action,component,detailaction,action_param]});var fields=jQuery(":input",dialogs.get(id).instance).not("input:checkbox:not(:checked)");fields.push({name:"frmAction",value:component+action});if(detailaction){fields.push({name:component+"detailaction",value:detailaction});}
if(action=="detail_delete"){fields.push({name:detailaction+"_delete_row",value:action_param});}
fields.push({name:"XHR_DIALOG_ID",value:id});ff.ajax.doRequest({"url":that.parseUrl(id,dialogs.get(id).params.current_url),"type":"POST","fields":fields,"callback":that.onSuccess,"customdata":{"id":id},"injectid":dialogs.get(id).instance,"dialog":id,"doredirects":dialogs.get(id).params.doredirects});break;}},"goToUrl":function(id,url){dialogs.get(id).params.current_url=url;var fields=[{name:"XHR_DIALOG_ID",value:id}];ff.ajax.doRequest({"url":that.parseUrl(id,dialogs.get(id).params.current_url),"type":"GET","fields":fields,"callback":that.onSuccess,"customdata":{"id":id},"injectid":dialogs.get(id).instance,"dialog":id,"doredirects":dialogs.get(id).params.doredirects});},"doRequest":function(id,params){var fields=jQuery(":input",dialogs.get(id).instance).not("input:checkbox:not(:checked)");if(params.action){fields.push({name:"frmAction",value:params.action});}
if(params.detailaction){fields.push({name:params.detailaction+"detailaction",value:params.component});}
if(params.action_param!==undefined){fields.push({name:params.component+"_delete_row",value:params.action_param});}
fields.push({name:"XHR_DIALOG_ID",value:id});var url=(params.url!==undefined?params.url:null);if(!url&&params.component)
url=ff.struct.get(params.component).url;if(!url)
url=dialogs.get(id).params.current_url;ff.ajax.doRequest({"url":that.parseUrl(id,url),"component":params.component,"section":params.section,"fields":fields,"callback":that.onSuccess,"customdata":{"id":id},"injectid":params.injectid,"dialog":id,"chainupdate":params.chainupdate,"doredirects":dialogs.get(id).params.doredirects});},"parseUrl":function(id,url){var parsedurl=url;var regTags=/\[\[(.+)\]\]/g;var ret;while((ret=regTags.exec(url))!==null){var tmp=ret[1].replace(/\[/g,"\\[").replace(/\]/g,"\\]");parsedurl=parsedurl.replace(ret[0],jQuery("#"+tmp).val(),"g");}
if(dialogs.get(id).params.params!==undefined)
{}
return parsedurl;}};return that;})();(function($){$.extend($.fx.step,{backgroundPosition:function(fx){if(fx.state===0&&typeof fx.end=='string'){var start=$.curCSS(fx.elem,'backgroundPosition');start=toArray(start);fx.start=[start[0],start[2]];var end=toArray(fx.end);fx.end=[end[0],end[2]];fx.unit=[end[1],end[3]];}
var nowPosX=[];nowPosX[0]=((fx.end[0]-fx.start[0])*fx.pos)+fx.start[0]+fx.unit[0];nowPosX[1]=((fx.end[1]-fx.start[1])*fx.pos)+fx.start[1]+fx.unit[1];fx.elem.style.backgroundPosition=nowPosX[0]+' '+nowPosX[1];function toArray(strg){strg=strg.replace(/left|top/g,'0px');strg=strg.replace(/right|bottom/g,'100%');strg=strg.replace(/([0-9\.]+)(\s|\)|$)/g,"$1px$2");var res=strg.match(/(-?[0-9\.]+)(px|\%|em|pt)\s(-?[0-9\.]+)(px|\%|em|pt)/);return[parseFloat(res[1],10),res[2],parseFloat(res[3],10),res[4]];}}});})(jQuery);jQuery(function(){jQuery('#menuTopL1 UL LI A').not('.current').css({backgroundPosition:"0 0"}).mouseover(function(){$(this).stop().animate({backgroundPosition:"(0 -250px)"},{duration:500})}).mouseout(function(){$(this).stop().animate({backgroundPosition:"(0 0)"},{duration:500})});jQuery('.Top').append('<a href="https://www.facebook.com/people/CiaoPizza-Apes-PizzaPress/100002721842366" class="socialink" target="_blank">&nbsp;</a>');});var libs=ff.hash();var struct=ff.hash();struct.fields=ff.hash();ff.initFF({"site_path":"","theme":"site","language":"ITA","layer":"gallery","phpsession":{"name":"","value":""},"struct":struct,"libs":libs});jQuery(document).ready(function(){ff.pluginLoad("ff.ajax","/themes/library/ff/ajax.js",function(){ff.injectCSS("jqueryuicore","/themes/library/jquery.ui/themes/yellowpizza/jquery.ui.core.css",function(){ff.injectCSS("jqueryuitheme","/themes/library/jquery.ui/themes/yellowpizza/jquery.ui.theme.css",function(){ff.injectCSS("jqueryuidialog","/themes/library/jquery.ui/themes/yellowpizza/jquery.ui.dialog.css",function(){ff.injectCSS("jqueryuiresizable","/themes/library/jquery.ui/themes/yellowpizza/jquery.ui.resizable.css");ff.pluginLoad("jquery.ui","/themes/library/jquery.ui/jquery.ui.js",function(){ff.pluginLoad("ff.ffPage.dialog","/themes/restricted/ff/ffPage/widgets/dialog/dialog.js");});});});});});});jQuery(document).ready(function(){ff.pluginAddInit("ff.ffPage.dialog",function(){ff.ffPage.dialog.addDialog({"id":"dialogManage","callback":"","url":"","resizable":true,"position":"center","draggable":true,"title":"","doredirects":true});});});jQuery(document).ready(function(){ff.pluginAddInit("ff.ffPage.dialog",function(){ff.ffPage.dialog.addDialog({"id":"dialogManage","callback":"","url":"","resizable":true,"position":"center","draggable":true,"title":"","doredirects":true});});});
