Cufon.replace(".txt, .ml, #menu_lines a, #menu, .button a, #panel_right h2, #panel_right h3, .title_line h1, #stopka_main ul, #prawa"); $(document).ready(function() { // dialog box $('.dialog_box').dialog({ autoOpen: false, bgiframe: true, title: false, closeOnEscape: true, modal: true }); $('.wide_dialog_box').dialog({ autoOpen: false, bgiframe: true, title: false, closeOnEscape: true, modal: true, width: 800 }); $('.dialog_button').click(function(){ var id = $(this).attr('jq_id'); //'#slickbox'; id = "#"+id; $(id).dialog("open"); }); // window resize $(window).resize(function(){ var h=$(window).width(); $('#px').css('width', h); $('.panorama').css('width', h); }); // clients / contact swap $('#our_clients').click(function() { $('.cli_ctrl').removeClass('orange'); $('.cli_ctrl').removeClass('active'); $('#our_clients').addClass('orange'); $('#form_clients').addClass('active'); Cufon.replace(".cli_ctrl"); $('#klienci2').fadeOut('slow',function(){$('#klienci1').fadeIn();}); }); $('#form_clients').click(function() { $('.cli_ctrl').removeClass('orange'); $('.cli_ctrl').removeClass('active'); $('#form_clients').addClass('orange'); $('#our_clients').addClass('active'); Cufon.replace(".cli_ctrl"); $('#klienci1').fadeOut('slow',function(){$('#klienci2').fadeIn();}); }); /* fade partner's list **/ $('#clients').css('display', 'block'); $('#clients').cycle('fade'); var opacity = 0.9; var opacity1 = 0.1; if(($.browser.msie && $.browser.version=="6.0")||$.browser.msie && $.browser.version=="7.0") { opacity = 0.7; opacity1 = 0; $('.slog_main').css({'background-color': '#C0CBCF'}); $('.slog_main').css({'font-family': 'verdana'}); $('.slog_link').css({'background-color': '#D7E4E8'}); $('.slog_link').css({'width': '100%'}); $('.slog_link').css({'text-align': 'right'}); } $('#px').css('display', 'block'); $('#px').cycle({ fx:'scrollLeft', timeout: 15000, pager: '#line', before: onBefore, after: onAfter, pagerAnchorBuilder: function(idx, slide) { return '#line div:eq(' + idx + ')'; } }); function onBefore() { var id = $(this).attr('controler'); id = "#"+id; var bg_active = id + "_active"; if(!$(id).is('.activeSlide')) { $('.activeSlide').removeClass('activeSlide'); $(id).addClass('activeSlide'); } $('.button_active').addClass('hid'); $('.slog').css({'opacity': 0}); $('.slog').addClass('hid'); } function onAfter() { $('.button_active').addClass('hid'); $('.slog').css({'opacity': 0}); $('.slog').addClass('hid'); $('.button_txt').css({'opacity': 0}); $('.button_txt').addClass('hid'); // google chrome fix var h=$(window).width(); $('#px').css('width', h); $('.panorama').css('width', h); var id = $(this).attr('controler'); id = "#"+id; var txt_id = id + "_txt"; var bg_id = id + "_bg"; var bg_active = id + "_active"; $(bg_active).removeClass('hid'); $(bg_id).removeClass('hid'); $(txt_id).removeClass('hid'); $(bg_id).animate({opacity: opacity1},1000,function(){$(txt_id).animate({opacity: opacity},2000);}); } function switch_sliders(slider_to_open) { // none opened - open this one if($('.state_open').length == 0) { $(slider_to_open).slideToggle('400'); $(slider_to_open).toggleClass('state_open'); } else { // close all sliders if($(slider_to_open).is('.state_open')) slider_to_open = ''; // do not open anything after closing all close_sliders(slider_to_open); } } function close_sliders(slider_to_open) { $('.state_open').slideToggle('400',function () { $('.state_open').toggleClass('state_open'); if(slider_to_open != '') { switch_sliders(slider_to_open); return; } }); } $('.slick-toggle').click(function() { var id = $(this).attr('jq_id'); //'#slickbox'; id = "#"+id; switch_sliders(id); }); var slide = 0; if(slide != 0) { $(slide).trigger('click'); $('#px').cycle('pause'); } });