
var iframesource = null
$(document).ready(function(){
						   
						     
							 createPopUpACCORDIAN();
							 loadContent();
							 iframesource =  $('#iframevid').attr('src');
						     ACCresizing();
						 	 $(window).resize(ACCresizing);
							 
							 var obj = new Object();
							 obj.headdivs = jQuery('div[class*="-sec-top"]');
							 obj.containers = jQuery('div[class^="popup-sec"]');
							 obj.contents = jQuery('.popup-content');
							 
							 var acc = new WebguruAccordian(obj);
							 
							 
						   });


function loadContent()
{
  $('.main-popup').appendTo($('#popupcontentACC'));
}


function createPopUpACCORDIAN()
{
	W = $(window).width();
	H = $(window).height();
	
	var cStyle="position:fixed; top:0px; left:0px; display:none; z-index:99999999;";
	var shadowstyle = "position:absolute; top:0px; left:0px; width:"+W+"px; height:"+H+"px; opacity:0.5; background:#000000;";
	var pstyle = "position:absolute; top:0px; left:0px; width:506px; height:456px; background:#FFFFFF; overflow:hidden;";
	pstyle = pstyle+"-moz-box-shadow:0px 0px 10px #000000; -webkit-box-shadow:0px 0px 10px #000000;border:3px solid #5075d9;"
	var crossstyle="position:absolute; top:0px; left:0px; cursor:pointer;";
	crossstyle = crossstyle+"-moz-box-shadow:0px 0px 3px #000000; -webkit-box-shadow:0px 0px 3px #000000;"
	
	var htmlc = "<div id='popupACC' style='"+cStyle+"'><div id='shACC' style='"+shadowstyle+"'></div><div id='popupcontentACC' style='"+pstyle+"'></div>";
	htmlc = htmlc+"<img id='crossbtACC' style='"+crossstyle+"' src='http://www.webguru-development.com/debdulal/eardoc/images/cross.jpg'/></div>";
   
    $('body').append(htmlc);
	$('#shACC').css('opacity','0.6');
	$('#crossbtACC').click(function(){
								    $('#popupACC').hide();
								    $('#iframevid').show();
								  });

}


function openpopupACCORDIAN(e)
{
	//e.preventDefault();
	$('#popupACC').fadeIn();
	$('#iframevid').hide();
	
	
	
}


function ACCresizing()
{
  W = $(window).width();
  H = $(window).height();
  $('#shACC').css('width',W);
  $('#shACC').css('height',H);
  $('#shACC').css('overflow','hidden');
  
  wx = $('#popupcontentACC').width();
  hx = $('#popupcontentACC').height();
  $('#popupcontentACC').css('left',(W-wx)/2);
  $('#popupcontentACC').css('top',(H-hx)/2);
  $('#crossbtACC').css('left',((W-wx)/2)+wx+4);
  $('#crossbtACC').css('top',(H-hx)/2);
	
}

