// <![CDATA[



//Promocje Hosting WWW
$(document).ready(function () {
	$('ul.accordion').accordion();
});



//Overlay Video
$(document).ready(function () {
	$("a#single_image").fancybox();
	$("a.more").click(function() {
                 $.fancybox({
                  'padding'             : '0',
                  'autoScale'			: 'false',
                  'transitionIn'        : 'none',
                  'transitionOut'       : 'none',
                  'title'               : this.title,
                  'width'               : 680,
                  'height'              : 410,
                  'href'                : this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'),
                  'type'                : 'swf',    // <--add a comma here
                  'swf'                 : {'allowfullscreen':'true'} // <-- flashvars here
                  });
                 return false;
            }); 
});



//Overlay POczta konta deom
$(document).ready(function () {
	$("a.wm-testuj-btn").click(function() {
                 $.fancybox({
                  'padding'             : '0',
				  'scrolling'			: 'no',
                  'autoScale'			: 'false',
                  'transitionIn'        : 'none',
                  'transitionOut'       : 'none',
                  'title'               : this.title,
                  'width'               : 535,
                  'height'              : 315,
                  'href'                : this.href,
                  'type'                : 'iframe',    // <--add a comma here
				  'swf'                 : {'allowfullscreen':'true'} // <-- flashvars here
                   });
                 return false;
            }); 
});




//Overlay szukanie domen
$(document).ready(function () {
	
	var submitSearchQuery = function() {
		if(!jQuery("#search_domain_main_site_form input[name=szukaj]").val()){
            alert(lang.home_domain_search_field_empty);
            return false;
        }
		
        jQuery("#ajax-loader-domain-search").css('display', 'block');
        
//         $.fancybox({
//    		 'showCloseButton' : false,
//             'padding'         : 0,
//             'autoScale'       : false,
//             'transitionIn'    : 'none',
//			 'hideOnOverlayClick': false,
//             'transitionOut'   : 'none',
//             'title'           : this.title,
//             'width'           : 450,
//             'height'          : 150,
//             'href'            : this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'),
//             'type'            : 'swf',    // <--add a comma here
//             'swf'             : {'allowfullscreen':'true', wmode: 'transparent'} // <-- flashvars here
//         });

		jQuery("#search_domain_main_site_form").submit();
		
        return false;
	}
	
	$("#search_domain_main_site_trigger").click(function() {
        return submitSearchQuery();
    });
	
	$('#search_domain_main_site_form input[name="szukaj"]').keypress(function(e) {
		if (13 == e.which) {
			return submitSearchQuery();
		}
	});
});



//GaleriaMini z zak�adek
$(document).ready(function () {
	$("a[rel=minigaleria]").fancybox({
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'titlePosition' 	: 'over',
		'titleFormat'       : function(title, currentArray, currentIndex, currentOpts) {
		    return '<span id="fancybox-title-over">Obrazek ' +  (currentIndex + 1) + ' z ' + currentArray.length + ':&nbsp;&nbsp;<strong> ' + title + '</strong></span>';
		}
	});
});



//Rotor ciekawostek
$(document).ready(function() {
	$("div#controller").jFlow({
		slides: "#slides",
		width: "249px",
		height: "149px"
	});
});



//Hover z efektem fade
$(document).ready(function(){
	$('img.hover').imghover();
	$('.hoverbg').fadehover();
});
// ]]>
 
 
//Karuzela referencji
$(document).ready(function(){
	$("#carousel1").CloudCarousel(		
		{			
			xPos: 100,
			yPos: 18,
			buttonLeft: $("#left-but"),
			buttonRight: $("#right-but"),
			altBox: $("#alt-text"),
			titleBox: $("#title-text"),
			xRadius: 85,
			yRadius: -15,
			autoRotate: "no",
			reflHeight: 0,
			minScale: 0.05,
			speed: 0.3
		}
	);
});
   
// slider technologii
$(function() {
	$(".scrollable").scrollable(
		{
			circular: true
		}	
	);
});


// slideshow HOME 

$(document).ready(function() {
		$('#coin-slider').coinslider({ width: 960, height:250, navigation: true, delay: 5000,links : true, hoverPause: true });
	});
	
// pionowe taby
	
$(document).ready(function() {
		$("ul.tabs").tabs("div.panes > div", { closeCurrentPaneOnClick: true });
	});

	
//nowy tt	
$(document).ready(function() {
		$("img.tt_parametry").tooltip({
			relative: true,
			position: 'center left'
		});
	});

//nowy akordeon	
$(document).ready(function() { 
		$("#akordeon").tabs("#akordeon div.akordeon_div", {tabs: 'h2', effect: 'slide', initialIndex: null, closeCurrentPaneOnClick: true});
	});
