$(function(){ // placeMap(); // initFancyBox(); initPlugins(); clearInputs(); initInputs(); jcf.lib.domReady(function(){ jcf.customForms.replaceAll(); }); }); //function initFancyBox(){ // if($('.article .slide-gallery li a').length){ // $('.article .slide-gallery li a').fancybox(); // } //} function initPlugins(){ if($('#id_text').length){ $('#id_text').redactor({ lang: 'ru', imageGetJson: '/posts/image/exists/', imageUpload: '/posts/image/upload/', buttons: ['html', '|', 'formatting', '|', 'bold', 'italic', 'deleted', '|', 'unorderedlist', 'orderedlist', 'outdent', 'indent', '|', 'image', 'video', 'link', '|', 'fontcolor', 'backcolor', '|', 'alignment', '|', 'horizontalrule'] }); } $('.booking-section .tabset').contentTabs({ addToParent: true, tabLinks: 'a', effect: 'fade' }); // $('.elements-list').contentTabs({ // addToParent: true, // tabLinks: 'a', // effect: 'fade' // }); $('.elements-list a').click(function(){ if ($($(this).prop('rel')).is(':visible')) { height_ = $($(this).prop('rel')).height(); ths_ = $(this) $($(this).prop('rel')).fadeOut(function(){ $(this).parents('.holder').css('height', $(this).parents('.holder').height() - height_); ths_.parent().removeClass('active'); }); $($(this).prop('rel')).find('li.active a').trigger('click'); } else { $($(this).prop('rel')).show(); $(this).parent().addClass('active'); $(this).parents('.holder').attr('style', ''); height_ = $(this).parents('.holder').height(); $(this).parents('.holder').css('height', height_); $($(this).prop('rel')).hide().fadeIn(); } }); $('.article .tabset').contentTabs({ addToParent: true, tabLinks: 'a', effect: 'fade' }); $('.slide-gallery').each(function(ind, el){ $(el).scrollGallery({ mask:'.holder', slider:'.slideset', slides:'> li', generatePagination: $(el).find('ul.slideset > li').size() > 1?'div.pager':false, autoRotation:false, animSpeed:800 }); }); $('.elements-select').customSelect({ selectStructure: '
 
', optStructure: '
' });