$(document).ready(function ()   {
   $('.stripeMe tr:even').addClass('alt');
   $('.items-detail-params tr:even').addClass('alt');
   
   /*$('body.reftmpl .slideshow ul li a').each(function(){
		$(this).unbind('click');
		$(this).click(function(){
			var href = $(this).attr('href');
			var src=$(this).children('img').attr('src');
			src=src.replace('size=148x111', 'size=540x405');
			$('#gallery-view div.items-detail-img a').children('img').attr('src', '');
			$('#gallery-view div.items-detail-img a').hide();
			$('#loading').fadeIn(100);
			
			$.ajax({
				url:src,
				complete: function() {
					$('#loading').fadeOut(300,function(){
						$('#gallery-view div.items-detail-img a').children('img').attr('src', src);
						$('#gallery-view div.items-detail-img a').attr('href',href);
						$('#gallery-view div.items-detail-img a').fadeIn(100);
					});
				}
			});
			return false;
		});
	});*/
    if($("div.slideshow").length>0)	{
		$("div.slideshow").carousel({            
	        pagination: false,
	        effect: "fade"      
	    });
	}
	
	$("a.newRefLink[title]").qtip({		
		show: 'mouseover',
		hide: 'mouseout',
		position: {
			type: 'absolute',
			target: 'mouse',
			corner: {
				target: 'topRight',
				tooltip: 'bottomLeft'
			}
		},
		style: {
			'background-color' : '#7e8aa2',
			'color' : '#fff',
			border: {
				width: 2,
	            radius: 5,
	            color: '#fff'
	        },
			name: 'cream',
			padding: '13px 7px',
			tip: true
		}
	});
	if($('#kontaktMapa').length>0)	{
		// inicializace google mapy v kontakech
		latlng = new google.maps.LatLng(50.726281, 15.186680);
	    var opt = {
	      scrollwheel: false,
    	  zoom: 15,
	      center: latlng,
	      mapTypeId: google.maps.MapTypeId.ROADMAP
	    };
	    map = new google.maps.Map(document.getElementById("kontaktMapa"),opt);
		var marker = new google.maps.Marker({
	        position: latlng, 
	        map: map,
	        title:"TERMIL s.r.o."
	    });
	}
    	   
});
