$(document).ready(function(){
	$('a[rel=ext]').attr('target','_blank');

	var jqzoomoptions = {
		zoomWidth: 288 //latime popup
		, zoomHeight: 270 //inaltime popup
		, position: 'right' //The popup window position relative to image. Admitted values:'right' ,'left' ,'top' ,'bottom'
		, xOffset: 50 //The popup window x offset from the small image
		, yOffset: -81 //The popup window y offset from the small image
		, lens: true //if setted to false,the small lens,over the image, won't show.
		, imageOpacity: 0.2 //Set the image opacity when the 'zoomType' option is setted to 'reverse'.
		, title: false //Show a small title over the image it can be the anchor title and if not specified,it will get the small image title.
		, showEffect: 'fadein' //The Effect by which showing the popup window.Options available: 'show' ,'fadein'.
		, hideEffect: 'hide' //The Effect by which hiding the popup window.Options available: 'hide' ,'fadeout'.
		, fadeinSpeed: 'medium' //Changes fade in speed,in case the showEffect option is setted to 'fadein'.(options: 'fast','slow','medium')
		, fadeoutSpeed: 'fast' //Changes fade out speed,in case the hideEffect option is setted to 'fadeout'.(options: 'fast','slow','medium')
		, showPreload: true //Show the preload loading indicator.(options: 'true','false')
		, preloadText: 'Se incarca...' //Option to customize the preload indicator text.
		, preloadPosition: 'center' //By default the preload indicator is centered over the small image.You can optionally use the 'bycss' option letting you to change its position by css.

	};

	var poza_mare = $('.produs-intro p a').attr('href');
	if(poza_mare){
		$('.produs-intro').after('<a class="link-large" href="' + poza_mare + '"><img alt="Varianta mare a imaginii" title="Zoom" src="' + rel +'u/st/picture_zoom.png" /></a>');
	}
	$('.produs-intro p a').jqzoom(jqzoomoptions);

	$('a, img').wTooltip();

	$('#main .istoric, #main .sectiuni, #main .produse, #body-contact #main .info, #body-privacy #main .info, #body-noutati #main .info, #body-noutati #main .descriere').jScrollPane({scrollbarWidth:5, scrollbarMargin:5, animateTo: true});

	$('#body-contact #main .info a, #body-noutati #main .info a, .produs-continut .descriere a:not([rel="ext"]), a.link-large, .produs-continut .istoric a').fancybox({'hideOnContentClick':true, 'overlayShow':true}); //'imageScale':true,
	//.produs-intro p a,
	$('span.email').each(function(i){var adresa = $(this).html().replace(/ at /, '@').replace(/ dot /g, '.'); $(this).html('<a href="mailto:' + adresa + '">' + adresa + '</a>');});

    $('.lifestyle').cycle({fx:'fade',speed: 1500,timeout:500,pause:true});

});