$(document).ready(function() {
	$("span.mwshop_price_recommend").before('<span class="mwshop_star" title="Sleva"></span>');	  
	$("label[for=phone]").addClass("req");
	
	/*
	$(".files,.medias").css("display","none");
   
	var files = $(".files").html();
	if(files != ""){	 
		$(".mwshop_param_table").append("<tr><th>Návod</th><td>" + files + "</td></tr>");
	}
	 
	var medias = $(".medias").html();
	if(medias != "") {	  
		$(".mwshop_param_table").append("<tr><th>Video</th><td>" + medias + "</td></tr>");
	}
	*/
	var videofile = $('tr.mwshop_param_table_row_11').find('td');
	
	if(videofile.length==1){
		
		videofile.html( replaceVideo(videofile.html().toString()) );
		
		$(".videosrc").click(function() {
		$.fancybox({
				'padding'			: 0,
				'autoScale'			: false,
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'title'				: this.title,
				'width'				: 680,
				'height'			: 495,
				'href'				: this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'),
				'type'				: 'swf',
				'swf'				: {
				'wmode'				: 'transparent',
				'allowfullscreen'	: 'true'
				}
			});

		return false;
		});
	}
	
	
	var pdffile = $('tr.mwshop_param_table_row_14').find('td');
	
	if(pdffile.length == 1){
		pdffile.html( replacePdf(pdffile.html().toString()) );
	}
});

function replaceVideo(src){
	
	return '<a class="videosrc" href="'+src+'&amp;fs=1">Ukázat video</a>';
}

function replacePdf(src){
	
	return '<a class="pdfsrc" target="_blank" href="/content/shopfile/'+src+'">Ukázat pdf</a>';
}

