
jQuery(document).ready(function() {
    jQuery('#peroukes_carousel').jcarousel({
        // Configuration goes here
        scroll: 2, animation: "slow"
        
    });
	
	
  
  $('.peroukes_slider ul li img').hover(function(){
    
    if( !$(this).hasClass('lense'))
    {    	
		$('#perouka_images_wrap img')[0].src = this.src;
    	$('#perouka_images_wrap a')[0].href = this.src;
		$('#perouka_images_wrap ul li a.lense').attr('href',this.src);
    }
  }
  )
  
  
   /* Modal Slideshow */
   $("a.peroukes_images").fancybox({
		'cyclic'	:	true,
		'titlePosition'	:	'inside'		
								});
  
  
  /* Single Image Modal */
  $("a.single_image").fancybox({'titlePosition'	:	'inside'});
  
  
  /* Modal With HTML Content */
  $("a.iframe").fancybox({'width' : 780, 'height' : 580, 'overlayOpacity': 0.05, 'overlayColor' : '#666666', 'padding':40});

  if ($("#video_player").html() != null){
  
	  $f("video_player", "fileadmin/template/swf/flowplayer-3.2.4.swf", {
				
					plugins: {
					   controls: {
					   
					   	  url: 'fileadmin/template/swf/flowplayer.controls-3.2.2.swf',
					      volumeColor: '#666666',
					      tooltipColor: '#000000',
					      borderRadius: '0px',
					      tooltipTextColor: '#666666',
					      backgroundColor: 'rgb(255, 255, 255, 1)',
					      timeBgColor: 'rgb(0, 0, 0, 0)',
					      volumeSliderGradient: 'none',
					      progressColor: '#666666',
					      bufferColor: '#333333',
					      timeSeparator: ' ',
					      sliderColor: '#000000',
					      sliderBorder: '1px solid rgba(128, 128, 128, 0.7)',
					      progressGradient: 'none',
					      timeColor: '#666666',
					      backgroundGradient: 'none',
					      volumeSliderColor: '#666666',
					      durationColor: '#666666',
					      bufferGradient: 'none',
					      volumeBorder: '1px solid rgba(128, 128, 128, 0.7)',
					      buttonColor: '#666666',
					      buttonOverColor: '#993333',
					      sliderGradient: 'none',
					      timeBorder: '0px solid rgba(0, 0, 0, 0.3)',
					      autoHide: true,
					      height: 25,
					      opacity: 1.0,			  
					      
					      sliderBorder: 'none',
					      scrubberHeightRatio: 0.34,
					      scrubberBarHeightRatio: 0.3,
					      volumeSliderHeightRatio: 0.3,
					      timeBgHeightRatio: 0.5, 
					      timeSeparator: '/',
					      timeFontSize: 12,
					      fullscreen: false,
					      volume: false,
					      time:false,
					      mute:false,
					      fullscreen: true
					   }
				},
				clip:   { 
			        autoPlay: false, 
			        autoBuffering: true,
			        scale: 'orig',
			        onBeforeFinish: function() { 
						return false; 
					} 
			    }
	  		}).ipad();
  }
$('iframe').each(function()
	{
		var url = $(this).attr("src");
		
		var result = url.search("http://www.youtube.com/embed");
		if(result!=-1)
		{		
			result = url.indexOf('?');
			if(result!=-1)
			{
				$(this).attr("src",url+"&wmode=transparent");
			}
			else {
				$(this).attr("src",url+"?wmode=transparent");
			}
		}
	});
  
  jQuery('.wig_care').jScrollPane();
  jQuery('.wig_care').css({padding: '22px 14px 22px 6px'});
  
});
  
