// JavaScript Document

/*$(document).ready(function(){
	//set the starting bigestHeight variable
	var biggestHeight = 0;
	//check each of them
	$('.equal_height').each(function(){
		//if the height of the current element is
		//bigger then the current biggestHeight value
		if($(this).height() > biggestHeight){
						//update the biggestHeight with the
						//height of the current elements
						biggestHeight = $(this).height();
		}
	});
	//when checking for biggestHeight is done set that
	//height to all the elements
	$('.equal_height').height(biggestHeight);
 });*/

function P7_colH2(){ //v2.1.0 by PVII-www.projectseven.com
 var i,oh,h=0,tg,el,np,dA=document.p7eqc,an=document.p7eqa;if(dA&&dA.length){
 for(i=1;i<dA.length;i+=2){dA[i+1].style.paddingBottom='';}for(i=1;i<dA.length;i+=2){
 oh=dA[i].offsetHeight;h=(oh>h)?oh:h;}for(i=1;i<dA.length;i+=2){oh=dA[i].offsetHeight;
 if(oh<h){np=h-oh;if(!an&&dA[0]==1){P7_eqA2(dA[i+1].id,0,np);}else{
 dA[i+1].style.paddingBottom=np+"px";}}}document.p7eqa=1;
 document.p7eqth=document.body.offsetHeight;
 document.p7eqtw=document.body.offsetWidth;}
}

function P7_eqT2(){ //v2.1.0 by PVII-www.projectseven.com
 if(document.p7eqth!=document.body.offsetHeight||document.p7eqtw!=document.body.offsetWidth){P7_colH2();}
}

function P7_equalCols2(){ //v2.1.0 by PVII-www.projectseven.com
 var c,e,el;if(document.getElementById){document.p7eqc=new Array();
 document.p7eqc[0]=arguments[0];for(i=1;i<arguments.length;i+=2){el=null;
 c=document.getElementById(arguments[i]);if(c){e=c.getElementsByTagName(arguments[i+1]);
 if(e){el=e[e.length-1];if(!el.id){el.id="p7eq"+i;}}}if(c&&el){
 document.p7eqc[document.p7eqc.length]=c;document.p7eqc[document.p7eqc.length]=el}}
 setInterval("P7_eqT2()",10);}
}

function P7_eqA2(el,p,pt){ //v2.1.0 by PVII-www.projectseven.com
 var sp=10,inc=20,g=document.getElementById(el);np=(p>=pt)?pt:p;
 g.style.paddingBottom=np+"px";if(np<pt){np+=inc;
 setTimeout("P7_eqA2('"+el+"',"+np+","+pt+")",sp);}
}

function P7_colH22(){ //v2.1.0 by PVII-www.projectseven.com
 var i,oh,h=0,tg,el,np,dA=document.p7eq2c,an=document.p7eq2a;if(dA&&dA.length){
 for(i=1;i<dA.length;i+=2){dA[i+1].style.paddingBottom='';}for(i=1;i<dA.length;i+=2){
 oh=dA[i].offsetHeight;h=(oh>h)?oh:h;}for(i=1;i<dA.length;i+=2){oh=dA[i].offsetHeight;
 if(oh<h){np=h-oh;if(!an&&dA[0]==1){P7_eq2A(dA[i+1].id,0,np);}else{
 dA[i+1].style.paddingBottom=np+"px";}}}document.p7eq2a=1;
 document.p7eq2th=document.body.offsetHeight;
 document.p7eq2tw=document.body.offsetWidth;}
}

function P7_eq2T(){ //v2.1.0 by PVII-www.projectseven.com
 if(document.p7eq2th!=document.body.offsetHeight||document.p7eq2tw!=document.body.offsetWidth){P7_colH22();}
}

function P7_equalCols22(){ //v2.1.0 by PVII-www.projectseven.com
 var c,e,el;if(document.getElementById){document.p7eq2c=new Array();
 document.p7eq2c[0]=arguments[0];for(i=1;i<arguments.length;i+=2){el=null;
 c=document.getElementById(arguments[i]);if(c){e=c.getElementsByTagName(arguments[i+1]);
 if(e && e.length>0){el=e[e.length-1];if(!el.id){el.id="p7eq2"+i;}}}if(c&&el){
 document.p7eq2c[document.p7eq2c.length]=c;document.p7eq2c[document.p7eq2c.length]=el}}
 setInterval("P7_eq2T()",10);}
}

function P7_eq2A(el,p,pt){ //v2.1.0 by PVII-www.projectseven.com
 var sp=10,inc=20,g=document.getElementById(el);np=(p>=pt)?pt:p;
 g.style.paddingBottom=np+"px";if(np<pt){np+=inc;
 setTimeout("P7_eq2A('"+el+"',"+np+","+pt+")",sp);}
}

function P7_colH33(){ //v2.1.0 by PVII-www.projectseven.com
 var i,oh,h=0,tg,el,np,dA=document.P7_eq3c,an=document.P7_eq3a;if(dA&&dA.length){
 for(i=1;i<dA.length;i+=2){dA[i+1].style.paddingBottom='';}for(i=1;i<dA.length;i+=2){
 oh=dA[i].offsetHeight;h=(oh>h)?oh:h;}for(i=1;i<dA.length;i+=2){oh=dA[i].offsetHeight;
 if(oh<h){np=h-oh;if(!an&&dA[0]==1){P7_eq3A(dA[i+1].id,0,np);}else{
 dA[i+1].style.paddingBottom=np+"px";}}}document.P7_eq3a=1;
 document.P7_eq3th=document.body.offsetHeight;
 document.P7_eq3tw=document.body.offsetWidth;}
}

function P7_eq3T(){ //v2.1.0 by PVII-www.projectseven.com
 if(document.p7eq3th!=document.body.offsetHeight||document.P7_eq3tw!=document.body.offsetWidth){P7_colH33();}
}

function P7_equalCols33(){ //v2.1.0 by PVII-www.projectseven.com
 var c,e,el;if(document.getElementById){document.P7_eq3c=new Array();
 document.P7_eq3c[0]=arguments[0];for(i=1;i<arguments.length;i+=2){el=null;
 c=document.getElementById(arguments[i]);if(c){e=c.getElementsByTagName(arguments[i+1]);
 if(e && e.length>0){el=e[e.length-1];if(!el.id){el.id="P7_eq3"+i;}}}if(c&&el){
 document.P7_eq3c[document.P7_eq3c.length]=c;document.P7_eq3c[document.P7_eq3c.length]=el}}
 setInterval("P7_eq3T()",10);}
}

function P7_eq3A(el,p,pt){ //v2.1.0 by PVII-www.projectseven.com
 var sp=10,inc=20,g=document.getElementById(el);np=(p>=pt)?pt:p;
 g.style.paddingBottom=np+"px";if(np<pt){np+=inc;
 setTimeout("P7_eq3A('"+el+"',"+np+","+pt+")",sp);}
}

function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      if (oldonload) {
        oldonload();
      }
      func();
    }
  }
}

function topcontainheights(){
	P7_equalCols2(0,'headline-image','DIV','headline-post','DIV');
}

function midcontainheights(){
	P7_equalCols22(0,'headline-2','DIV','headline-3','DIV','headline-4','DIV');
}

function bottomcontainheights(){
	P7_equalCols33(0,'recent-1','DIV','recent-2','DIV','recent-3','DIV','recent-4','DIV');
}

//function bottomcontainheights(){
//	P7_equalCols33(0,'column-one','DIV','column-two','DIV','column-three','DIV');
//}

