/*
========================================
	Fonts
========================================
*/
Cufon.replace('h2', 
{ 
	fontFamily: 'helvetica67', 
	textShadow: '0px 1px #ffffff' ,
	trim: 'advanced'
	
});

Cufon.replace('h3', 
{ 
	fontFamily: 'helvetica67', 
	textShadow: '0px 1px #ffffff' ,
	trim: 'advanced',
	hover: true
	
});

Cufon.replace('h4', 
{ 
	fontFamily: 'helvetica67', 
	textShadow: '0px 1px #ffffff' ,
	trim: 'advanced',
	hover: true
	
});
Cufon.replace('h5', 
{ 
	fontFamily: 'helvetica67', 
	textShadow: '0px 1px #ffffff' ,
	trim: 'advanced',
	hover: true
	
});

Cufon.replace('.sidebar-navigation-box-title', 
{ 
	fontFamily: 'helvetica67', 
	textShadow: '0px 1px #d6d6d6' ,
	trim: 'advanced',
	hover: true
	
});

Cufon.replace('.motto-text', 
{ 
	fontFamily: 'helvetica67', 
	textShadow: '0px 1px #000000' ,
	trim: 'advanced',
	hover: true
	
});

/*
========================================
	Window Load
========================================
*/

$(window).load(function(){
	
	$('.tag-cloud').masonry({ 
		singleMode: false,
		columnWidth:1,
		});
		
	var imgWidth = $(".page-content-text p img").attr("width");
	var imgHeight = $(".page-content-text p img").attr("height");
	var imgWidthPerc = 565 / imgWidth * 100;
	if(imgWidthPerc>100)
	{
		imgWidth = imgWidth * imgWidthPerc / 100;
		imgWidth = Math.round(imgWidth);
		imgHeight = imgHeight * imgWidthPerc / 100;
		imgHeight = Math.round(imgHeight);
		$(".page-content-text p img").attr("width",imgWidth);
		$(".page-content-text p img").attr("height",imgHeight);
		//alert(imgWidth + "- " + imgHeight );
	}
		
});

/*
========================================
	Interface 
========================================
*/

function showDropDownContent(selector)
{
		//$(selector).parent().('.common-dropdown-content-detail').show();
		if($(selector).next().children().is(':visible'))
		{
			$(selector).next().children().hide();
			$(selector).removeClass("common-dropdown-close");
		}
		else
		{
			$(selector).next().children().show();
			
			$(selector).addClass("common-dropdown-close");
		}
}
function closeDropDownContent(selector)
{
		//$(selector).parent().('.common-dropdown-content-detail').show();
		/*if($(selector).next().children().is(':visible'))
		{
			$(selector).next().children().hide();
			$(selector).removeClass("common-dropdown-close");
		}
		else
		{
			$(selector).next().children().show();
			
			$(selector).addClass("common-dropdown-close");
		}*/
		$(selector).parent().parent().parent().hide();
		
		$(selector).parent().parent().parent().parent().prev().text($(selector).text());
		
		$(selector).parent().parent().parent().parent().prev().removeClass("common-dropdown-close");
		
		$(selector).parent().parent().children().children().removeClass("selected-dropdown-item");
		
		$(selector).addClass("selected-dropdown-item");
		
}


            
			
			
			
