
jQuery.fn.dialog=function(settings){return $(this).each(function(){$(this).click(function(e){ccm_dialogOpen=1;options=jQuery.fn.dialog.getOptions(settings,$(this));jQuery.fn.dialog._create(options);$(this).blur();return false;});});}
var ccm_dialogOpen=0;jQuery.fn.dialog._create=function(opts){jQuery.fn.dialog.overlay(opts);jQuery.fn.dialog.showLoader(opts);jQuery.fn.dialog.position(opts);jQuery.fn.dialog.loadShell(opts);if(jQuery.fn.dialog.totalDialogs>0){jQuery.fn.dialog.deactivate(jQuery.fn.dialog.totalDialogs-1);}
jQuery.fn.dialog.load(opts);jQuery.fn.dialog.dialogs.push(opts);jQuery.fn.dialog.totalDialogs++;}
jQuery.fn.dialog.open=function(settings){options=jQuery.fn.dialog.getOptions(settings);jQuery.fn.dialog._create(options);}
jQuery.fn.dialog.replaceTop=function(html){var num=jQuery.fn.dialog.totalDialogs-1;$("#ccm-dialog-content"+num).html(html);}
jQuery.fn.dialog.getOptions=function(settings,node){var options=jQuery.extend({},jQuery.fn.dialog.defaults,settings);if(typeof(node)!='undefined'){var _modal=node.attr('dialog-modal');var _width=node.attr('dialog-width');var _height=node.attr('dialog-height');var _title=node.attr('dialog-title');var _draggable=node.attr('dialog-draggable');var _element=node.attr('dialog-element');var href=node.attr('href');var onOpen=node.attr('dialog-on-open');var onClose=node.attr('dialog-on-close');var onDestroy=node.attr('dialog-on-destroy');var _replace=node.attr('dialog-replace');}
if(typeof(_replace)!='undefined'){options.replace=_replace;}
if(typeof(_element)!='undefined'){options.element=_element;}
if(typeof(_width)!='undefined'){options.width=_width;}
if(typeof(_height)!='undefined'){options.height=_height;}
if(typeof(_title)!='undefined'){options.title=_title;}
if(typeof(_modal)!='undefined'){options.modal=_modal;}
if(typeof(_draggable)!='undefined'){options.draggable=_draggable;}
if(typeof(onOpen)!='undefined'){options.onOpen=onOpen;}
if(typeof(onClose)!='undefined'){options.onClose=onClose;}
if(typeof(onDestroy)!='undefined'){options.onDestroy=onDestroy;}
options.modal=(options.modal=="true"||options.modal==true)?true:false;options.replace=(options.replace=="true"||options.replace==true)?true:false;options.draggable=(options.draggable=="true"||options.draggable==true)?true:false;options.href=href;if(typeof(settings)!='undefined'){if(settings.href!=null){options.href=settings.href;}}
if(typeof(options.width)=='string'){if(options.width.lastIndexOf('%')>-1){var mod="."+options.width.substring(0,options.width.lastIndexOf('%'));options.width=$(window).width()*mod;}}
if(typeof(options.height)=='string'){if(options.height.lastIndexOf('%')>-1){var mod="."+options.height.substring(0,options.height.lastIndexOf('%'));options.height=$(window).height()*mod;}}
options.n=jQuery.fn.dialog.totalDialogs;return options;}
jQuery.fn.dialog.isMacFF=function(fnd){var userAgent=navigator.userAgent.toLowerCase();if(userAgent.indexOf('mac')!=-1&&userAgent.indexOf('firefox')!=-1){return true;}}
jQuery.fn.dialog.getTotalOpen=function(){return jQuery.fn.dialog.totalDialogs;}
jQuery.fn.dialog.load=function(fnd){if(fnd.element!=null){jQuery.fn.dialog.position(fnd);jQuery.fn.dialog.hideLoader();$("#ccm-dialog-content"+fnd.n).append($(fnd.element));if($(fnd.element).css('display')=='none'){$(fnd.element).show();}
$("#ccm-dialog-content"+fnd.n+" .ccm-dialog-close").click(function(){jQuery.fn.dialog.close(fnd);});$("#ccm-dialog-content"+fnd.n+" .dialog-launch").dialog();}else{var qsi="?";if(fnd.href.indexOf('?')>-1){qsi='&';}
var durl=fnd.href+qsi+'random='+(new Date().getTime());$.ajax({type:'GET',url:durl,success:function(resp){jQuery.fn.dialog.position(fnd);jQuery.fn.dialog.hideLoader();$("#ccm-dialog-content"+fnd.n).html(resp);$("#ccm-dialog-content"+fnd.n+" .ccm-dialog-close").click(function(){jQuery.fn.dialog.close(fnd);});$("#ccm-dialog-content"+fnd.n+" .dialog-launch").dialog();if(typeof fnd.onOpen!="undefined"){if((typeof fnd.onOpen)=='function'){fnd.onOpen();}else{eval(fnd.onOpen);}}}});}
if(typeof(fnd.onLoad)=='function'){fnd.onLoad();}}
jQuery.fn.dialog.hideLoader=function(){$("#ccm-dialog-loader-wrapper").hide();}
jQuery.fn.dialog.showLoader=function(fnd){if(typeof(imgLoader)=='undefined'||!imgLoader||!imgLoader.src)return false;if($('#ccm-dialog-loader').length<1){$("body").append("<div id='ccm-dialog-loader-wrapper'><img id='ccm-dialog-loader' src='"+imgLoader.src+"' /></div>");}
$('#ccm-dialog-loader-wrapper').css('opacity',0.8);$('#ccm-dialog-loader-wrapper').show();}
jQuery.fn.dialog.deactivate=function(w){$("#ccm-dialog-window"+w).css('z-index','6');}
jQuery.fn.dialog.activate=function(w){var obj=jQuery.fn.dialog.dialogs[w];$("#ccm-dialog-window"+w).css('z-index',obj.realZ);}
jQuery.fn.dialog.close=function(fnd){jQuery.fn.dialog.totalDialogs--;jQuery.fn.dialog.dialogs.splice(jQuery.fn.dialog.totalDialogs,1);$("#TB_imageOff").unbind("click");$("#TB_closeWindowButton"+fnd.n).unbind("click");if(typeof fnd.onClose!="undefined"){if((typeof fnd.onClose)=='function'){fnd.onClose();}else{eval(fnd.onClose);}}
if(fnd.onDestroy=="undefined"&&ccm_animEffects){$("#ccm-dialog-window"+jQuery.fn.dialog.totalDialogs).fadeOut("fast",function(){$('#ccm-dialog-window'+jQuery.fn.dialog.totalDialogs).remove();});}else{$("#ccm-dialog-window"+jQuery.fn.dialog.totalDialogs).hide();$('#ccm-dialog-window'+jQuery.fn.dialog.totalDialogs).remove();}
if(jQuery.fn.dialog.totalDialogs==0){$("#TB_HideSelect").trigger("unload").unbind().remove();$("div."+fnd.wrapperClass).remove();if(ccm_initialSiteActivated){ccm_activateSite();}
if(!ccm_initialHeaderDeactivated&&typeof(ccm_initialHeaderDeactivated)=='function'){ccm_activateHeader();}}else{jQuery.fn.dialog.activate(jQuery.fn.dialog.totalDialogs-1);}
ccm_dialogOpen=0;if(typeof fnd.onDestroy!="undefined"){if((typeof fnd.onDestroy)=='function'){fnd.onDestroy();}else{eval(fnd.onDestroy);}}}
jQuery.fn.dialog.position=function(fnd){fnd.modifiedWidth=parseInt(fnd.width)+30;fnd.modifiedHeight=parseInt(fnd.height)+40;fnd.contentWidth=fnd.modifiedWidth-44;if(ccm_dialogSkinMode=='basic'){fnd.contentWidth=fnd.contentWidth+24;}else if(ccm_dialogSkinMode=='v2'){fnd.contentWidth=fnd.contentWidth+26;}
fnd.contentHeight=fnd.modifiedHeight;$("#ccm-dialog-window"+fnd.n).css({marginLeft:'-'+parseInt((fnd.modifiedWidth/2),10)+'px',width:fnd.modifiedWidth+'px'});if(!(jQuery.browser.msie&&jQuery.browser.version<7)){$("#ccm-dialog-window"+fnd.n).css({marginTop:'-'+parseInt((fnd.contentHeight/2),10)+'px'});}}
jQuery.fn.dialog.loadShell=function(fnd){var dragCursor="";if(fnd.draggable&&ccm_dialogCanDrag){dragCursor="style='cursor: move'";}
if(typeof(ccmi18n)=='undefined'){cwt='Close';}else{cwt=ccmi18n.closeWindow;}
if($("#ccm-dialog-window"+fnd.n).css("display")!="block"){if(fnd.modal==false){$("#ccm-dialog-window"+fnd.n).append("<div class='ccm-dialog-title-bar-l' "+dragCursor+"><div class='ccm-dialog-title-bar-r'><div class='ccm-dialog-title-bar' id='ccm-dialog-title-bar"+fnd.n+"'><div class='ccm-dialog-title' id='ccm-dialog-title"+fnd.n+"'>"+fnd.title+"</div><a href='javascript:void(0)' class='ccm-dialog-close'>"+cwt+"</a></div></div></div><div id='ccm-dialog-content-wrapper'><div class='ccm-dialog-content-l'><div class='ccm-dialog-content-r'><div class='ccm-dialog-content' id='ccm-dialog-content"+fnd.n+"' style='width:"+fnd.contentWidth+"px;height:"+fnd.contentHeight+"px'></div></div></div></div>");}else{$("#ccm-dialog-window"+fnd.n).append("<div class='ccm-dialog-title-bar-l' "+dragCursor+"><div class='ccm-dialog-title-bar-r'><div class='ccm-dialog-title-bar' id='ccm-dialog-title-bar"+fnd.n+"'><div class='ccm-dialog-title' id='ccm-dialog-title"+fnd.n+"'>"+fnd.title+"</div></div></div></div><div id='ccm-dialog-content-wrapper'><div class='ccm-dialog-content-l'><div class='ccm-dialog-content-r'><div class='ccm-dialog-content' id='ccm-dialog-content"+fnd.n+"' class='TB_modal' style='width:"+fnd.contentWidth+"px;height:"+fnd.contentHeight+"px;'>");}}else{$("#ccm-dialog-content"+fnd.n)[0].style.width=fnd.contentWidth+"px";$("#ccm-dialog-content"+fnd.n)[0].style.height=fnd.contentHeight+"px";$("#ccm-dialog-content"+fnd.n)[0].scrollTop=0;$("#ccm-dialog-title"+fnd.n).html(fnd.title);}
$("#ccm-dialog-window"+fnd.n+" .ccm-dialog-close").click(function(){jQuery.fn.dialog.close(fnd);});$("#ccm-dialog-window"+fnd.n).append("<div class='ccm-dialog-content-bl'><div class='ccm-dialog-content-br'><div class='ccm-dialog-content-b'></div></div></div>");$("#ccm-dialog-window"+fnd.n).append("</div>");$("#ccm-dialog-window"+fnd.n).show();if(fnd.draggable&&ccm_dialogCanDrag){$("#ccm-dialog-window"+fnd.n).draggable({'handle':$('#ccm-dialog-title-bar'+fnd.n)});}}
jQuery.fn.dialog.overlay=function(fnd){if(fnd.n==0){if(ccm_uiLoaded){ccm_initialHeaderDeactivated=ccm_topPaneDeactivated;}
ccm_initialSiteActivated=ccm_siteActivated;}
if(ccm_uiLoaded){ccm_hideMenus();ccm_deactivateHeader();}
ccm_deactivateSite();if(fnd.zIndex){sz=fnd.zIndex+fnd.n;}else{sz=jQuery.fn.dialog.startZindex+fnd.n;}
if(ccm_dialogSkinMode=='v2'){var transparentClass='ccm-dialog-window-transparent-v2';}else if(ccm_dialogSkinMode=='transparent'){var transparentClass='ccm-dialog-window-transparent';}else{var transparentClass='ccm-dialog-window-no-transparent';}
fnd.realZ=sz;$("body").append("<div class=\""+fnd.wrapperClass+" "+transparentClass+" \"><div class='ccm-dialog-window' id='ccm-dialog-window"+fnd.n+"' style='display: none; z-index: "+sz+"'></div>");if(jQuery.fn.dialog.isMacFF(fnd)){$("#TB_overlay"+fnd.n).addClass("TB_overlayMacFFBGHack");}else{$("#TB_overlay"+fnd.n).addClass("TB_overlayBG");}}
jQuery.fn.dialog.closeTop=function(){var obj=jQuery.fn.dialog.dialogs[jQuery.fn.dialog.totalDialogs-1];if(obj)jQuery.fn.dialog.close(obj);}
jQuery.fn.dialog.defaults={modal:true,width:500,height:500,wrapperClass:'ccm-dialog-window-wrapper',draggable:true,replace:false,title:'CCM Dialog',href:null};jQuery.fn.dialog.totalDialogs=0;jQuery.fn.dialog.dialogs=new Array();jQuery.fn.dialog.startZindex=202;jQuery.fn.dialog.loaderImage=CCM_IMAGE_PATH+"/throbber_white_32.gif";var ccm_initialHeaderDeactivated;var ccm_initialOverlay;var ccm_dialogCanDrag=(typeof($.fn.draggable)=='function'&&(!jQuery.browser.safari));var ccm_dialogSkinMode='v2';if(jQuery.browser.msie){var ccm_dialogSkinMode='transparent';if(jQuery.browser.version.substring(0,1)==6){var ccm_dialogSkinMode='basic';}}
var imgLoader;var ccmAlert={notice:function(title,message,onCloseFn){$.fn.dialog.open({href:CCM_TOOLS_PATH+'/alert',title:title,width:320,height:160,modal:false,onOpen:function(){$("#ccm-popup-alert-message").html(message);},onDestroy:onCloseFn});},hud:function(message,time,icon,title){if($('#ccm-notification-inner').length==0){$(document.body).append('<div id="ccm-notification"><div id="ccm-notification-inner"></div></div>');}
if(icon==null){icon='edit_small';}
if(title==null){var messageText=message;}else{var messageText='<h3>'+title+'</h3>'+message;}
$('#ccm-notification-inner').html('<table border="0" cellspacing="0" cellpadding="0"><tr><td valign="top"><img id="ccm-notification-icon" src="'+CCM_IMAGE_PATH+'/icons/'+icon+'.png" width="16" height="16" /></td><td valign="top">'+messageText+'</td></tr></table>');$('#ccm-notification').fadeIn({easing:'easeInQuart',duration:100});if(time>0){setTimeout(function(){$('#ccm-notification').fadeOut({easing:'easeOutExpo',duration:800});},time);}}}
$(document).ready(function(){imgLoader=new Image();imgLoader.src=jQuery.fn.dialog.loaderImage;$(document.body).keypress(function(e){if(e.keyCode==27&&jQuery.fn.dialog.totalDialogs>0){var obj=jQuery.fn.dialog.dialogs[jQuery.fn.dialog.totalDialogs-1];if(!obj.modal){jQuery.fn.dialog.closeTop();}}});if(ccm_dialogSkinMode=='transparent'){i1=new Image();i1.src=CCM_IMAGE_PATH+"/bg_dialog_br.png";i2=new Image();i2.src=CCM_IMAGE_PATH+"/bg_dialog_b.png";i3=new Image();i3.src=CCM_IMAGE_PATH+"/bg_dialog_bl.png";i4=new Image();i4.src=CCM_IMAGE_PATH+"/bg_dialog_r.png";i5=new Image();i5.src=CCM_IMAGE_PATH+"/bg_dialog_l.png";i6=new Image();i6.src=CCM_IMAGE_PATH+"/bg_dialog_tr.png";i7=new Image();i7.src=CCM_IMAGE_PATH+"/bg_dialog_t.png";i8=new Image();i8.src=CCM_IMAGE_PATH+"/bg_dialog_tl.png";}});;(function($){var CStyle=function(element,pseudoElement){if(window.getComputedStyle){return window.getComputedStyle(element,pseudoElement)}else{return element.currentStyle}};var width=function(element){var width=CStyle(element).width;if(width=="auto"||width.indexOf("px")<0){return $(element).width()}else{return parseFloat(width)}};window.Elastic=function Elastic(context){var r,ra,i,j,k,l,il,jl,kl,ll,econs,econ,econw,econclass,ecols,ecol,ecolclass,eg,egml,egcl,egnl,ecrw,ecw,escol,rp,ig,efcs,efcsw,eecs,eecsw,eecw,eecrw,ecs,ecsw,ec,ecclass,eecfw,ecolminw,ecolmaxw,egreg=/(^|\s+)on\-(\d+)(\s+|$)/,esreg=/(^|\s+)span\-(\d+)(\s+|$)/,eareg=/(^|\s+)adaptive\-(\d+)\-(\d+)(\s+|$)/;eg=[];egcl=egnl=0;econs=$.find(".columns",context);for(i=0,il=econs.length;i<il;i++){econ=econs[i];econclass=econ.className;if(econclass.indexOf("on-")>-1&&egreg.test(econclass)){egml=Number(RegExp.$2)}else{egml=$.find("> .column, > .container > .column",econ).length}econ=$.find("> .container",econ)[0]||econ;econw=width(econ);ecrw=econw/egml;ecw=Math.round(ecrw);if(econclass.indexOf("adaptive-")>-1&&eareg.test(econclass)){ecolminw=Number(RegExp.$2);ecolmaxw=Number(RegExp.$3);if(ecw>ecolmaxw){while(ecw>ecolmaxw){egml=egml+1;ecrw=econw/egml;ecw=Math.round(ecrw)}}else{if(ecw<ecolminw){while(ecw<ecolminw){egml=egml-1;ecrw=econw/egml;ecw=Math.round(ecrw)}}}}ecols=$.find("> .column",econ);for(j=0,jl=ecols.length;j<jl;j++){efcs=[];eecs=[];ecs=[];rp=ig=efcsw=ecsw=0;ecol=ecols[j];ecolclass=ecol.className;escol=1;if(ecolclass.indexOf("span-")>-1&&esreg.test(ecolclass)){escol=Number(RegExp.$2)}ecol.escol=escol=((escol<=egml)?escol:egml);egnl+=escol;if(egnl==egml||j==(jl-1)||ecolclass.indexOf("final")>-1){eg.push(ecol);egcl=0;rp=1}else{if(egnl<egml){eg.push(ecol);egcl=egnl}else{if(egnl>egml){egcl=escol;rp=1;ig=1}}}if(rp){for(k=0,kl=eg.length;k<kl;k++){ec=eg[k];ecclass=ec.className;if(ecclass.indexOf("fixed")>-1){efcs.push(ec);efcsw+=width(ec)}else{if(ecclass.indexOf("elastic")>-1){eecs.push(ec)}else{ecs.push(ec);if(ec==eg[kl-1]){ec.style.width=Math.round(ecrw*ec.escol)+"px"}else{ec.style.width=Math.round(ecw*ec.escol)+"px"}ecsw=ecsw+width(ec)}}}ll=eecs.length;if(ll>0){eecfw=econw-(ecsw+efcsw);if(eecfw<=0){continue}eecrw=eecfw/ll;eecw=Math.round(eecrw);eecsw=eecw*ll;for(l=0;l<ll;l++){eecs[l].style.width=eecw+"px"}if(eecsw>eecfw){ra=eecsw-eecfw+1;for(r=1;r<ra;r++){eecs[eecs.length-r].style.width=(eecw-1)+"px"}}else{if(eecsw<eecfw){ra=eecfw-eecsw+1;for(r=1;r<ra;r++){eecs[eecs.length-r].style.width=(eecw+1)+"px"}}}var tcw=0;for(var f=0;f<ll-1;f++){tcw+=Number(eecs[f].style.width.replace("px",""))}eecs[ll-1].style.width=(econw-(ecsw+efcsw+(tcw)))+"px"}else{if(ecol.escol==egml&&efcs.length===0){ecol.style.width=econw+"px"}else{if(ecs.length>0&&efcs.length===0&&egnl==egml){if(ecsw>econw){ra=ecsw-econw+1;for(r=1;r<ra;r++){ecs[ecs.length-r].style.width=((ecw-1)*ecs[ecs.length-r].escol)+"px"}}else{if(ecsw<econw){ra=econw-ecsw+1;for(r=1;r<ra;r++){ecs[ecs.length-r].style.width=((ecw+1)*ecs[ecs.length-r].escol)+"px"}}}var tcw=0;for(var f=0;f<ecs.length-1;f++){tcw+=Number(ecs[f].style.width.replace("px",""))}ec.style.width=(econw-(tcw))+"px"}else{if(egnl<egml&&ecolclass.indexOf("final")>-1){ecol.style["margin"+((econclass.indexOf("inverted")>-1)?"Left":"Right")]=(econw-ecsw-efcsw)+"px"}}}}eg=[];egnl=0}if(ig){eg=[ecol];egnl=escol}}}for(i in Elastic.helpers){if(Elastic.helpers.hasOwnProperty(i)){Elastic.helpers[i](context)}}};var Elastic=window.Elastic;Elastic.version="2.0.3";Elastic.reset=function Elastic_reset(context){var doc=$(document);doc.trigger("elastic:beforeReset");var i,w,wl,h,hl,p,pl,m,ml;h=$.find(".same-height > *, .full-height, .elastic-height",context);for(i=0,hl=h.length;i<hl;i++){h[i].style.height=""}p=$.find(".vertical-center, .center, .bottom",context);for(i=0,pl=p.length;i<pl;i++){p[i].parentNode.style.paddingTop="";p[i].parentNode.style.height=""}w=$.find(".column:not(.fixed), .full-width",context);for(i=0,wl=w.length;i<wl;i++){w[i].style.width=""}m=$.find(".column.final",context);for(i=0,ml=m.length;i<ml;i++){m[i].style.marginLeft="";m[i].style.marginRight=""}doc.trigger("elastic:reset")};Elastic.refresh=function Elastic_refresh(context){var doc=$(document);doc.trigger("elastic:beforeRefresh");Elastic.reset(context);Elastic(context);doc.trigger("elastic:refresh")};Elastic.configuration={refreshOnResize:true};Elastic.helpers={"full-width":function Elastic_helper_fullWidth(context){var i,$el;var els=$.find(".full-width",context);var elsl=els.length;for(i=0;i<elsl;i++){$el=$(els[i]);$el.width($el.parent().width()-($el.outerWidth(true)-$el.width()))}},"same-height":function Elastic_helper_sameHeight(context){$(".same-height",context).each(function(){var columns=$("> *",this);var maxHeight=0;columns.each(function(){var currentHeight=$(this).outerHeight(true);maxHeight=(maxHeight>currentHeight)?maxHeight:currentHeight}).each(function(){$(this).css("height",maxHeight)})})},"full-height":function Elastic_helper_fullHeight(context){$(".full-height",context).each(function(){var _this=$(this);_this.css("height",$(this.parentNode).height()-(_this.outerHeight(true)-_this.height()))})},"elastic-height":function Elastic_helper_elasticHeight(context){$(".elastic-height",context).each(function(){var _this=$(this);var h=0;$("> *:not(.elastic-height)",this.parentNode).each(function(){h+=$(this).outerHeight(true)});_this.css("height",Math.round(_this.parent().height()-h));Elastic.refresh(this)})},"center":function Elastic_helper_center(context){$(".vertical-center, .center",context).each(function(){var parentNode=$(this.parentNode);var paddingTop=Math.round((parentNode.height()-$(this).outerHeight(true))/2);parentNode.css({paddingTop:paddingTop+"px",height:(parentNode.css("height"))?(parentNode.outerHeight()-paddingTop):""})})},"bottom":function Elastic_helper_bottom(context){$(".bottom",context).each(function(){var parentNode=$(this.parentNode);var paddingTop=Math.round(parentNode.height()-$(this).outerHeight(true));parentNode.css({paddingTop:paddingTop+"px",height:(parentNode.css("height"))?(parentNode.outerHeight()-paddingTop):""})})}};$(document).bind("elastic:beforeInitialize",function(){var r=/(^|\s+)display\s+([\w\_\-\d]+)(\s+|$)/;$(".display").each(function Elastic_layout(){r.test(this.className);var c=".position-"+RegExp.$2;$(c).removeClass(c).appendTo(this)})})})(jQuery);jQuery(window).bind("load",function(){var doc=jQuery(document);var iw=document.body.clientWidth;doc.trigger("elastic:beforeInitialize");Elastic();if(iw!=document.body.clientWidth){Elastic.refresh()}jQuery(window).bind("resize",function Elastic_resizeHandler(){if(Elastic.configuration.refreshOnResize){Elastic.refresh()}});doc.bind("elastic",Elastic.refresh);doc.trigger("elastic:initialize")});;;var CCM_DISPATCHER_FILENAME='/index.php';var CCM_CID=1;var CCM_EDIT_MODE=false;var CCM_ARRANGE_MODE=false;var CCM_IMAGE_PATH="/concrete/images";var CCM_TOOLS_PATH="/index.php/tools/required";var CCM_REL="";var ccmSlideShowHelper123={bID:123,imgNum:0,init:function(){this.displayWrap=$('#ccm-SlideshowBlock-display'+this.bID);if(this.imgInfos.length==0){return false;}
var maxHeight=0;for(var i=0;i<this.imgInfos.length;i++){this.addImg(i);if(maxHeight==0||this.imgInfos[i].imgHeight>maxHeight)
maxHeight=this.imgInfos[i].imgHeight;}
this.displayWrap.css('height',maxHeight);for(var i=0;i<this.imgInfos.length;i++){if(this.imgInfos[i].imgHeight<maxHeight){var t=((maxHeight-this.imgInfos[i].imgHeight)/2);this.imgEls[i].css('top',t);}}
this.nextImg();},nextImg:function(){if(this.imgNum>=this.imgInfos.length)this.imgNum=0;this.imgEls[this.imgNum].css('opacity',0);this.imgEls[this.imgNum].css('display','block');this.imgEls[this.imgNum].animate({opacity:1},this.imgInfos[this.imgNum].fadeDuration*1000,'',function(){ccmSlideShowHelper123.preparefadeOut()});var prevNum=this.imgNum-1;if(prevNum<0)prevNum=this.imgInfos.length-1;if(this.imgInfos.length==1)return;this.imgEls[prevNum].animate({opacity:0},this.imgInfos[this.imgNum].fadeDuration*800,function(){this.style.zIndex=1;});},preparefadeOut:function(){if(this.imgInfos.length==1)return;var milisecDuration=parseInt(this.imgInfos[this.imgNum].duration)*1000;this.imgEls[this.imgNum].css('z-index',2);setTimeout('ccmSlideShowHelper'+123+'.nextImg();',milisecDuration);this.imgNum++;},maxHeight:0,imgEls:[],addImg:function(num){var el=document.createElement('div');el.id="slideImgWrap"+num;el.className="slideImgWrap";if(this.imgInfos[num].fullFilePath.length>0)
imgURL=this.imgInfos[num].fullFilePath;else imgURL='/files/'+this.imgInfos[num].fileName;el.innerHTML='<div style="height:'+this.imgInfos[num].imgHeight+'px; background:url(\''+escape(imgURL)+'\') center no-repeat">&nbsp;</div>';if(this.imgInfos[num].url.length>0){var clickEvent='onclick="return ccmSlideShowHelper123.imgClick( this.href  );"';el.innerHTML='<a href="'+this.imgInfos[num].url+'" '+clickEvent+' >'+el.innerHTML+'</a>';}
el.style.display='none';this.displayWrap.append(el);var jqEl=$(el);this.imgEls.push(jqEl);},imgClick:function(linkURL){},imgInfos:[{fileName:"choklad.jpg",fullFilePath:"/files/2513/0065/9144/choklad.jpg",duration:3,fadeDuration:2,url:"/files/2513/0065/9144/choklad.jpg",groupSet:0,imgHeight:152},{fileName:"chokladbonor.jpg",fullFilePath:"/files/6013/0065/9146/chokladbonor.jpg",duration:3,fadeDuration:2,url:"/files/6013/0065/9146/chokladbonor.jpg",groupSet:0,imgHeight:152},{fileName:"chokladdjungel.jpg",fullFilePath:"/files/9813/0065/9148/chokladdjungel.jpg",duration:3,fadeDuration:2,url:"/files/9813/0065/9148/chokladdjungel.jpg",groupSet:0,imgHeight:152},{fileName:"chokladdrycksprovning.jpg",fullFilePath:"/files/6013/0065/9150/chokladdrycksprovning.jpg",duration:3,fadeDuration:2,url:"/files/6013/0065/9150/chokladdrycksprovning.jpg",groupSet:0,imgHeight:152},{fileName:"pralinskolan2.jpg",fullFilePath:"/files/9113/0065/9488/pralinskolan2.jpg",duration:3,fadeDuration:2,url:"/files/9113/0065/9488/pralinskolan2.jpg",groupSet:0,imgHeight:152}]}
$(function(){ccmSlideShowHelper123.init();});
