// source --> https://tritiumsystems.cz/wp-content/plugins/contact-form-maker/js/main_div_front_end.js?ver=cfm-2.13.11 F=2; var c; var a=new Array(); var rated=false; function set_total_value(form_id) { var FormCurrency = eval("FormCurrency_" + form_id); if(jQuery('.paypal_total'+form_id).length==0) return; var div_paypal_show= jQuery('.paypal_total'+form_id); var div_paypal_products = jQuery('.paypal_products'+form_id); var div_paypal_tax = jQuery('.paypal_tax'+form_id); var input_paypal_total = jQuery('.input_paypal_total'+form_id); var total=0; var total_shipping=0; div_paypal_products.html(''); div_paypal_tax.html(''); n=parseInt(jQuery('#counter'+form_id).val()); jQuery("div[type='type_paypal_checkbox'], div[type='type_paypal_radio']").each( function() { id=jQuery(this).parent().attr('wdid'); jQuery(this).find('input:checked').each( function() { label= jQuery("label[for='"+jQuery(this).attr('id')+"']").html(); span_value = FormCurrency + jQuery(this).val()+(jQuery('#wdform_'+id+"_element_quantity"+form_id).length!=0 ? ' x'+jQuery('#wdform_'+id+"_element_quantity"+form_id).val() : ''); total =total + jQuery(this).val() * parseInt((jQuery('#wdform_'+id+"_element_quantity"+form_id).length!=0 ? jQuery('#wdform_'+id+"_element_quantity"+form_id).val() : 1)); div_paypal_products.html(div_paypal_products.html()+"
"+label+ ' - '+ span_value+"
"); } ); } ); jQuery("div[type='type_paypal_shipping']").each( function() { id=jQuery(this).parent().attr('wdid'); jQuery(this).find('input:checked').each( function() { label= jQuery("label[for='"+jQuery(this).attr('id')+"']").html(); span_value = FormCurrency + jQuery(this).val()+(jQuery('#wdform_'+id+"_element_quantity"+form_id).length!=0 ? ' x'+jQuery('#wdform_'+id+"_element_quantity"+form_id).val() : ''); total_shipping =total_shipping + jQuery(this).val() * parseInt((jQuery('#wdform_'+id+"_element_quantity"+form_id).length!=0 ? jQuery('#wdform_'+id+"_element_quantity"+form_id).val() : 1)); div_paypal_products.html(div_paypal_products.html()+"
"+label+ ' - '+ span_value+"
"); } ); } ); jQuery("div[type='type_paypal_select']").each( function() { id=jQuery(this).parent().attr('wdid'); if(jQuery(this).find('select').val()!='') { label = jQuery(this).find('select option:selected').html(); span_value = FormCurrency + jQuery(this).find('select').val()+(jQuery('#wdform_'+id+"_element_quantity"+form_id).length!=0 ? ' x'+jQuery('#wdform_'+id+"_element_quantity"+form_id).val() : ''); total =total + jQuery(this).find('select').val() * parseInt((jQuery('#wdform_'+id+"_element_quantity"+form_id).length!=0 ? jQuery('#wdform_'+id+"_element_quantity"+form_id).val() : 1)); div_paypal_products.html(div_paypal_products.html()+"
"+label+ ' - '+ span_value+"
"); } } ); jQuery("div[type='type_paypal_price']").each( function() { id=jQuery(this).parent().attr('wdid'); if(jQuery('#wdform_'+id+"_element_dollars"+form_id).hasClass('input_active') || jQuery('#wdform_'+id+"_element_cents"+form_id).hasClass('input_active')) { label= jQuery(this).find('.wdform-label').html(); cents='00'; dollars='0'; if( jQuery('#wdform_'+id+"_element_dollars"+form_id).hasClass('input_active')) if(jQuery('#wdform_'+id+"_element_dollars"+form_id).val()!='') dollars=jQuery('#wdform_'+id+"_element_dollars"+form_id).val(); if( jQuery('#wdform_'+id+"_element_cents"+form_id).hasClass('input_active') && jQuery('#wdform_'+id+"_element_cents"+form_id).val()!='') if(jQuery('#wdform_'+id+"_element_cents"+form_id).val().length==1) cents='0'+jQuery('#wdform_'+id+"_element_cents"+form_id).val(); else cents=jQuery('#wdform_'+id+"_element_cents"+form_id).val(); span_value = FormCurrency + dollars+'.'+cents; total =total + parseFloat(dollars+'.'+cents); div_paypal_products.html(div_paypal_products.html()+"
"+label+ ' - '+ span_value+"
"); } } ); var FormPaypalTax = eval("FormPaypalTax_" + form_id); if(FormPaypalTax != 0) div_paypal_tax.html('Tax: ' + FormCurrency + (((total)*FormPaypalTax) / 100).toFixed(2)); jQuery('.div_total'+form_id).html(FormCurrency + (parseFloat((total *(1+FormPaypalTax/100)).toFixed(2))+total_shipping).toFixed(2)); input_paypal_total.val(FormCurrency + (parseFloat((total *(1+FormPaypalTax/100)).toFixed(2))+total_shipping).toFixed(2)) ; } function check_isnum_or_minus(e) { var chCode1 = e.which || e.keyCode; if (chCode1 != 45 ) { if (chCode1 > 31 && (chCode1 < 48 || chCode1 > 57)) return false; } return true; } function sum_grading_values(num,form_id){ var sum = 0; for(var k=0; k<100;k++) { if(document.getElementById(num+'_element'+form_id+'_'+k)) if(document.getElementById(num+'_element'+form_id+'_'+k).value) { sum = sum+parseInt(document.getElementById(num+'_element'+form_id+'_'+k).value); } if(document.getElementById(num+'_total_element'+form_id)){ if(sum > document.getElementById(num+'_total_element'+form_id).innerHTML){ document.getElementById(num+'_text_element'+form_id).innerHTML =" "+ WDF_GRADING_TEXT+" " + document.getElementById(num+'_total_element'+form_id).innerHTML; } else{ document.getElementById(num+'_text_element'+form_id).innerHTML=""; } } } if(document.getElementById(num+'_sum_element'+form_id)) document.getElementById(num+'_sum_element'+form_id).innerHTML = sum; } function change_src(id,el_id,form_id,color){ if(rated==false){ for(var j=0;j<=id;j++) document.getElementById(el_id+'_star_'+j+'_'+form_id).src=fm_objectL10n.plugin_url+"/images/star_"+color+'.png'; } } function reset_src(id,el_id, form_id){ if(rated==false){ for(var j=0;j<=id;j++) document.getElementById(el_id+'_star_'+j+'_'+form_id).src=fm_objectL10n.plugin_url+"/images/star.png"; } } function select_star_rating(id,el_id,form_id, color,star_amount) { rated=true; for(var j=0;j<=id;j++) document.getElementById(el_id+'_star_'+j+'_'+form_id).src=fm_objectL10n.plugin_url+"/images/star_"+color+".png"; for(var k=id+1;k<=star_amount-1;k++) document.getElementById(el_id+'_star_'+k+'_'+form_id).src=fm_objectL10n.plugin_url+"/images/star.png"; document.getElementById(el_id+'_selected_star_amount'+form_id).value=id+1; } function show_other_input(num, form_id) { for(k=0;k<50;k++) if( document.getElementById(num+"_element"+form_id+k)) if( document.getElementById(num+"_element"+form_id+k).getAttribute('other')) if( document.getElementById(num+"_element"+form_id+k).getAttribute('other')==1) { element_other=document.getElementById(num+"_element"+form_id+k); break; } parent_=element_other.parentNode; var br = document.createElement('br'); br.setAttribute("id", num+"_other_br"+form_id); var el_other = document.createElement('input'); el_other.setAttribute("id", num+"_other_input"+form_id); el_other.setAttribute("name", num+"_other_input"+form_id); el_other.setAttribute("type", "text"); el_other.setAttribute("class", "other_input"); parent_.appendChild(br); parent_.appendChild(el_other); } function check_isnum(e) { var chCode1 = e.which || e.keyCode; if ( jQuery.inArray(chCode1,[46,8,9,27,13,190]) != -1 || e.ctrlKey === true || (chCode1 >= 35 && chCode1 < 39)) return true; if (chCode1 > 31 && (chCode1 < 48 || chCode1 > 57)) return false; return true; } function captcha_refresh(id,genid) { srcArr=document.getElementById(id+genid).src.split("&r="); document.getElementById(id+genid).src=srcArr[0]+'&r='+Math.floor(Math.random()*100); document.getElementById(id+"_input"+genid).value=''; document.getElementById(id+genid).style.display="inline-block"; } function set_checked(id,j,form_id) { checking=document.getElementById(id+"_element"+form_id+j); if(checking.getAttribute('other')) if(checking.getAttribute('other')==1) if(!checking.checked) { if(document.getElementById(id+"_other_input"+form_id)) { document.getElementById(id+"_other_input"+form_id).parentNode.removeChild(document.getElementById(id+"_other_br"+form_id)); document.getElementById(id+"_other_input"+form_id).parentNode.removeChild(document.getElementById(id+"_other_input"+form_id)); } return false; } return true; } function set_default(id, j, form_id){ if(document.getElementById(id+"_other_input"+form_id)) { document.getElementById(id+"_other_input"+form_id).parentNode.removeChild(document.getElementById(id+"_other_br"+form_id)); document.getElementById(id+"_other_input"+form_id).parentNode.removeChild(document.getElementById(id+"_other_input"+form_id)); } } function add_0(x) { if(jQuery(x).val().length==1) jQuery(x).val('0'+jQuery(x).val()); } function check_hour(e, id, hour_interval) { var chCode1 = e.which || e.keyCode; if (chCode1 > 31 && (chCode1 < 48 || chCode1 > 57)) return false; hour=""+document.getElementById(id).value+String.fromCharCode(chCode1); hour=parseFloat(hour); if((hour<0) || (hour>hour_interval)) return false; return true; } function check_minute(e, id) { var chCode1 = e.which || e.keyCode; if (chCode1 > 31 && (chCode1 < 48 || chCode1 > 57)) return false; minute=""+document.getElementById(id).value+String.fromCharCode(chCode1); minute=parseFloat(minute); if((minute<0) || (minute>59)) return false; return true; } function check_second(e, id) { var chCode1 = e.which || e.keyCode; if (chCode1 > 31 && (chCode1 < 48 || chCode1 > 57)) return false; second=""+document.getElementById(id).value+String.fromCharCode(chCode1); second=parseFloat(second); if((second<0) || (second>59)) return false; return true; } function check_isnum_interval(e, x, from, to) { var chCode1 = e.which || e.keyCode; if (jQuery.inArray(chCode1,[46,8,9,27,13,190]) != -1 || e.ctrlKey === true || (chCode1 >= 35 && chCode1 < 39)) { return true; } if (chCode1 > 31 && (chCode1 < 48 || chCode1 > 57)) { return false; } val1=""+jQuery(x).val()+String.fromCharCode(chCode1); if (val1.length>2) return false; if (val1=='00') return false; if ((val1to)) return false; return true; } function change_year(x) { year=jQuery(x).val(); from=parseFloat(jQuery(x).attr('from')); to=parseFloat(jQuery(x).attr('to')); year=parseFloat(year); if((year>=from) && (year<=to)) jQuery(x).val(year); else jQuery(x).val(''); } function check_day(e, x) { var chCode1 = e.which || e.keyCode; if (chCode1 > 31 && (chCode1 < 48 || chCode1 > 57)) return false; day=""+jQuery(x).val()+String.fromCharCode(chCode1); if(day.length>2) return false; if(day=='00') return false; day=parseFloat(day); if((day<0) || (day>31)) return false; return true; } function check_month(e, x) { var chCode1 = e.which || e.keyCode; if (chCode1 > 31 && (chCode1 < 48 || chCode1 > 57)) return false; month=""+jQuery(x).val()+String.fromCharCode(chCode1); if(month.length>2) return false; if(month=='00') return false; month=parseFloat(month); if((month<0) || (month>12)) return false; return true; } function check_year1(e, x) { var chCode1 = e.which || e.keyCode; if (chCode1 > 31 && (chCode1 < 48 || chCode1 > 57)) return false; year=""+jQuery(x).val()+String.fromCharCode(chCode1); to=parseFloat(jQuery(x).attr('to')); year=parseFloat(year); if(year>to) return false; return true; } function delete_value(x) { ofontStyle=jQuery(x).attr('class'); if(ofontStyle.indexOf("input_deactive")!=-1) { jQuery(x).val("").removeClass("input_deactive").addClass("input_active"); } } function return_value(x) { if(jQuery(x).val()=="") { jQuery(x).val(jQuery(x).attr('title')).removeClass("input_active").addClass("input_deactive"); } } function destroyChildren(node) { while (node.firstChild) node.removeChild(node.firstChild); } function generate_page_nav(id, form_id, form_view_count, form_view_max) { form_view=id; page_nav=document.getElementById(form_id+'page_nav'+id); destroyChildren(page_nav); form_view_elemet=document.getElementById(form_id+'form_view'+id); remove_whitespace(form_view_elemet.parentNode.parentNode); display_none_form_views_all(form_id); generate_page_bar(id, form_id, form_view_count, form_view_max); form_view_elemet.parentNode.style.display=""; var td = document.createElement("div"); td.setAttribute("valign", "middle"); td.setAttribute("align", "left"); td.style.display="table-cell"; td.style.width="40%"; page_nav.appendChild(td); if(form_view_elemet.parentNode.previousSibling && form_view_elemet.parentNode.previousSibling.previousSibling) { if(form_view_elemet.parentNode.previousSibling.tagName=="DIV") { table=form_view_elemet.parentNode.previousSibling; } else if(form_view_elemet.parentNode.previousSibling.previousSibling.tagName=="DIV") { table=form_view_elemet.parentNode.previousSibling.previousSibling; } else table="none"; if(table!="none") { if(!table.firstChild.tagName) table.removeChild(table.firstChild); previous_title = form_view_elemet.getAttribute('previous_title'); previous_type = form_view_elemet.getAttribute('previous_type'); if(previous_type=="text") td.setAttribute("class", "previous-page"); previous_class = form_view_elemet.getAttribute('previous_class'); previous_checkable = form_view_elemet.getAttribute('previous_checkable'); next_or_previous="previous"; previous=make_pagebreak_button(next_or_previous, previous_title, previous_type, previous_class, previous_checkable, id, form_id, form_view_count, form_view_max); td.appendChild(previous); } } var td = document.createElement("div"); td.setAttribute("id", form_id+"page_numbers"+form_view); td.setAttribute("valign", "middle"); td.setAttribute("class", "page-numbers"); td.setAttribute("align", "center"); td.style.display="table-cell"; if(document.getElementById(form_id+'pages').getAttribute('show_numbers')=="true") { k=0; for(j=1; j<=form_view_max; j++) { if(document.getElementById(form_id+'form_view'+j)) { k++; if(j==form_view) page_number=k; } } var cur = document.createElement('span'); cur.setAttribute("class", "page_numbers"); cur.innerHTML=page_number+'/'+k; td.appendChild(cur); } page_nav.appendChild(td); var td = document.createElement("div"); td.setAttribute("valign", "middle"); td.setAttribute("align", "right"); td.style.cssText = "display:table-cell; width:40%; text-align:right;"; page_nav.appendChild(td); not_next=false; if(form_view_elemet.parentNode.nextSibling) { if(form_view_elemet.parentNode.nextSibling.tagName=="DIV" && form_view_elemet.parentNode.nextSibling.className=="wdform-page-and-images") table=form_view_elemet.parentNode.nextSibling; else if(form_view_elemet.parentNode.nextSibling.nextSibling) { if(form_view_elemet.parentNode.nextSibling.nextSibling.tagName=="DIV") table=form_view_elemet.parentNode.nextSibling.nextSibling; else table="none"; } else table="none"; if(table!="none") { next_title =form_view_elemet.getAttribute('next_title'); next_type =form_view_elemet.getAttribute('next_type'); if(next_type=="text") td.setAttribute("class", "next-page"); next_class =form_view_elemet.getAttribute('next_class'); next_checkable =form_view_elemet.getAttribute('next_checkable'); next_or_previous="next"; next=make_pagebreak_button(next_or_previous, next_title, next_type, next_class, next_checkable, id, form_id, form_view_count, form_view_max); td.appendChild(next); } else { not_next=true; } } else { not_next=true; } jQuery("#form" + form_id + " div[type='type_map']").each( function() { id=jQuery(this).parent().attr('wdid'); if_gmap_init('wdform_'+id, form_id); for(q=0; q<20; q++) if(jQuery("#wdform_"+id+"_element"+form_id)[0].getAttribute("long"+q)) { w_long=parseFloat(document.getElementById('wdform_'+id+"_element"+form_id).getAttribute("long"+q)); w_lat=parseFloat(document.getElementById('wdform_'+id+"_element"+form_id).getAttribute("lat"+q)); w_info=parseFloat(document.getElementById('wdform_'+id+"_element"+form_id).getAttribute("info"+q)); add_marker_on_map('wdform_'+id, q, w_long, w_lat, w_info, form_id,false); } } ); jQuery("#form" + form_id + " div[type='type_mark_map']").each( function() { id=jQuery(this).parent().attr('wdid'); if_gmap_init('wdform_'+id, form_id); q=0; if(jQuery("#wdform_"+id+"_element"+form_id)[0].getAttribute("long"+q)) { w_long=parseFloat(document.getElementById('wdform_'+id+"_element"+form_id).getAttribute("long"+q)); w_lat=parseFloat(document.getElementById('wdform_'+id+"_element"+form_id).getAttribute("lat"+q)); w_info=parseFloat(document.getElementById('wdform_'+id+"_element"+form_id).getAttribute("info"+q)); add_marker_on_map('wdform_'+id, q, w_long, w_lat, w_info, form_id,true); } } ); jQuery('.wdform-element-section').each(function() { if(!jQuery(this).parent()[0].style.width && parseInt(jQuery(this).width())!=0) { if(jQuery(this).css('display')=="table-cell") { if(jQuery(this).parent().attr('type')!="type_captcha") jQuery(this).parent().css('width', parseInt(jQuery(this).width()) + parseInt(jQuery(this).parent().find(jQuery(".wdform-label-section"))[0].style.width)+15); else jQuery(this).parent().css('width', (parseInt(jQuery(this).parent().find(jQuery(".captcha_input"))[0].style.width)*2+50) + parseInt(jQuery(this).parent().find(jQuery(".wdform-label-section"))[0].style.width)+15); } } }); } function display_none_form_views_all(form_id) { for(t=1; t<30; t++) if(document.getElementById(form_id+'form_view'+t)) document.getElementById(form_id+'form_view'+t).parentNode.style.display="none"; } function generate_page_bar(form_view, form_id, form_view_count, form_view_max) { if(document.getElementById(form_id+'pages').getAttribute('type')=='steps') make_page_steps_front(form_view, form_id, form_view_count, form_view_max); else if(document.getElementById(form_id+'pages').getAttribute('type')=='percentage') make_page_percentage_front(form_view, form_id, form_view_count, form_view_max); else make_page_none_front(form_id); if(document.getElementById(form_id+'pages').getAttribute('type')=='show_numbers') { td = document.getElementById(form_id+'page_numbers'+form_view); if(td) { destroyChildren(td); k=0; for(j=1; j<=form_view_max; j++) { if(document.getElementById(form_id+'form_view'+j)) { k++; if(j==form_view) page_number=k; } } var cur = document.createElement('span'); cur.setAttribute("class", "page_numbers"); cur.innerHTML=page_number+'/'+k; td.appendChild(cur); } } else { td = document.getElementById(form_id+'page_numbers'+form_view); if(td) { destroyChildren(document.getElementById(form_id+'page_numbers'+form_view)); } } } function make_page_steps_front(form_view, form_id, form_view_count, form_view_max) { destroyChildren(document.getElementById(form_id+'pages')); show_title =(document.getElementById(form_id+'pages').getAttribute('show_title')=='true'); next_checkable =(document.getElementById(form_id+'form_view'+form_view).getAttribute('next_checkable')=='true'); previous_checkable =(document.getElementById(form_id+'form_view'+form_view).getAttribute('previous_checkable')=='true'); k=0; for(j=1; j<=form_view_max; j++) { if(document.getElementById(form_id+'form_view'+j)) { if(document.getElementById(form_id+'form_view'+j).getAttribute('page_title')) w_pages=document.getElementById(form_id+'form_view'+j).getAttribute('page_title'); else w_pages=""; k++; page_number = document.createElement('span'); page_number.setAttribute('id','page_'+j); if(jform_view) if(next_checkable) page_number.setAttribute('onClick','if(check'+form_id+'('+form_view+')) generate_page_nav("'+j+'", "'+form_id+'", "'+form_view_count+'", "'+form_view_max+'")'); else page_number.setAttribute('onClick','generate_page_nav("'+j+'", "'+form_id+'", "'+form_view_count+'", "'+form_view_max+'")'); if(j==form_view) page_number.setAttribute('class',"page_active"); else page_number.setAttribute('class',"page_deactive"); if(show_title) { page_number.innerHTML=w_pages; } else page_number.innerHTML=k; document.getElementById(form_id+'pages').appendChild(page_number); } } } function make_page_percentage_front(form_view, form_id, form_view_count, form_view_max) { destroyChildren(document.getElementById(form_id+'pages')); show_title=(document.getElementById(form_id+'pages').getAttribute('show_title')=='true'); var div_parent = document.createElement('div'); div_parent.setAttribute("class", "page_percentage_deactive"); var div = document.createElement('div'); div.setAttribute("id", "div_percentage"); div.setAttribute("class", "page_percentage_active"); div.setAttribute("align", "right"); var div_arrow = document.createElement('div'); div_arrow.setAttribute("class", "wdform_percentage_arrow"); var b = document.createElement('b'); b.setAttribute("class", "wdform_percentage_text"); div.appendChild(b); k=0; cur_page_title=''; for(j=1; j<=form_view_max; j++) { if(document.getElementById(form_id+'form_view'+j)) { if(document.getElementById(form_id+'form_view'+j).getAttribute('page_title')) w_pages=document.getElementById(form_id+'form_view'+j).getAttribute('page_title'); else w_pages=""; k++; if(j==form_view) { if(show_title) { var cur_page_title = document.createElement('div'); cur_page_title.innerHTML=w_pages; cur_page_title.innerHTML=w_pages; cur_page_title.setAttribute("class", "wdform_percentage_title"); } page_number=k; } } } b.innerHTML=Math.round(((page_number-1)/k)*100)+'%'; div.style.width=((page_number-1)/k)*100+'%'; if(page_number==1) div_arrow.style.display='none'; div_parent.appendChild(div); div_parent.appendChild(div_arrow); if(cur_page_title) div_parent.appendChild(cur_page_title); document.getElementById(form_id+'pages').appendChild(div_parent); } function make_page_none_front(form_id) { destroyChildren(document.getElementById(form_id+'pages')); } function make_pagebreak_button(next_or_previous,title,type, class_, checkable, id, form_id, form_view_count, form_view_max) { switch(type) { case 'text': { var element = document.createElement('div'); element.setAttribute('id', "page_"+next_or_previous+"_"+id); element.setAttribute('class', class_); if(checkable=="true") element.setAttribute('onClick', "if(check"+form_id+"("+id+")) page_"+next_or_previous+"("+id+","+form_id+","+form_view_count+","+form_view_max+")"); else element.setAttribute('onClick', "page_"+next_or_previous+"("+id+","+form_id+","+form_view_count+","+form_view_max+")"); element.innerHTML=title; return element; break; } case 'img':{ var element = document.createElement('img'); element.setAttribute('id', "page_"+next_or_previous+"_"+id); element.setAttribute('class', class_); if(checkable=="true") element.setAttribute('onClick', "if(check"+form_id+"("+id+")) page_"+next_or_previous+"("+id+","+form_id+","+form_view_count+","+form_view_max+")"); else element.setAttribute('onClick', "page_"+next_or_previous+"("+id+","+form_id+","+form_view_count+","+form_view_max+")"); if(title.indexOf("http")==0) { element.src=title; } else element.src=fm_objectL10n.plugin_url+'/'+title; return element; break; } } } function form_maker_findPos(obj) { var curtop = 0; if (obj.offsetParent) { do { curtop += obj.offsetTop; } while (obj = obj.offsetParent); return [curtop]; } } function page_previous(id, form_id, form_view_count, form_view_max) { form_view_elemet=document.getElementById(form_id+'form_view'+id); if(form_view_elemet.parentNode.previousSibling && form_view_elemet.parentNode.previousSibling.previousSibling) { if(form_view_elemet.parentNode.previousSibling.tagName=="DIV") table=form_view_elemet.parentNode.previousSibling; else table=form_view_elemet.parentNode.previousSibling.previousSibling; } if(!table.firstChild.tagName) table.removeChild(table.firstChild); generate_page_nav(table.firstChild.id.replace(form_id+'form_view', ""),form_id, form_view_count, form_view_max); window.scroll(0, form_maker_findPos(document.getElementById("form" + form_id))); } function page_next(id, form_id, form_view_count, form_view_max) { form_view_elemet=document.getElementById(form_id+'form_view'+id); if(form_view_elemet.parentNode.nextSibling) { if(form_view_elemet.parentNode.nextSibling.tagName=="DIV") table=form_view_elemet.parentNode.nextSibling; else table=form_view_elemet.parentNode.nextSibling.nextSibling; } if(!table.firstChild.tagName) table.removeChild(table.firstChild); generate_page_nav(table.firstChild.id.replace(form_id+'form_view', ""), form_id, form_view_count, form_view_max); window.scroll(0, form_maker_findPos(document.getElementById("form" + form_id))); } function getfileextension(filename, exten) { if( filename.length == 0 ) return true; var dot = filename.lastIndexOf("."); var extension = filename.substr(dot+1,filename.length); exten=exten.split(','); for(var j=0 ; j'); var sel_options = ''; var selected_option = false; jQuery(select).children('option').each(function() { if(jQuery(this).is(':selected')){ selected_option = jQuery(this).index(); } sel_options = sel_options + '
' + jQuery(this).html() + '
'; }); w=jQuery(select)[0].style.width; if(w=='100%') w='100%'; else w=(jQuery(select).width()+32)+'px'; var sel_imul = '
\
\
' + jQuery(select).children('option').eq(selected_option).html() + '
\
\
\
' + sel_options + '
\
'; jQuery(select).addClass('no-width'); jQuery(select).before(sel_imul); } jQuery(document).on('change','.wdform-element-section select', function() { var tektext = jQuery(this).children("option:selected").text(); jQuery(this).parent('.sel-wrap ').children('.sel-imul').children('.sel-selected').children('.selected-text').html(tektext); jQuery(this).parent('.sel-wrap ').children('.sel-imul').children('.sel-options').children('.sel-option').removeClass('sel-ed'); jQuery(this).addClass('sel-ed'); jQuery(this).parent('.sel-wrap ').children('.sel-imul').children('.sel-options').each(function() { if (jQuery(this).html() == tektext) { jQuery(this).addClass('sel-ed'); } }); }); jQuery(document).on('click','.sel-imul', function() { jQuery('.sel-imul').removeClass('act'); jQuery(this).addClass('act'); if (jQuery(this).children('.sel-options').is(':visible')) { jQuery('.sel-options').hide(); } else { jQuery('.sel-options').hide(); jQuery(this).children('.sel-options').show(); jQuery(this).children('.sel-options').css('width',jQuery(this).width()); } }); jQuery(document).on('click','.sel-option', function() { var tektext = jQuery(this).html(); jQuery(this).parent('.sel-options').parent('.sel-imul').children('.sel-selected').children('.selected-text').html(tektext); jQuery(this).parent('.sel-options').children('.sel-option').removeClass('sel-ed'); jQuery(this).addClass('sel-ed'); var tekval = jQuery(this).attr('value'); tekval = typeof(tekval) != 'undefined' ? tekval : tektext; jQuery(this).parent('.sel-options').parent('.sel-imul').parent('.sel-wrap').children('select').children('option').removeAttr('selected').each(function() { if (jQuery(this).html() == tektext) { jQuery(this).attr('selected', 'select'); } }); jQuery(this).parent('.sel-options').parent('.sel-imul').parent('.sel-wrap').children('select').change(); }); var selenter = false; jQuery(document).on('mouseenter','.sel-imul', function() { selenter = true; }); jQuery(document).on('mouseleave','.sel-imul', function() { selenter = false; }); jQuery(document).click(function() { if (!selenter) { jQuery('.sel-options').hide(); jQuery('.sel-imul').removeClass('act'); } }); function remove_whitespace(node) { var ttt; for (ttt=0; ttt < node.childNodes.length; ttt++) { if( node.childNodes[ttt] && node.childNodes[ttt].nodeType == '3' && !/\S/.test( node.childNodes[ttt].nodeValue )) { node.removeChild(node.childNodes[ttt]); ttt--; } else { if(node.childNodes[ttt].childNodes.length) remove_whitespace(node.childNodes[ttt]); } } return }; // source --> https://tritiumsystems.cz/wp-content/themes/agama/assets/js/plugins.js?ver=1.2.8.10 /* * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/ * * Uses the built in easing capabilities added In jQuery 1.1 * to offer multiple easing options * * TERMS OF USE - jQuery Easing * * Open source under the BSD License. * * Copyright © 2008 George McGinley Smith * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this list of * conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list * of conditions and the following disclaimer in the documentation and/or other materials * provided with the distribution. * * Neither the name of the author nor the names of contributors may be used to endorse * or promote products derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. * */ jQuery.easing.jswing=jQuery.easing.swing,jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(n,e,t,u,a){return jQuery.easing[jQuery.easing.def](n,e,t,u,a)},easeInQuad:function(n,e,t,u,a){return u*(e/=a)*e+t},easeOutQuad:function(n,e,t,u,a){return-u*(e/=a)*(e-2)+t},easeInOutQuad:function(n,e,t,u,a){return(e/=a/2)<1?u/2*e*e+t:-u/2*(--e*(e-2)-1)+t},easeInCubic:function(n,e,t,u,a){return u*(e/=a)*e*e+t},easeOutCubic:function(n,e,t,u,a){return u*((e=e/a-1)*e*e+1)+t},easeInOutCubic:function(n,e,t,u,a){return(e/=a/2)<1?u/2*e*e*e+t:u/2*((e-=2)*e*e+2)+t},easeInQuart:function(n,e,t,u,a){return u*(e/=a)*e*e*e+t},easeOutQuart:function(n,e,t,u,a){return-u*((e=e/a-1)*e*e*e-1)+t},easeInOutQuart:function(n,e,t,u,a){return(e/=a/2)<1?u/2*e*e*e*e+t:-u/2*((e-=2)*e*e*e-2)+t},easeInQuint:function(n,e,t,u,a){return u*(e/=a)*e*e*e*e+t},easeOutQuint:function(n,e,t,u,a){return u*((e=e/a-1)*e*e*e*e+1)+t},easeInOutQuint:function(n,e,t,u,a){return(e/=a/2)<1?u/2*e*e*e*e*e+t:u/2*((e-=2)*e*e*e*e+2)+t},easeInSine:function(n,e,t,u,a){return-u*Math.cos(e/a*(Math.PI/2))+u+t},easeOutSine:function(n,e,t,u,a){return u*Math.sin(e/a*(Math.PI/2))+t},easeInOutSine:function(n,e,t,u,a){return-u/2*(Math.cos(Math.PI*e/a)-1)+t},easeInExpo:function(n,e,t,u,a){return 0==e?t:u*Math.pow(2,10*(e/a-1))+t},easeOutExpo:function(n,e,t,u,a){return e==a?t+u:u*(-Math.pow(2,-10*e/a)+1)+t},easeInOutExpo:function(n,e,t,u,a){return 0==e?t:e==a?t+u:(e/=a/2)<1?u/2*Math.pow(2,10*(e-1))+t:u/2*(-Math.pow(2,-10*--e)+2)+t},easeInCirc:function(n,e,t,u,a){return-u*(Math.sqrt(1-(e/=a)*e)-1)+t},easeOutCirc:function(n,e,t,u,a){return u*Math.sqrt(1-(e=e/a-1)*e)+t},easeInOutCirc:function(n,e,t,u,a){return(e/=a/2)<1?-u/2*(Math.sqrt(1-e*e)-1)+t:u/2*(Math.sqrt(1-(e-=2)*e)+1)+t},easeInElastic:function(n,e,t,u,a){var r=1.70158,i=0,s=u;if(0==e)return t;if(1==(e/=a))return t+u;if(i||(i=.3*a),se?-.5*(s*Math.pow(2,10*(e-=1))*Math.sin((e*a-r)*(2*Math.PI)/i))+t:s*Math.pow(2,-10*(e-=1))*Math.sin((e*a-r)*(2*Math.PI)/i)*.5+u+t},easeInBack:function(n,e,t,u,a,r){return void 0==r&&(r=1.70158),u*(e/=a)*e*((r+1)*e-r)+t},easeOutBack:function(n,e,t,u,a,r){return void 0==r&&(r=1.70158),u*((e=e/a-1)*e*((r+1)*e+r)+1)+t},easeInOutBack:function(n,e,t,u,a,r){return void 0==r&&(r=1.70158),(e/=a/2)<1?u/2*(e*e*(((r*=1.525)+1)*e-r))+t:u/2*((e-=2)*e*(((r*=1.525)+1)*e+r)+2)+t},easeInBounce:function(n,e,t,u,a){return u-jQuery.easing.easeOutBounce(n,a-e,0,u,a)+t},easeOutBounce:function(n,e,t,u,a){return(e/=a)<1/2.75?u*(7.5625*e*e)+t:2/2.75>e?u*(7.5625*(e-=1.5/2.75)*e+.75)+t:2.5/2.75>e?u*(7.5625*(e-=2.25/2.75)*e+.9375)+t:u*(7.5625*(e-=2.625/2.75)*e+.984375)+t},easeInOutBounce:function(n,e,t,u,a){return a/2>e?.5*jQuery.easing.easeInBounce(n,2*e,0,u,a)+t:.5*jQuery.easing.easeOutBounce(n,2*e-a,0,u,a)+.5*u+t}}); /*! * imagesLoaded PACKAGED v3.1.8 * JavaScript is all like "You images are done yet or what?" * MIT License */ (function(){function e(){}function t(e,t){for(var n=e.length;n--;)if(e[n].listener===t)return n;return-1}function n(e){return function(){return this[e].apply(this,arguments)}}var i=e.prototype,r=this,o=r.EventEmitter;i.getListeners=function(e){var t,n,i=this._getEvents();if("object"==typeof e){t={};for(n in i)i.hasOwnProperty(n)&&e.test(n)&&(t[n]=i[n])}else t=i[e]||(i[e]=[]);return t},i.flattenListeners=function(e){var t,n=[];for(t=0;e.length>t;t+=1)n.push(e[t].listener);return n},i.getListenersAsObject=function(e){var t,n=this.getListeners(e);return n instanceof Array&&(t={},t[e]=n),t||n},i.addListener=function(e,n){var i,r=this.getListenersAsObject(e),o="object"==typeof n;for(i in r)r.hasOwnProperty(i)&&-1===t(r[i],n)&&r[i].push(o?n:{listener:n,once:!1});return this},i.on=n("addListener"),i.addOnceListener=function(e,t){return this.addListener(e,{listener:t,once:!0})},i.once=n("addOnceListener"),i.defineEvent=function(e){return this.getListeners(e),this},i.defineEvents=function(e){for(var t=0;e.length>t;t+=1)this.defineEvent(e[t]);return this},i.removeListener=function(e,n){var i,r,o=this.getListenersAsObject(e);for(r in o)o.hasOwnProperty(r)&&(i=t(o[r],n),-1!==i&&o[r].splice(i,1));return this},i.off=n("removeListener"),i.addListeners=function(e,t){return this.manipulateListeners(!1,e,t)},i.removeListeners=function(e,t){return this.manipulateListeners(!0,e,t)},i.manipulateListeners=function(e,t,n){var i,r,o=e?this.removeListener:this.addListener,s=e?this.removeListeners:this.addListeners;if("object"!=typeof t||t instanceof RegExp)for(i=n.length;i--;)o.call(this,t,n[i]);else for(i in t)t.hasOwnProperty(i)&&(r=t[i])&&("function"==typeof r?o.call(this,i,r):s.call(this,i,r));return this},i.removeEvent=function(e){var t,n=typeof e,i=this._getEvents();if("string"===n)delete i[e];else if("object"===n)for(t in i)i.hasOwnProperty(t)&&e.test(t)&&delete i[t];else delete this._events;return this},i.removeAllListeners=n("removeEvent"),i.emitEvent=function(e,t){var n,i,r,o,s=this.getListenersAsObject(e);for(r in s)if(s.hasOwnProperty(r))for(i=s[r].length;i--;)n=s[r][i],n.once===!0&&this.removeListener(e,n.listener),o=n.listener.apply(this,t||[]),o===this._getOnceReturnValue()&&this.removeListener(e,n.listener);return this},i.trigger=n("emitEvent"),i.emit=function(e){var t=Array.prototype.slice.call(arguments,1);return this.emitEvent(e,t)},i.setOnceReturnValue=function(e){return this._onceReturnValue=e,this},i._getOnceReturnValue=function(){return this.hasOwnProperty("_onceReturnValue")?this._onceReturnValue:!0},i._getEvents=function(){return this._events||(this._events={})},e.noConflict=function(){return r.EventEmitter=o,e},"function"==typeof define&&define.amd?define("eventEmitter/EventEmitter",[],function(){return e}):"object"==typeof module&&module.exports?module.exports=e:this.EventEmitter=e}).call(this),function(e){function t(t){var n=e.event;return n.target=n.target||n.srcElement||t,n}var n=document.documentElement,i=function(){};n.addEventListener?i=function(e,t,n){e.addEventListener(t,n,!1)}:n.attachEvent&&(i=function(e,n,i){e[n+i]=i.handleEvent?function(){var n=t(e);i.handleEvent.call(i,n)}:function(){var n=t(e);i.call(e,n)},e.attachEvent("on"+n,e[n+i])});var r=function(){};n.removeEventListener?r=function(e,t,n){e.removeEventListener(t,n,!1)}:n.detachEvent&&(r=function(e,t,n){e.detachEvent("on"+t,e[t+n]);try{delete e[t+n]}catch(i){e[t+n]=void 0}});var o={bind:i,unbind:r};"function"==typeof define&&define.amd?define("eventie/eventie",o):e.eventie=o}(this),function(e,t){"function"==typeof define&&define.amd?define(["eventEmitter/EventEmitter","eventie/eventie"],function(n,i){return t(e,n,i)}):"object"==typeof exports?module.exports=t(e,require("wolfy87-eventemitter"),require("eventie")):e.imagesLoaded=t(e,e.EventEmitter,e.eventie)}(window,function(e,t,n){function i(e,t){for(var n in t)e[n]=t[n];return e}function r(e){return"[object Array]"===d.call(e)}function o(e){var t=[];if(r(e))t=e;else if("number"==typeof e.length)for(var n=0,i=e.length;i>n;n++)t.push(e[n]);else t.push(e);return t}function s(e,t,n){if(!(this instanceof s))return new s(e,t);"string"==typeof e&&(e=document.querySelectorAll(e)),this.elements=o(e),this.options=i({},this.options),"function"==typeof t?n=t:i(this.options,t),n&&this.on("always",n),this.getImages(),a&&(this.jqDeferred=new a.Deferred);var r=this;setTimeout(function(){r.check()})}function f(e){this.img=e}function c(e){this.src=e,v[e]=this}var a=e.jQuery,u=e.console,h=u!==void 0,d=Object.prototype.toString;s.prototype=new t,s.prototype.options={},s.prototype.getImages=function(){this.images=[];for(var e=0,t=this.elements.length;t>e;e++){var n=this.elements[e];"IMG"===n.nodeName&&this.addImage(n);var i=n.nodeType;if(i&&(1===i||9===i||11===i))for(var r=n.querySelectorAll("img"),o=0,s=r.length;s>o;o++){var f=r[o];this.addImage(f)}}},s.prototype.addImage=function(e){var t=new f(e);this.images.push(t)},s.prototype.check=function(){function e(e,r){return t.options.debug&&h&&u.log("confirm",e,r),t.progress(e),n++,n===i&&t.complete(),!0}var t=this,n=0,i=this.images.length;if(this.hasAnyBroken=!1,!i)return this.complete(),void 0;for(var r=0;i>r;r++){var o=this.images[r];o.on("confirm",e),o.check()}},s.prototype.progress=function(e){this.hasAnyBroken=this.hasAnyBroken||!e.isLoaded;var t=this;setTimeout(function(){t.emit("progress",t,e),t.jqDeferred&&t.jqDeferred.notify&&t.jqDeferred.notify(t,e)})},s.prototype.complete=function(){var e=this.hasAnyBroken?"fail":"done";this.isComplete=!0;var t=this;setTimeout(function(){if(t.emit(e,t),t.emit("always",t),t.jqDeferred){var n=t.hasAnyBroken?"reject":"resolve";t.jqDeferred[n](t)}})},a&&(a.fn.imagesLoaded=function(e,t){var n=new s(this,e,t);return n.jqDeferred.promise(a(this))}),f.prototype=new t,f.prototype.check=function(){var e=v[this.img.src]||new c(this.img.src);if(e.isConfirmed)return this.confirm(e.isLoaded,"cached was confirmed"),void 0;if(this.img.complete&&void 0!==this.img.naturalWidth)return this.confirm(0!==this.img.naturalWidth,"naturalWidth"),void 0;var t=this;e.on("confirm",function(e,n){return t.confirm(e.isLoaded,n),!0}),e.check()},f.prototype.confirm=function(e,t){this.isLoaded=e,this.emit("confirm",this,t)};var v={};return c.prototype=new t,c.prototype.check=function(){if(!this.isChecked){var e=new Image;n.bind(e,"load",this),n.bind(e,"error",this),e.src=this.src,this.isChecked=!0}},c.prototype.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},c.prototype.onload=function(e){this.confirm(!0,"onload"),this.unbindProxyEvents(e)},c.prototype.onerror=function(e){this.confirm(!1,"onerror"),this.unbindProxyEvents(e)},c.prototype.confirm=function(e,t){this.isConfirmed=!0,this.isLoaded=e,this.emit("confirm",this,t)},c.prototype.unbindProxyEvents=function(e){n.unbind(e.target,"load",this),n.unbind(e.target,"error",this)},s}); // Camera slideshow v1.4.0 - a jQuery slideshow with many effects, transitions, easy to customize, using canvas and mobile ready, based on jQuery 1.9.1+ // Copyright (c) 2012 by Manuel Masia - www.pixedelic.com // Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php (function(a){a.fn.camera=function(H,V){var N={alignment:"center",autoAdvance:true,mobileAutoAdvance:true,barDirection:"leftToRight",barPosition:"bottom",cols:6,easing:"easeInOutExpo",mobileEasing:"",fx:"random",mobileFx:"",gridDifference:250,height:"50%",imagePath:"images/",hover:true,loader:"pie",loaderColor:"#eeeeee",loaderBgColor:"#222222",loaderOpacity:0.8,loaderPadding:2,loaderStroke:7,minHeight:"200px",navigation:true,navigationHover:true,mobileNavHover:true,opacityOnGrid:false,overlayer:true,pagination:true,playPause:true,pauseOnClick:true,pieDiameter:38,piePosition:"rightTop",portrait:false,rows:4,slicedCols:12,slicedRows:8,slideOn:"random",thumbnails:false,time:7000,transPeriod:1500,onEndTransition:function(){},onLoaded:function(){},onStartLoading:function(){},onStartTransition:function(){}};function L(){if(navigator.userAgent.match(/Android/i)||navigator.userAgent.match(/webOS/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPod/i)){return true}}a.support.borderRadius=false;a.each(["borderRadius","BorderRadius","MozBorderRadius","WebkitBorderRadius","OBorderRadius","KhtmlBorderRadius"],function(){if(document.body.style[this]!==undefined){a.support.borderRadius=true}});var H=a.extend({},N,H);var ae=a(this).addClass("camera_wrap");ae.wrapInner('
').wrapInner('
');var D=a(".camera_fakehover",ae);var W=(".camera_fakehover",ae);D.append('
');if(H.overlayer==true){D.append('
')}D.append('
');var C;if(H.loader=="pie"&&!a.support.borderRadius){C="bar"}else{C=H.loader}if(C=="pie"){D.append('
')}else{if(C=="bar"){D.append('
')}else{D.append('')}}if(H.playPause==true){D.append('
')}if(H.navigation==true){D.append('
').append('
')}if(H.thumbnails==true){ae.append('
')}if(H.thumbnails==true&&H.pagination!=true){a(".camera_thumbs_cont",ae).wrap("
").wrap('
').wrap("
").wrap('
')}if(H.pagination==true){ae.append('
')}ae.append('
');a(".camera_caption",ae).each(function(){a(this).wrapInner("
")});var q="pie_"+ae.index(),ag=a(".camera_src",ae),b=a(".camera_target",ae),s=a(".camera_target_content",ae),p=a(".camera_pie",ae),ah=a(".camera_bar",ae),am=a(".camera_prev",ae),r=a(".camera_next",ae),R=a(".camera_commands",ae),n=a(".camera_pag",ae),M=a(".camera_thumbs_cont",ae);var Z,aj;var X=new Array();a("> div",ag).each(function(){X.push(a(this).attr("data-src"))});var c=new Array();a("> div",ag).each(function(){if(a(this).attr("data-link")){c.push(a(this).attr("data-link"))}else{c.push("")}});var m=new Array();a("> div",ag).each(function(){if(a(this).attr("data-target")){m.push(a(this).attr("data-target"))}else{m.push("")}});var k=new Array();a("> div",ag).each(function(){if(a(this).attr("data-portrait")){k.push(a(this).attr("data-portrait"))}else{k.push("")}});var o=new Array();a("> div",ag).each(function(){if(a(this).attr("data-alignment")){o.push(a(this).attr("data-alignment"))}else{o.push("")}});var j=new Array();a("> div",ag).each(function(){if(a(this).attr("data-thumb")){j.push(a(this).attr("data-thumb"))}else{j.push("")}});var y=X.length;a(s).append('
');var J;for(J=0;J');if(c[J]!=""){var t=a("> div ",ag).eq(J).attr("data-box");if(typeof t!=="undefined"&&t!==false&&t!=""){t='data-box="'+a("> div ",ag).eq(J).attr("data-box")+'"'}else{t=""}a(".camera_target_content .cameraContent:eq("+J+")",ae).append('')}}a(".camera_caption",ae).each(function(){var u=a(this).parent().index(),h=ae.find(".cameraContent").eq(u);a(this).appendTo(h)});b.append('
');var F=a(".cameraCont",ae);var e;for(e=0;e');var ak=a("> div:eq("+e+")",ag);b.find(".cameraSlide_"+e).clone(ak)}function z(){var h=a(M).width();a("li",M).removeClass("camera_visThumb");a("li",M).each(function(){var au=a(this).position(),u=a("ul",M).outerWidth(),w=a("ul",M).offset().left,aq=a("> div",M).offset().left,at=aq-w;if(at>0){a(".camera_prevThumbs",U).removeClass("hideNav")}else{a(".camera_prevThumbs",U).addClass("hideNav")}if((u-at)>h){a(".camera_nextThumbs",U).removeClass("hideNav")}else{a(".camera_nextThumbs",U).addClass("hideNav")}var ar=au.left,ap=au.left+(a(this).width());if(ap-at<=h&&ar-at>=0){a(this).addClass("camera_visThumb")}})}a(window).bind("load resize pageshow",function(){I();z()});F.append('
'); var an;ae.show();var Z=b.width();var aj=b.height();var ai;a(window).bind("resize pageshow",function(){if(an==true){v()}a("ul",M).animate({"margin-top":0},0,I);if(!ag.hasClass("paused")){ag.addClass("paused");if(a(".camera_stop",U).length){a(".camera_stop",U).hide();a(".camera_play",U).show();if(C!="none"){a("#"+q).hide()}}else{if(C!="none"){a("#"+q).hide()}}clearTimeout(ai);ai=setTimeout(function(){ag.removeClass("paused");if(a(".camera_play",U).length){a(".camera_play",U).hide();a(".camera_stop",U).show();if(C!="none"){a("#"+q).fadeIn()}}else{if(C!="none"){a("#"+q).fadeIn()}}},1500)}});function v(){var h;function u(){Z=ae.width();if(H.height.indexOf("%")!=-1){var w=Math.round(Z/(100/parseFloat(H.height)));if(H.minHeight!=""&&w');var E;var A=H.barDirection;var U=ae;a("iframe",D).each(function(){var h=a(this);var w=h.attr("src");h.attr("data-src",w);var u=h.parent().index(".camera_src > div");a(".camera_target_content .cameraContent:eq("+u+")",ae).append(h)});function af(){a("iframe",D).each(function(){a(".camera_caption",D).show();var w=a(this);var u=w.attr("data-src");w.attr("src",u);var aq=H.imagePath+"blank.gif";var h=new Image();h.src=aq;if(H.height.indexOf("%")!=-1){var ap=Math.round(Z/(100/parseFloat(H.height)));if(H.minHeight!=""&&ap');a(".camera_bar_cont",ah).animate({opacity:H.loaderOpacity},0).css({position:"absolute",left:0,right:0,top:0,bottom:0,"background-color":H.loaderBgColor}).append('');a("#"+q).animate({opacity:0},0);var l=a("#"+q);l.css({position:"absolute","background-color":H.loaderColor});switch(H.barPosition){case"left":ah.css({right:"auto",width:H.loaderStroke});break;case"right":ah.css({left:"auto",width:H.loaderStroke});break;case"top":ah.css({bottom:"auto",height:H.loaderStroke});break;case"bottom":ah.css({top:"auto",height:H.loaderStroke});break}switch(A){case"leftToRight":l.css({left:0,right:0,top:H.loaderPadding,bottom:H.loaderPadding});break;case"rightToLeft":l.css({left:0,right:0,top:H.loaderPadding,bottom:H.loaderPadding});break;case"topToBottom":l.css({left:H.loaderPadding,right:H.loaderPadding,top:0,bottom:0});break;case"bottomToTop":l.css({left:H.loaderPadding,right:H.loaderPadding,top:0,bottom:0});break}}else{p.append('');var ad;var l=document.getElementById(q);l.setAttribute("width",H.pieDiameter);l.setAttribute("height",H.pieDiameter);var ao;switch(H.piePosition){case"leftTop":ao="left:0; top:0;";break;case"rightTop":ao="right:0; top:0;";break;case"leftBottom":ao="left:0; bottom:0;";break;case"rightBottom":ao="right:0; bottom:0;";break}l.setAttribute("style","position:absolute; z-index:1002; "+ao);var g;var f;if(l&&l.getContext){var B=l.getContext("2d");B.rotate(Math.PI*(3/2));B.translate(-H.pieDiameter,0)}}if(C=="none"||d==false){a("#"+q).hide();a(".camera_canvas_wrap",U).hide()}if(a(n).length){a(n).append('
    ');var O;for(O=0;O'+O+"")}a(".camera_pag_ul li",ae).hover(function(){a(this).addClass("camera_hover");if(a(".camera_thumb",this).length){var u=a(".camera_thumb",this).outerWidth(),w=a(".camera_thumb",this).outerHeight(),h=a(this).outerWidth();a(".camera_thumb",this).show().css({top:"-"+w+"px",left:"-"+(u-h)/2+"px"}).animate({opacity:1,"margin-top":"-3px"},200);a(".thumb_arrow",this).show().animate({opacity:1,"margin-top":"-3px"},200)}},function(){a(this).removeClass("camera_hover");a(".camera_thumb",this).animate({"margin-top":"-20px",opacity:0},200,function(){a(this).css({marginTop:"5px"}).hide()});a(".thumb_arrow",this).animate({"margin-top":"-20px",opacity:0},200,function(){a(this).css({marginTop:"5px"}).hide()})})}if(a(M).length){var al;if(!a(n).length){a(M).append("
    ");a(M).before('
    ').before('
    ');a("> div",M).append("
      ");a.each(j,function(h,w){if(a("> div",ag).eq(h).attr("data-thumb")!=""){var ap=a("> div",ag).eq(h).attr("data-thumb"),u=new Image();u.src=ap;a("ul",M).append('
    • ');a("li.pix_thumb_"+h,M).append(a(u).attr("class","camera_thumb"))}})}else{a.each(j,function(h,w){if(a("> div",ag).eq(h).attr("data-thumb")!=""){var ap=a("> div",ag).eq(h).attr("data-thumb"),u=new Image();u.src=ap;a("li.pag_nav_"+h,n).append(a(u).attr("class","camera_thumb").css({position:"absolute"}).animate({opacity:0},0));a("li.pag_nav_"+h+" > img",n).after('
      '); a("li.pag_nav_"+h+" > .thumb_arrow",n).animate({opacity:0},0)}});ae.css({marginBottom:a(n).outerHeight()})}}else{if(!a(M).length&&a(n).length){ae.css({marginBottom:a(n).outerHeight()})}}var G=true;function I(){if(a(M).length&&!a(n).length){var w=a(M).outerWidth(),ap=a("ul > li",M).outerWidth(),au=a("li.cameracurrent",M).length?a("li.cameracurrent",M).position():"",u=(a("ul > li",M).length*a("ul > li",M).outerWidth()),ar=a("ul",M).offset().left,at=a("> div",M).offset().left,h;if(ar<0){h="-"+(at-ar)}else{h=at-ar}if(G==true){a("ul",M).width(a("ul > li",M).length*a("ul > li",M).outerWidth());if(a(M).length&&!a(n).lenght){ae.css({marginBottom:a(M).outerHeight()})}z();a("ul",M).width(a("ul > li",M).length*a("ul > li",M).outerWidth());if(a(M).length&&!a(n).lenght){ae.css({marginBottom:a(M).outerHeight()})}}G=false;var aq=a("li.cameracurrent",M).length?au.left:"",av=a("li.cameracurrent",M).length?au.left+(a("li.cameracurrent",M).outerWidth()):"";if(aqw){if((aq+w)
      ').append('
      ');if(d==true){a(".camera_play",U).hide();a(".camera_stop",U).show()}else{a(".camera_stop",U).hide();a(".camera_play",U).show()}}function K(){g=0;var h=a(".camera_bar_cont",U).width(),u=a(".camera_bar_cont",U).height();if(C!="pie"){switch(A){case"leftToRight":a("#"+q).css({right:h});break;case"rightToLeft":a("#"+q).css({left:h});break;case"topToBottom":a("#"+q).css({bottom:u});break;case"bottomToTop":a("#"+q).css({top:u});break}}else{B.clearRect(0,0,H.pieDiameter,H.pieDiameter)}}K();a(".moveFromLeft, .moveFromRight, .moveFromTop, .moveFromBottom, .fadeIn, .fadeFromLeft, .fadeFromRight, .fadeFromTop, .fadeFromBottom",D).each(function(){a(this).css("visibility","hidden")});H.onStartLoading.call(this);T();function T(aF){ag.addClass("camerasliding");S=false;var aZ=parseFloat(a("div.cameraSlide.cameracurrent",b).index());if(aF>0){var aK=aF-1}else{if(aZ==y-1){var aK=0}else{var aK=aZ+1}}var u=a(".cameraSlide:eq("+aK+")",b);var aL=a(".cameraSlide:eq("+(aK+1)+")",b).addClass("cameranext");if(aZ!=aK+1){aL.hide()}a(".cameraContent",D).fadeOut(600);a(".camera_caption",D).show();a(".camerarelative",u).append(a("> div ",ag).eq(aK).find("> div.camera_effected"));a(".camera_target_content .cameraContent:eq("+aK+")",ae).append(a("> div ",ag).eq(aK).find("> div"));if(!a(".imgLoaded",u).length){var aC=X[aK];var aJ=new Image();aJ.src=aC+"?"+new Date().getTime();u.css("visibility","hidden");u.prepend(a(aJ).attr("class","imgLoaded").css("visibility","hidden"));var au,ar;if(!a(aJ).get(0).complete||au=="0"||ar=="0"||typeof au==="undefined"||au===false||typeof ar==="undefined"||ar===false){a(".camera_loader",ae).delay(500).fadeIn(400);aJ.onload=function(){au=aJ.naturalWidth;ar=aJ.naturalHeight;a(aJ).attr("data-alignment",o[aK]).attr("data-portrait",k[aK]);a(aJ).attr("width",au);a(aJ).attr("height",ar);b.find(".cameraSlide_"+aK).hide().css("visibility","visible");v();T(aK+1)}}}else{if(X.length>(aK+1)&&!a(".imgLoaded",aL).length){var at=X[(aK+1)];var aA=new Image();aA.src=at+"?"+new Date().getTime();aL.prepend(a(aA).attr("class","imgLoaded").css("visibility","hidden"));aA.onload=function(){au=aA.naturalWidth;ar=aA.naturalHeight;a(aA).attr("data-alignment",o[aK+1]).attr("data-portrait",k[aK+1]);a(aA).attr("width",au);a(aA).attr("height",ar);v()}}H.onLoaded.call(this);if(a(".camera_loader",ae).is(":visible")){a(".camera_loader",ae).fadeOut(400)}else{a(".camera_loader",ae).css({visibility:"hidden"});a(".camera_loader",ae).fadeOut(400,function(){a(".camera_loader",ae).css({visibility:"visible"})})}var a0=H.rows,av=H.cols,aW=1,h=0,aD,aX,aI,aB,aN,az=new Array("simpleFade","curtainTopLeft","curtainTopRight","curtainBottomLeft","curtainBottomRight","curtainSliceLeft","curtainSliceRight","blindCurtainTopLeft","blindCurtainTopRight","blindCurtainBottomLeft","blindCurtainBottomRight","blindCurtainSliceBottom","blindCurtainSliceTop","stampede","mosaic","mosaicReverse","mosaicRandom","mosaicSpiral","mosaicSpiralReverse","topLeftBottomRight","bottomRightTopLeft","bottomLeftTopRight","topRightBottomLeft","scrollLeft","scrollRight","scrollTop","scrollBottom","scrollHorz");marginLeft=0,marginTop=0,opacityOnGrid=0;if(H.opacityOnGrid==true){opacityOnGrid=0}else{opacityOnGrid=1}var aw=a(" > div",ag).eq(aK).attr("data-fx");if(L()&&H.mobileFx!=""&&H.mobileFx!="default"){aB=H.mobileFx}else{if(typeof aw!=="undefined"&&aw!==false&&aw!=="default"){aB=aw}else{aB=H.fx}}if(aB=="random"){aB=Q(az);aB=aB[0]}else{aB=aB;if(aB.indexOf(",")>0){aB=aB.replace(/ /g,"");aB=aB.split(",");aB=Q(aB);aB=aB[0]}}dataEasing=a(" > div",ag).eq(aK).attr("data-easing");mobileEasing=a(" > div",ag).eq(aK).attr("data-mobileEasing"); if(L()&&H.mobileEasing!=""&&H.mobileEasing!="default"){if(typeof mobileEasing!=="undefined"&&mobileEasing!==false&&mobileEasing!=="default"){aN=mobileEasing}else{aN=H.mobileEasing}}else{if(typeof dataEasing!=="undefined"&&dataEasing!==false&&dataEasing!=="default"){aN=dataEasing}else{aN=H.easing}}aD=a(" > div",ag).eq(aK).attr("data-slideOn");if(typeof aD!=="undefined"&&aD!==false){aT=aD}else{if(H.slideOn=="random"){var aT=new Array("next","prev");aT=Q(aT);aT=aT[0]}else{aT=H.slideOn}}var aq=a(" > div",ag).eq(aK).attr("data-time");if(typeof aq!=="undefined"&&aq!==false&&aq!==""){aX=parseFloat(aq)}else{aX=H.time}var ap=a(" > div",ag).eq(aK).attr("data-transPeriod");if(typeof ap!=="undefined"&&ap!==false&&ap!==""){aI=parseFloat(ap)}else{aI=H.transPeriod}if(!a(ag).hasClass("camerastarted")){aB="simpleFade";aT="next";aN="";aI=400;a(ag).addClass("camerastarted")}switch(aB){case"simpleFade":av=1;a0=1;break;case"curtainTopLeft":if(H.slicedCols==0){av=H.cols}else{av=H.slicedCols}a0=1;break;case"curtainTopRight":if(H.slicedCols==0){av=H.cols}else{av=H.slicedCols}a0=1;break;case"curtainBottomLeft":if(H.slicedCols==0){av=H.cols}else{av=H.slicedCols}a0=1;break;case"curtainBottomRight":if(H.slicedCols==0){av=H.cols}else{av=H.slicedCols}a0=1;break;case"curtainSliceLeft":if(H.slicedCols==0){av=H.cols}else{av=H.slicedCols}a0=1;break;case"curtainSliceRight":if(H.slicedCols==0){av=H.cols}else{av=H.slicedCols}a0=1;break;case"blindCurtainTopLeft":if(H.slicedRows==0){a0=H.rows}else{a0=H.slicedRows}av=1;break;case"blindCurtainTopRight":if(H.slicedRows==0){a0=H.rows}else{a0=H.slicedRows}av=1;break;case"blindCurtainBottomLeft":if(H.slicedRows==0){a0=H.rows}else{a0=H.slicedRows}av=1;break;case"blindCurtainBottomRight":if(H.slicedRows==0){a0=H.rows}else{a0=H.slicedRows}av=1;break;case"blindCurtainSliceTop":if(H.slicedRows==0){a0=H.rows}else{a0=H.slicedRows}av=1;break;case"blindCurtainSliceBottom":if(H.slicedRows==0){a0=H.rows}else{a0=H.slicedRows}av=1;break;case"stampede":h="-"+aI;break;case"mosaic":h=H.gridDifference;break;case"mosaicReverse":h=H.gridDifference;break;case"mosaicRandom":break;case"mosaicSpiral":h=H.gridDifference;aW=1.7;break;case"mosaicSpiralReverse":h=H.gridDifference;aW=1.7;break;case"topLeftBottomRight":h=H.gridDifference;aW=6;break;case"bottomRightTopLeft":h=H.gridDifference;aW=6;break;case"bottomLeftTopRight":h=H.gridDifference;aW=6;break;case"topRightBottomLeft":h=H.gridDifference;aW=6;break;case"scrollLeft":av=1;a0=1;break;case"scrollRight":av=1;a0=1;break;case"scrollTop":av=1;a0=1;break;case"scrollBottom":av=1;a0=1;break;case"scrollHorz":av=1;a0=1;break}var aV=0;var a2=a0*av;var a1=Z-(Math.floor(Z/av)*av);var w=aj-(Math.floor(aj/a0)*a0);var aE;var aM;var aG=0;var aP=0;var ay=new Array();var aO=new Array();var aQ=new Array();while(aV