/**
 * @author Ashnur 
 */
$().ready(function() {

	var ltie7 = $.browser.msie && /MSIE\s(5\.5|6\.)/.test(navigator.userAgent);
	var ie7 = $.browser.msie && /MSIE\s(7\.)/.test(navigator.userAgent);

	var url = document.location ;
	if ($('.galeria-megjelenitese').get().length) {
		$.Lightbox.construct({
			show_linkback:	false,
			text: {
				image:		'Kép',
				close: 		'bezár'
			},
			
			download_link: 'false',
			files: {
				js:{
					lightbox:'./templates/scripts/jquery.lightbox.packed.js',
					colorBlend:'./templates/scripts/jquery.color.packed.js'
				},
				css:{
					lightbox:'./templates/styles/jquery.lightbox.packed.css'
				}, 
				images:{
					prev:'./templates/images/prev.gif', 
					next:'./templates/images/next.gif', 
					blank:'./templates/images/blank.gif', 
					loading:'./templates/images/loading.gif'	
				}
	
			}
		});
	
		$('.galeria-megjelenitese').lightbox();
	}

	$('a[title=print]').click(function(){window.print(); return false;});
	
	
	
	

	var jwpli = 0;
	$('.video').click(function(){
		var vidname = $(this).attr("title");
		$(this).attr('id','container-'+(jwpli++));	
		
		if( vidname != undefined){
			$("#container-0").flash({    
				swf: '/templates/flv/player-viral.swf'  ,
				allowfullscreen : true,
				allowscriptaccess: "always",
				allownetworking: "all",
				height: 360,
				width: 400,
				flashvars: {  
					file: '/public/media/video/'+vidname+'.flv',
					
					stretching: 'exactfit'
				} 	
				
			});
//			console.log(this);			
//			var s1 = new SWFObject("player-viral.swf","ply","500","400","9","#FFFFFF");
//			s1.addParam("allowfullscreen","false");
//			s1.addParam("allownetworking","all");
//			s1.addParam("allowscriptaccess","always");
//			s1.addParam("flashvars","file=/public/media/video/'+vidname+'.flv");
//			s1.write("container-'+jwpli+'");
			
		}
		return false;
	});
	
	
	
	
	/*
	var _pInfoTableBody = function() {
	    var t = $('#prospectInfo .container table tbody');
	    _pInfoTableBody = function() {
	        return t;
	    };
	    return _pInfoTableBody();
	};*/
	
//	$('.info').tooltip();
	
//	$(".startCalendar + input").datepicker({}).attr("readonly", "readonly");
	
	
//	$('*[style]').each(
//		function(i){
//			console.log(this.style) 
//		}
//	);
	if (ltie7 && DD_belatedPNG != undefined) {
		DD_belatedPNG.fix('#pageWrapper');  		
		DD_belatedPNG.fix('.pageLogo');  
		DD_belatedPNG.fix('.menu a');   
		DD_belatedPNG.fix('#pageContent');  		   
		DD_belatedPNG.fix('#pageContent h2');  		   
		DD_belatedPNG.fix('#pageContent .content');    		   
		DD_belatedPNG.fix('#pageContent .motto');  
	}
//		$(".startCalendar").click(function(){$(this).next('input').datepicker('show')});
//		
//		$(".info").click(function(){$(this).next('input').datepicker('show')});
//		
//		$('.counties img').attr('src', function(){ return $(this).attr('src').replace(/^\.\/images\/(.+?)\.png/i,'./images/ie6/$1.gif') });
//
//		$('tr').hover(function(){
//			$(this).addClass("hover");
//		},function(){
//			$(this).removeClass("hover");
//		});
//		
//		$('li').hover(function(){
//			$(this).addClass("hover");
//		},function(){
//			$(this).removeClass("hover");
//		});
//	}
//	
	//$('#pageFooter p.information').text(document.compatMode);
	
});
	


