function simple_popup( url, w, h  ) {
	
	var window_specs = "location=no, menubars=no, toolbars=no, resizable=yes, scrollbars=yes, left=0, top=0, width=" + w +", height="+h;
		
	popup_window = window.open(url, "simple_popup", window_specs);
	popup_window.focus();

} // end simple_popup


function toggle_element(id, speed){
	

	if($("#el_show_" + id).length > 0){
	   $("#el_show_" + id).toggle(speed); 
	}
	
	if($("#el_hide_" + id).length > 0){
	   $("#el_hide_" + id).toggle(speed); 
	}
	
	$("#" + id).toggle(speed);
	
}
// end toggle element



$(document).ready(function(){ 
	
	


	$(".print").click(function(){ window.print();});
	
  
	if($(".tpopup").length > 0){
	  $('.tpopup').click(function(event) {
	    var width  = 575,
	        height = 400,
	        left   = ($(window).width()  - width)  / 2,
	        top    = ($(window).height() - height) / 2,
	        url    = this.href,
	        opts   = 'status=1' +
	                 ',width='  + width  +
	                 ',height=' + height +
	                 ',top='    + top    +
	                 ',left='   + left;

	    window.open(url, 'twitter', opts);

	    return false;
	  });                                   	                               
	}
	// end if tpopup (twitter popup)  exists
	                                        
		if($(".fbpopup").length > 0){ 
		  $('.fbpopup').click(function(event) {
			
			var u		=	encodeURIComponent(window.location.href);
			var t		=	encodeURIComponent(document.title);
			
		    var width  = 626,
		        height = 436,
		        left   = ($(window).width()  - width)  / 2,
		        top    = ($(window).height() - height) / 2,
		        url    = this.href + '?u=' + u + '&t=' + t,
		        opts   = 'status=1' +
		                 ',width='  + width  +
		                 ',height=' + height +
		                 ',top='    + top    +
		                 ',left='   + left;

		    window.open(url, 'sharer', opts);

		    return false;
		  });
		}
		// end if fbpopup (facebook popup) exists
	
	
	 

//	


});
