// Common JavaScript code across your application goes here.
$(document).ready(function() {
	//openModal();
	//new_win();
	//$("a[href^='http']").attr('target','_blank');
	$('.remo').click(function (event){

	                    var url = $(this).attr("href");
	                    var windowName = "popUp";//$(this).attr("name");
	                    //var windowSize = windowSizeArray[$(this).attr("rel")];
											var windowSize = "width=650,scrollbars=yes";
											
	                    window.open(url, windowName, windowSize);

	                    event.preventDefault();

	                });
});

function new_win(){
	$(".remo").each(function(index,element){
		var url = $(this).attr("href");
		$(element).click(function(e){
			$(e).preventDefault();
			window.open(url, reports, "height=200, width=200");
			return false;
		});
	});
}

function createModal(obj){
	$("<div />").insertBefore(obj).addClass('modahl');

}

function openModal(){
	$($("<div />").addClass('modahl')).prependTo('body');
	$(".remo").each(function(i,e){
		var url = $(this).attr("href");
		$(this).bind('click', function(e){
			e.preventDefault();
			$.ajax({
			    type: "GET",
			    url: url,
					dataType: 'jsonp',
			    success: function(data, status){
			        alert(status);
			    },
					error: function(data, status){
						alert(status);
					}
			});
			
				
		});
	});
}
