jQuery.noConflict();
// JavaScript Document
jQuery(document).ready(function() {	

	//select all the a tag with name equal to modal
	jQuery('a[name=modal]').click(function(e) {
		//Cancel the link behavior
		e.preventDefault();
		
		//Get the A tag
		var id = jQuery(this).attr('href');
	
		//Get the screen height and width
		var maskHeight = jQuery(document).height();
		var maskWidth = jQuery(window).width();
	
		//Set heigth and width to mask to fill up the whole screen
		jQuery('#mask').css({'width':maskWidth,'height':maskHeight});
		
		//transition effect		
		jQuery('#mask').fadeIn(1000);	
		jQuery('#mask').fadeTo("fast",0.9);	
	
		//Get the window height and width
		var winH = jQuery(window).height();
		var winW = jQuery(window).width();
              
		//Set the popup window to center
		jQuery(id).css('top',  winH/2-jQuery(id).height()/2);
		jQuery(id).css('left', winW/2-jQuery(id).width()/2);
	
		//transition effect
		jQuery(id).fadeIn(1000); 
	
	});
	
	//if close button is clicked
	jQuery('.window .close').click(function (e) {
		//Cancel the link behavior
		e.preventDefault();
		
		jQuery('#mask').hide();
		jQuery('.window').hide();
	});		
	
	//if mask is clicked
	jQuery('#mask').click(function () {
		jQuery(this).hide();
		jQuery('.window').hide();

//window.frames['video-coleslawmaker'].location = "blank.html";
//document.getElementById('video-coleslawmaker').src="";
	});			
	
});

function iframeSrcPeeler() { 
window.frames["video-peeler"].location = 'peeler.html';
document.getElementById('video-peeler').src="peeler.html";
}
function iframeSrcclosePeeler() {
window.frames['video-peeler'].location = "blank.html";
document.getElementById('video-peeler').src="";
}

function iframeSrcSlicer() { 
window.frames["video-slicer"].location = 'slicer.html';
document.getElementById('video-slicer').src="slicer.html";
}
function iframeSrccloseSlicer() {
window.frames['video-slicer'].location = "blank.html";
document.getElementById('video-slicer').src="";
}

function iframeSrcChamoi() { 
window.frames["video-chamoi"].location = 'chamoi.html';
document.getElementById('video-chamoi').src="chamoi.html";
}
function iframeSrccloseChamoi() {
window.frames['video-chamoi'].location = "blank.html";
document.getElementById('video-chamoi').src="";
}

function iframeSrcPolysqueep() { 
window.frames["video-polysqueep"].location = 'polysqueep.html';
document.getElementById('video-polysqueep').src="polysqueep.html";
}
function iframeSrcclosePolysqueep() {
window.frames['video-polysqueep'].location = "blank.html";
document.getElementById('video-polysqueep').src="";
}

function iframeSrcZandomatic() { 
window.frames["video-zandomatic"].location = 'zandomatic.html';
document.getElementById('video-zandomatic').src="zandomatic.html";
}
function iframeSrccloseZandomatic() {
window.frames['video-zandomatic'].location = "blank.html";
document.getElementById('video-zandomatic').src="";
}

function iframeSrcColeslawMaker() {
window.frames['video-coleslawmaker'].location = "coleslawmaker.html";
document.getElementById('video-coleslawmaker').src="coleslawmaker.html";
}

function iframeSrccloseColeslawMaker() {
window.frames['video-coleslawmaker'].location = "blank.html";
document.getElementById('video-coleslawmaker').src="";
}

jQuery.noConflict();
