
	function getBrowserWidth(){
		if (window.innerWidth){
			return window.innerWidth;}	
		else if (document.documentElement && document.documentElement.clientWidth != 0){
			return document.documentElement.clientWidth;	}
		else if (document.body){return document.body.clientWidth;}		
			return 0;
	}


function dynamicLayout(){
	var browserWidth = getBrowserWidth();
	var ishome = document.getElementById('home-wrapper-maxx');
	
	if (ishome!=null) 
		{ ishome = true;}
	else
		{ishome = false;}

	// make display on page load for 1300
	if (ishome)
	{
	document.getElementById('vbnet1280').style.display = 'none';
	document.getElementById('bottom41280').style.display = 'none';
	}
	
	//Load Wider CSS Rules
	//Layouts greater than 1024 px
	if (browserWidth > 1000){
		changeLayout("layout1280");
	}

	if (browserWidth >= 1258) {
		changeLayout("layout1300");
		
		// make display block for resolution 1300
		if (ishome)
		{
			document.getElementById('vbnet1280').style.display = 'block';
			document.getElementById('bottom41280').style.display = 'block';
		}
	}
}


//Applying CSS as per the width of the browser
function changeLayout(description){
   var i, a;
   for(i=0; (a = document.getElementsByTagName("link")[i]); i++){
	   if(a.getAttribute("title") == description){a.disabled = false;}
	   else if(a.getAttribute("title") != "default"){a.disabled = true;}
   }
}
	function addEvent( obj, type, fn ){ 
	   if (obj.addEventListener){ 
	      obj.addEventListener( type, fn, false );
	   }
	   else if (obj.attachEvent){ 
	      obj["e"+type+fn] = fn; 
	      obj[type+fn] = function(){ obj["e"+type+fn]( window.event ); } 
	      obj.attachEvent( "on"+type, obj[type+fn] ); 
		  
	   } 
	} 
	
	
	// Run dynamicLayout function when page loads and when it resizes.
	addEvent(window, 'load', dynamicLayout);
	addEvent(window, 'resize', dynamicLayout);
	
	

//Right-Navigation
$(document).ready(function(){
	
	$(".btn-slide").click(function() {
		$(this).next(".expand").slideToggle('fast');
		$(this).toggleClass("active"); return false;
	});
 
});

$(document).ready(function(){

	$(".btn-slide-next").click(function(){
		$(this).next(".expand-next").slideToggle('fast');
		$(this).toggleClass("active"); return false;
	});
 
});

