var SITE = {

	openUrl : function(newUrl){
		location.href=newUrl;
	},

	scrollTop: function(){
		$('html,body').animate({scrollTop: 0}, 300);
	}

};

function callCMS(data,target){

	$.post(
		rootUrl,
		data,
		function(html){
			$("#"+target).html(html);
			return false;
		}
	);

}

function SendComment(id,type){

	callCMS({
		action	: 'Comment',
		id		: id,
		type	: type,
		name	: $('#comment_name').val(),
		message	: $('#comment_message').val(),
		email	: $('#comment_email').val()
	},'null');

	$('#comment_name').val('');
	$('#comment_message').val('');
	$('#comment_email').val('');

}


$(document).ready(function(){


	    $("ul.dropdown li").hover(function(){

	        $(this).addClass("hover");
	        $('ul:first',this).css('visibility', 'visible');

	    }, function(){

	        $(this).removeClass("hover");
	        $('ul:first',this).css('visibility', 'hidden');

	    });

	  //  $("ul.dropdown li ul li:has(ul)").find("a:first").append(" &raquo; ");


});

function popitup(url) {
	newwindow=window.open(url,'name','height=600,width=652,scrollbars=yes');
	if (window.focus) {newwindow.focus()}
	return false;
}


