$(document).ready(function() {

$('a.popsol').live('click',function(event) {
		event.preventDefault();
		var vid = this.id.replace('mm_', "");
		var ck = $.colorbox({href:vid,opacity:"0.4",iframe:true, innerWidth:'94%', innerHeight:'85%'});
		/*var vid = this.id.replace('mm_', "");
		$.fancybox( {
		'href' : vid
		}, {
				'width'				: '100%',
				'height'			: '100%',
				'autoScale'			: true,
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'type'				: 'iframe'	});*/
	});

$('a.popsolnew').live('click',function(event) {
	event.preventDefault();
	var vid = this.id.replace('mm_', "");
	var ck = $.colorbox({href:vid,opacity:"0.4",iframe:true, innerWidth:'94%', innerHeight:'85%'});
});

$('a.poplinks').live('click',function(event) {
		event.preventDefault();
		var vid = this.id.replace('mm_', "");
		$.colorbox({href:"offer.php?v="+vid,opacity:"0.4",iframe:true, innerWidth:800, innerHeight:300});
		/*$.fancybox( {
		'href' : 'offer.php?v='+vid
		}, {
				'frameWidth'		: '800',
				'frameHeight'		: '600',
				'autoScale'			: true,
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'type'				: 'iframe'		});*/
	});
$('a.popauto').live('click',function(event) {
		event.preventDefault();
		var vid = this.id.replace('mm_', "");
		$.colorbox({href:vid,opacity:"0.4"});
	});
$('a.popauto2').live('click',function(event) {
		event.preventDefault();
		var vid = this.id.replace('mm_', "");
		var ck = $.colorbox({href:vid,opacity:"0.4",iframe:true, innerWidth:'94%', innerHeight:'85%'});
		//alert(aid);
		/*$.fancybox( {
		'href' : aid
		}, {
		'width'				: '100%',
		'height'			: '100%',
		'autoScale'			: true,
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'type'				: 'iframe'
		});*/
	});
$('a.popinline').live('click',function(event) {
	event.preventDefault();
	var vid = $(this).attr('rel');
	var ck = $.colorbox({inline:true, href:"#"+vid});
});

});
